enhance(frontend): aboutページ・サーバー情報

This commit is contained in:
kakkokari-gtyih 2024-12-10 14:44:22 +09:00
parent 92bc2e71ca
commit 88a7d19160
2 changed files with 42 additions and 23 deletions

View file

@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSpacer v-else-if="tab === 'emojis'" :contentMax="1000" :marginMin="20">
<XEmojis/>
</MkSpacer>
<MkSpacer v-else-if="tab === 'federation'" :contentMax="1000" :marginMin="20">
<MkSpacer v-else-if="instance.federation !== 'none' && tab === 'federation'" :contentMax="1000" :marginMin="20">
<XFederation/>
</MkSpacer>
<MkSpacer v-else-if="tab === 'charts'" :contentMax="1000" :marginMin="20">
@ -25,6 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { computed, defineAsyncComponent, ref, watch } from 'vue';
import { instance } from '@/instance.js';
import { i18n } from '@/i18n.js';
import { claimAchievement } from '@/scripts/achievements.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
@ -51,22 +52,34 @@ watch(tab, () => {
const headerActions = computed(() => []);
const headerTabs = computed(() => [{
const headerTabs = computed(() => {
const items = [];
items.push({
key: 'overview',
title: i18n.ts.overview,
}, {
}, {
key: 'emojis',
title: i18n.ts.customEmojis,
icon: 'ti ti-icons',
}, {
});
if (instance.federation !== 'none') {
items.push({
key: 'federation',
title: i18n.ts.federation,
icon: 'ti ti-whirl',
}, {
});
}
items.push({
key: 'charts',
title: i18n.ts.charts,
icon: 'ti ti-chart-line',
}]);
});
return items;
});
definePageMetadata(() => ({
title: i18n.ts.instanceInfo,

View file

@ -56,12 +56,18 @@ export function openInstanceMenu(ev: MouseEvent) {
text: i18n.ts.customEmojis,
icon: 'ti ti-icons',
to: '/about#emojis',
}, {
});
if (instance.federation !== 'none') {
menuItems.push({
type: 'link',
text: i18n.ts.federation,
icon: 'ti ti-whirl',
to: '/about#federation',
}, {
});
}
menuItems.push({
type: 'link',
text: i18n.ts.charts,
icon: 'ti ti-chart-line',