mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-12-21 06:51:19 +08:00
0e26eed9b5
Signed-off-by: MiniDigger <admin@minidigger.me>
45 lines
1.3 KiB
Vue
45 lines
1.3 KiB
Vue
<template>
|
|
<v-app>
|
|
<Header />
|
|
<v-main>
|
|
<v-container>
|
|
<template v-if="announcements">
|
|
<Announcement v-for="(announcement, idx) in announcements" :key="idx" :announcement="announcement" />
|
|
</template>
|
|
|
|
<DonationResult />
|
|
<nuxt />
|
|
</v-container>
|
|
</v-main>
|
|
<HangarSnackbar />
|
|
<Footer />
|
|
</v-app>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { Component, Vue } from 'nuxt-property-decorator';
|
|
import Header from '~/components/layouts/Header.vue';
|
|
import Footer from '~/components/layouts/Footer.vue';
|
|
import Announcement from '~/components/layouts/Announcement.vue';
|
|
import HangarSnackbar from '~/components/layouts/HangarSnackbar.vue';
|
|
import DonationResult from '~/components/donation/DonationResult.vue';
|
|
|
|
@Component({
|
|
components: {
|
|
DonationResult,
|
|
Header,
|
|
Footer,
|
|
Announcement,
|
|
HangarSnackbar,
|
|
},
|
|
})
|
|
export default class DefaultLayout extends Vue {
|
|
title = 'Hangar';
|
|
announcements: Announcement[] = [];
|
|
|
|
async fetch() {
|
|
this.announcements = await this.$api.requestInternal<Announcement[]>('data/announcements', false).catch<any>(this.$util.handlePageRequestError);
|
|
}
|
|
}
|
|
</script>
|