2023-07-27 14:31:52 +09:00
|
|
|
<!--
|
2024-02-14 00:59:27 +09:00
|
|
|
SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 14:31:52 +09:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2020-01-30 04:37:25 +09:00
|
|
|
<template>
|
2022-06-20 17:38:49 +09:00
|
|
|
<MkStickyContainer>
|
2022-06-22 16:29:21 +09:00
|
|
|
<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
|
2024-01-18 18:21:33 +09:00
|
|
|
<MkHorizontalSwipe v-model:tab="tab" :tabs="headerTabs">
|
|
|
|
<MkSpacer v-if="tab === 'overview'" :contentMax="600" :marginMin="20">
|
2024-07-14 14:49:50 +09:00
|
|
|
<XOverview/>
|
2024-01-18 18:21:33 +09:00
|
|
|
</MkSpacer>
|
|
|
|
<MkSpacer v-else-if="tab === 'emojis'" :contentMax="1000" :marginMin="20">
|
|
|
|
<XEmojis/>
|
|
|
|
</MkSpacer>
|
|
|
|
<MkSpacer v-else-if="tab === 'federation'" :contentMax="1000" :marginMin="20">
|
|
|
|
<XFederation/>
|
|
|
|
</MkSpacer>
|
|
|
|
<MkSpacer v-else-if="tab === 'charts'" :contentMax="1000" :marginMin="20">
|
|
|
|
<MkInstanceStats/>
|
|
|
|
</MkSpacer>
|
|
|
|
</MkHorizontalSwipe>
|
2022-06-20 17:38:49 +09:00
|
|
|
</MkStickyContainer>
|
2020-01-30 04:37:25 +09:00
|
|
|
</template>
|
|
|
|
|
2022-01-07 16:48:51 +09:00
|
|
|
<script lang="ts" setup>
|
2024-07-14 14:49:50 +09:00
|
|
|
import { computed, defineAsyncComponent, ref, watch } from 'vue';
|
2023-09-19 16:37:43 +09:00
|
|
|
import { i18n } from '@/i18n.js';
|
|
|
|
import { claimAchievement } from '@/scripts/achievements.js';
|
2024-07-14 14:49:50 +09:00
|
|
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
|
|
|
import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
|
|
|
|
|
|
|
|
const XOverview = defineAsyncComponent(() => import('@/pages/about.overview.vue'));
|
|
|
|
const XEmojis = defineAsyncComponent(() => import('@/pages/about.emojis.vue'));
|
|
|
|
const XFederation = defineAsyncComponent(() => import('@/pages/about.federation.vue'));
|
|
|
|
const MkInstanceStats = defineAsyncComponent(() => import('@/components/MkInstanceStats.vue'));
|
2020-01-30 04:37:25 +09:00
|
|
|
|
2022-06-29 16:00:00 +09:00
|
|
|
const props = withDefaults(defineProps<{
|
|
|
|
initialTab?: string;
|
|
|
|
}>(), {
|
|
|
|
initialTab: 'overview',
|
|
|
|
});
|
|
|
|
|
2023-12-07 14:42:09 +09:00
|
|
|
const tab = ref(props.initialTab);
|
2020-02-17 02:21:27 +09:00
|
|
|
|
2023-12-07 14:42:09 +09:00
|
|
|
watch(tab, () => {
|
|
|
|
if (tab.value === 'charts') {
|
2023-01-22 20:30:56 +09:00
|
|
|
claimAchievement('viewInstanceChart');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2023-12-07 14:42:09 +09:00
|
|
|
const headerActions = computed(() => []);
|
2022-06-20 17:38:49 +09:00
|
|
|
|
2023-12-07 14:42:09 +09:00
|
|
|
const headerTabs = computed(() => [{
|
2022-06-22 16:29:21 +09:00
|
|
|
key: 'overview',
|
2022-06-20 17:38:49 +09:00
|
|
|
title: i18n.ts.overview,
|
2022-06-29 11:13:32 +09:00
|
|
|
}, {
|
|
|
|
key: 'emojis',
|
|
|
|
title: i18n.ts.customEmojis,
|
2022-12-31 20:36:49 +09:00
|
|
|
icon: 'ti ti-icons',
|
2022-06-29 11:13:32 +09:00
|
|
|
}, {
|
|
|
|
key: 'federation',
|
|
|
|
title: i18n.ts.federation,
|
2022-12-19 19:01:30 +09:00
|
|
|
icon: 'ti ti-whirl',
|
2022-06-20 17:38:49 +09:00
|
|
|
}, {
|
2022-06-22 16:29:21 +09:00
|
|
|
key: 'charts',
|
2022-06-20 17:38:49 +09:00
|
|
|
title: i18n.ts.charts,
|
2022-12-19 19:01:30 +09:00
|
|
|
icon: 'ti ti-chart-line',
|
2022-06-20 17:38:49 +09:00
|
|
|
}]);
|
|
|
|
|
2024-02-16 16:17:09 +09:00
|
|
|
definePageMetadata(() => ({
|
2022-06-20 17:38:49 +09:00
|
|
|
title: i18n.ts.instanceInfo,
|
2022-12-19 19:01:30 +09:00
|
|
|
icon: 'ti ti-info-circle',
|
2024-02-16 16:17:09 +09:00
|
|
|
}));
|
2020-01-30 04:37:25 +09:00
|
|
|
</script>
|