diff options
| author | Marie <marie@kaifa.ch> | 2024-02-19 10:47:42 +0100 |
|---|---|---|
| committer | Marie <marie@kaifa.ch> | 2024-02-19 10:47:42 +0100 |
| commit | 10bfc616706e2903e3a7fd2b461ccfff71b09029 (patch) | |
| tree | 852f49cd59c678d5a28bba755e0d75255b139c3a /packages/frontend/src/pages/admin | |
| parent | merge: Bridged error message for when you try search for a post and it fails ... (diff) | |
| parent | Fix(frontend): オートコンプリートが出るべき状況で出ない... (diff) | |
| download | sharkey-10bfc616706e2903e3a7fd2b461ccfff71b09029.tar.gz sharkey-10bfc616706e2903e3a7fd2b461ccfff71b09029.tar.bz2 sharkey-10bfc616706e2903e3a7fd2b461ccfff71b09029.zip | |
merge: upstream
Diffstat (limited to 'packages/frontend/src/pages/admin')
47 files changed, 146 insertions, 120 deletions
diff --git a/packages/frontend/src/pages/admin/RolesEditorFormula.vue b/packages/frontend/src/pages/admin/RolesEditorFormula.vue index 92010f771c..b285de8c90 100644 --- a/packages/frontend/src/pages/admin/RolesEditorFormula.vue +++ b/packages/frontend/src/pages/admin/RolesEditorFormula.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/_header_.vue b/packages/frontend/src/pages/admin/_header_.vue index 6f1a31616a..5c9c32c964 100644 --- a/packages/frontend/src/pages/admin/_header_.vue +++ b/packages/frontend/src/pages/admin/_header_.vue @@ -1,16 +1,16 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> <template> <div ref="el" class="fdidabkc" :style="{ background: bg }" @click="onClick"> - <template v-if="metadata"> + <template v-if="pageMetadata"> <div class="titleContainer" @click="showTabsPopup"> - <i v-if="metadata.icon" class="icon" :class="metadata.icon"></i> + <i v-if="pageMetadata.icon" class="icon" :class="pageMetadata.icon"></i> <div class="title"> - <div class="title">{{ metadata.title }}</div> + <div class="title">{{ pageMetadata.title }}</div> </div> </div> <div class="tabs"> @@ -39,7 +39,7 @@ import { popupMenu } from '@/os.js'; import { scrollToTop } from '@/scripts/scroll.js'; import MkButton from '@/components/MkButton.vue'; import { globalEvents } from '@/events.js'; -import { injectPageMetadata } from '@/scripts/page-metadata.js'; +import { injectReactiveMetadata } from '@/scripts/page-metadata.js'; type Tab = { key?: string | null; @@ -65,7 +65,7 @@ const emit = defineEmits<{ (ev: 'update:tab', key: string); }>(); -const metadata = injectPageMetadata(); +const pageMetadata = injectReactiveMetadata(); const el = shallowRef<HTMLElement>(null); const tabRefs = {}; @@ -118,7 +118,7 @@ function onTabClick(tab: Tab, ev: MouseEvent): void { } const calcBg = () => { - const rawBg = metadata?.bg ?? 'var(--bg)'; + const rawBg = pageMetadata.value?.bg ?? 'var(--bg)'; const tinyBg = tinycolor(rawBg.startsWith('var(') ? getComputedStyle(document.documentElement).getPropertyValue(rawBg.slice(4, -1)) : rawBg); tinyBg.setAlpha(0.85); bg.value = tinyBg.toRgbString(); diff --git a/packages/frontend/src/pages/admin/abuses.vue b/packages/frontend/src/pages/admin/abuses.vue index 92688989d2..42fcc3a598 100644 --- a/packages/frontend/src/pages/admin/abuses.vue +++ b/packages/frontend/src/pages/admin/abuses.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -87,8 +87,8 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.abuseReports, icon: 'ph-warning-circle ph-bold ph-lg', -}); +})); </script> diff --git a/packages/frontend/src/pages/admin/ads.vue b/packages/frontend/src/pages/admin/ads.vue index d2810f768e..6ec5abd2f2 100644 --- a/packages/frontend/src/pages/admin/ads.vue +++ b/packages/frontend/src/pages/admin/ads.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -255,10 +255,10 @@ const headerActions = computed(() => [{ const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.ads, icon: 'ph-flag ph-bold ph-lg', -}); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/announcements.vue b/packages/frontend/src/pages/admin/announcements.vue index a5755fc761..a8832b99fd 100644 --- a/packages/frontend/src/pages/admin/announcements.vue +++ b/packages/frontend/src/pages/admin/announcements.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -157,8 +157,8 @@ const headerActions = computed(() => [{ const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.announcements, icon: 'ph-megaphone ph-bold ph-lg', -}); +})); </script> diff --git a/packages/frontend/src/pages/admin/approvals.vue b/packages/frontend/src/pages/admin/approvals.vue index 7d0535bd7f..998e16681a 100644 --- a/packages/frontend/src/pages/admin/approvals.vue +++ b/packages/frontend/src/pages/admin/approvals.vue @@ -48,10 +48,10 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(computed(() => ({ +definePageMetadata(() => ({ title: i18n.ts.approvals, icon: 'ph-chalkboard-teacher ph-bold ph-lg', -}))); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/bot-protection.vue b/packages/frontend/src/pages/admin/bot-protection.vue index b39c825152..9a5e359f6a 100644 --- a/packages/frontend/src/pages/admin/bot-protection.vue +++ b/packages/frontend/src/pages/admin/bot-protection.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/branding.vue b/packages/frontend/src/pages/admin/branding.vue index d0fce6407b..beb11d2c9d 100644 --- a/packages/frontend/src/pages/admin/branding.vue +++ b/packages/frontend/src/pages/admin/branding.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -83,6 +83,16 @@ SPDX-License-Identifier: AGPL-3.0-only <template #caption>{{ i18n.ts.instanceDefaultThemeDescription }}</template> </MkTextarea> + <MkInput v-model="repositoryUrl" type="url"> + <template #prefix><i class="ti ti-link"></i></template> + <template #label>{{ i18n.ts.repositoryUrl }}</template> + </MkInput> + + <MkInput v-model="feedbackUrl" type="url"> + <template #prefix><i class="ti ti-link"></i></template> + <template #label>{{ i18n.ts.feedbackUrl }}</template> + </MkInput> + <MkTextarea v-model="manifestJsonOverride"> <template #label>{{ i18n.ts._serverSettings.manifestJsonOverride }}</template> </MkTextarea> @@ -129,6 +139,8 @@ const defaultLike = ref<string>(''); const serverErrorImageUrl = ref<string | null>(null); const infoImageUrl = ref<string | null>(null); const notFoundImageUrl = ref<string | null>(null); +const repositoryUrl = ref<string | null>(null); +const feedbackUrl = ref<string | null>(null); const manifestJsonOverride = ref<string>('{}'); async function init() { @@ -145,6 +157,8 @@ async function init() { serverErrorImageUrl.value = meta.serverErrorImageUrl; infoImageUrl.value = meta.infoImageUrl; notFoundImageUrl.value = meta.notFoundImageUrl; + repositoryUrl.value = meta.repositoryUrl; + feedbackUrl.value = meta.feedbackUrl; manifestJsonOverride.value = meta.manifestJsonOverride === '' ? '{}' : JSON.stringify(JSON.parse(meta.manifestJsonOverride), null, '\t'); } @@ -161,6 +175,8 @@ function save() { infoImageUrl: infoImageUrl.value === '' ? null : infoImageUrl.value, notFoundImageUrl: notFoundImageUrl.value === '' ? null : notFoundImageUrl.value, serverErrorImageUrl: serverErrorImageUrl.value === '' ? null : serverErrorImageUrl.value, + repositoryUrl: repositoryUrl.value === '' ? null : repositoryUrl.value, + feedbackUrl: feedbackUrl.value === '' ? null : feedbackUrl.value, manifestJsonOverride: manifestJsonOverride.value === '' ? '{}' : JSON.stringify(JSON5.parse(manifestJsonOverride.value)), }).then(() => { fetchInstance(); @@ -182,10 +198,10 @@ function chooseNewLike(ev: MouseEvent) { const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.branding, icon: 'ph-paint-roller ph-bold ph-lg', -}); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/database.vue b/packages/frontend/src/pages/admin/database.vue index 3dac6b3f1b..a64e07b4c7 100644 --- a/packages/frontend/src/pages/admin/database.vue +++ b/packages/frontend/src/pages/admin/database.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -33,8 +33,8 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.database, icon: 'ph-database ph-bold ph-lg', -}); +})); </script> diff --git a/packages/frontend/src/pages/admin/email-settings.vue b/packages/frontend/src/pages/admin/email-settings.vue index ff3185aec7..3632b3d343 100644 --- a/packages/frontend/src/pages/admin/email-settings.vue +++ b/packages/frontend/src/pages/admin/email-settings.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -130,10 +130,10 @@ function save() { const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.emailServer, icon: 'ph-envelope ph-bold ph-lg', -}); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/external-services.vue b/packages/frontend/src/pages/admin/external-services.vue index 27d732f560..9192c3d7d0 100644 --- a/packages/frontend/src/pages/admin/external-services.vue +++ b/packages/frontend/src/pages/admin/external-services.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -83,10 +83,10 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.externalServices, icon: 'ph-arrow-square-out ph-bold ph-lg', -}); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/federation.vue b/packages/frontend/src/pages/admin/federation.vue index 1888a0eb16..f8c4a3b272 100644 --- a/packages/frontend/src/pages/admin/federation.vue +++ b/packages/frontend/src/pages/admin/federation.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -105,10 +105,10 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(computed(() => ({ +definePageMetadata(() => ({ title: i18n.ts.federation, icon: 'ph-globe-hemisphere-west ph-bold ph-lg', -}))); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/files.vue b/packages/frontend/src/pages/admin/files.vue index 3d36b3bfa5..2a70f1c4ec 100644 --- a/packages/frontend/src/pages/admin/files.vue +++ b/packages/frontend/src/pages/admin/files.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -108,8 +108,8 @@ const headerActions = computed(() => [{ const headerTabs = computed(() => []); -definePageMetadata(computed(() => ({ +definePageMetadata(() => ({ title: i18n.ts.files, icon: 'ph-cloud ph-bold ph-lg', -}))); +})); </script> diff --git a/packages/frontend/src/pages/admin/index.vue b/packages/frontend/src/pages/admin/index.vue index 2b85190787..5a19e9a7c6 100644 --- a/packages/frontend/src/pages/admin/index.vue +++ b/packages/frontend/src/pages/admin/index.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only </template> <script lang="ts" setup> -import { ComputedRef, Ref, onActivated, onMounted, onUnmounted, provide, watch, ref, computed } from 'vue'; +import { onActivated, onMounted, onUnmounted, provide, watch, ref, computed } from 'vue'; import { i18n } from '@/i18n.js'; import MkSuperMenu from '@/components/MkSuperMenu.vue'; import MkInfo from '@/components/MkInfo.vue'; @@ -37,7 +37,7 @@ import { instance } from '@/instance.js'; import * as os from '@/os.js'; import { misskeyApi } from '@/scripts/misskey-api.js'; import { lookupUser, lookupUserByEmail } from '@/scripts/lookup-user.js'; -import { PageMetadata, definePageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.js'; +import { PageMetadata, definePageMetadata, provideMetadataReceiver, provideReactiveMetadata } from '@/scripts/page-metadata.js'; import { useRouter } from '@/router/supplier.js'; const isEmpty = (x: string | null) => x == null || x === ''; @@ -53,7 +53,7 @@ const indexInfo = { provide('shouldOmitHeaderTitle', false); const INFO = ref(indexInfo); -const childInfo: Ref<ComputedRef<PageMetadata> | null> = ref(null); +const childInfo = ref<null | PageMetadata>(null); const narrow = ref(false); const view = ref(null); const el = ref<HTMLDivElement | null>(null); @@ -272,14 +272,16 @@ watch(router.currentRef, (to) => { } }); -provideMetadataReceiver((info) => { +provideMetadataReceiver((metadataGetter) => { + const info = metadataGetter(); if (info == null) { childInfo.value = null; } else { childInfo.value = info; - INFO.value.needWideArea = info.value.needWideArea ?? undefined; + INFO.value.needWideArea = info.needWideArea ?? undefined; } }); +provideReactiveMetadata(INFO); function invite() { misskeyApi('admin/invite/create').then(x => { @@ -333,7 +335,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(INFO.value); +definePageMetadata(() => INFO.value); defineExpose({ header: { diff --git a/packages/frontend/src/pages/admin/instance-block.vue b/packages/frontend/src/pages/admin/instance-block.vue index b01b9bd388..3e5dba40c2 100644 --- a/packages/frontend/src/pages/admin/instance-block.vue +++ b/packages/frontend/src/pages/admin/instance-block.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -66,8 +66,8 @@ const headerTabs = computed(() => [{ icon: 'ph-eye-closed ph-bold ph-lg', }]); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.instanceBlocking, icon: 'ph-prohibit ph-bold ph-lg', -}); +})); </script> diff --git a/packages/frontend/src/pages/admin/invites.vue b/packages/frontend/src/pages/admin/invites.vue index 0cd1c63e07..7b8a1e1d4e 100644 --- a/packages/frontend/src/pages/admin/invites.vue +++ b/packages/frontend/src/pages/admin/invites.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -113,10 +113,10 @@ function deleted(id: string) { const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.invite, icon: 'ph-user-plus ph-bold ph-lg', -}); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/moderation.vue b/packages/frontend/src/pages/admin/moderation.vue index 965793bf4f..32c1df3c7e 100644 --- a/packages/frontend/src/pages/admin/moderation.vue +++ b/packages/frontend/src/pages/admin/moderation.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -133,10 +133,10 @@ function save() { const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.moderation, icon: 'ph-shield ph-bold ph-lg', -}); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/modlog.ModLog.vue b/packages/frontend/src/pages/admin/modlog.ModLog.vue index 322d2d531c..e869c94c06 100644 --- a/packages/frontend/src/pages/admin/modlog.ModLog.vue +++ b/packages/frontend/src/pages/admin/modlog.ModLog.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/modlog.vue b/packages/frontend/src/pages/admin/modlog.vue index acb0336491..4651bb4516 100644 --- a/packages/frontend/src/pages/admin/modlog.vue +++ b/packages/frontend/src/pages/admin/modlog.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -54,14 +54,12 @@ const pagination = { })), }; -console.log(Misskey); - const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.moderationLogs, icon: 'ph-list ph-bold ph-lg-search', -}); +})); </script> diff --git a/packages/frontend/src/pages/admin/object-storage.vue b/packages/frontend/src/pages/admin/object-storage.vue index c412f5ba1d..714a85b60f 100644 --- a/packages/frontend/src/pages/admin/object-storage.vue +++ b/packages/frontend/src/pages/admin/object-storage.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -149,10 +149,10 @@ function save() { const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.objectStorage, icon: 'ph-cloud ph-bold ph-lg', -}); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/other-settings.vue b/packages/frontend/src/pages/admin/other-settings.vue index 690076d111..cac2cc0bbe 100644 --- a/packages/frontend/src/pages/admin/other-settings.vue +++ b/packages/frontend/src/pages/admin/other-settings.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -106,8 +106,8 @@ const headerActions = computed(() => [{ const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.other, icon: 'ph-faders ph-bold ph-lg', -}); +})); </script> diff --git a/packages/frontend/src/pages/admin/overview.active-users.vue b/packages/frontend/src/pages/admin/overview.active-users.vue index 8acc5786b2..79dd6fd5fd 100644 --- a/packages/frontend/src/pages/admin/overview.active-users.vue +++ b/packages/frontend/src/pages/admin/overview.active-users.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/overview.ap-requests.vue b/packages/frontend/src/pages/admin/overview.ap-requests.vue index 694be9a590..d4c83f21b6 100644 --- a/packages/frontend/src/pages/admin/overview.ap-requests.vue +++ b/packages/frontend/src/pages/admin/overview.ap-requests.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/overview.federation.vue b/packages/frontend/src/pages/admin/overview.federation.vue index 5d74297106..3a3550c6c0 100644 --- a/packages/frontend/src/pages/admin/overview.federation.vue +++ b/packages/frontend/src/pages/admin/overview.federation.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/overview.heatmap.vue b/packages/frontend/src/pages/admin/overview.heatmap.vue index 8e3c809353..7b2b142b16 100644 --- a/packages/frontend/src/pages/admin/overview.heatmap.vue +++ b/packages/frontend/src/pages/admin/overview.heatmap.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/overview.instances.vue b/packages/frontend/src/pages/admin/overview.instances.vue index 8d731cbc90..a09db2a6d5 100644 --- a/packages/frontend/src/pages/admin/overview.instances.vue +++ b/packages/frontend/src/pages/admin/overview.instances.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/overview.moderators.vue b/packages/frontend/src/pages/admin/overview.moderators.vue index 75b731996b..f0691534c8 100644 --- a/packages/frontend/src/pages/admin/overview.moderators.vue +++ b/packages/frontend/src/pages/admin/overview.moderators.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/overview.pie.vue b/packages/frontend/src/pages/admin/overview.pie.vue index 95c1f57b29..c7a9f2a702 100644 --- a/packages/frontend/src/pages/admin/overview.pie.vue +++ b/packages/frontend/src/pages/admin/overview.pie.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/overview.queue.chart.vue b/packages/frontend/src/pages/admin/overview.queue.chart.vue index 38309e351a..2efc17c888 100644 --- a/packages/frontend/src/pages/admin/overview.queue.chart.vue +++ b/packages/frontend/src/pages/admin/overview.queue.chart.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/overview.queue.vue b/packages/frontend/src/pages/admin/overview.queue.vue index b6b3bf194a..c7478f252a 100644 --- a/packages/frontend/src/pages/admin/overview.queue.vue +++ b/packages/frontend/src/pages/admin/overview.queue.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/overview.retention.vue b/packages/frontend/src/pages/admin/overview.retention.vue index 514db663ab..adcb9d5948 100644 --- a/packages/frontend/src/pages/admin/overview.retention.vue +++ b/packages/frontend/src/pages/admin/overview.retention.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/overview.stats.vue b/packages/frontend/src/pages/admin/overview.stats.vue index 91e3e02417..27ae52c32c 100644 --- a/packages/frontend/src/pages/admin/overview.stats.vue +++ b/packages/frontend/src/pages/admin/overview.stats.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/overview.users.vue b/packages/frontend/src/pages/admin/overview.users.vue index 530ca0933e..408be88d47 100644 --- a/packages/frontend/src/pages/admin/overview.users.vue +++ b/packages/frontend/src/pages/admin/overview.users.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/overview.vue b/packages/frontend/src/pages/admin/overview.vue index 39fea99109..bf766600e5 100644 --- a/packages/frontend/src/pages/admin/overview.vue +++ b/packages/frontend/src/pages/admin/overview.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -184,10 +184,10 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.dashboard, icon: 'ph-gauge ph-bold ph-lg', -}); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/proxy-account.vue b/packages/frontend/src/pages/admin/proxy-account.vue index 32e2bc7cc2..7cce1032d8 100644 --- a/packages/frontend/src/pages/admin/proxy-account.vue +++ b/packages/frontend/src/pages/admin/proxy-account.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -64,8 +64,8 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.proxyAccount, icon: 'ph-ghost ph-bold ph-lg', -}); +})); </script> diff --git a/packages/frontend/src/pages/admin/queue.chart.chart.vue b/packages/frontend/src/pages/admin/queue.chart.chart.vue index 566670c843..cc18898172 100644 --- a/packages/frontend/src/pages/admin/queue.chart.chart.vue +++ b/packages/frontend/src/pages/admin/queue.chart.chart.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/queue.chart.vue b/packages/frontend/src/pages/admin/queue.chart.vue index dc45a211ae..f7b4b27a68 100644 --- a/packages/frontend/src/pages/admin/queue.chart.vue +++ b/packages/frontend/src/pages/admin/queue.chart.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/queue.vue b/packages/frontend/src/pages/admin/queue.vue index 245c55f6e7..ba6911a943 100644 --- a/packages/frontend/src/pages/admin/queue.vue +++ b/packages/frontend/src/pages/admin/queue.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -68,8 +68,8 @@ const headerTabs = computed(() => [{ title: 'Inbox', }]); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.jobQueue, icon: 'ph-clock ph-bold ph-lg-play', -}); +})); </script> diff --git a/packages/frontend/src/pages/admin/relays.vue b/packages/frontend/src/pages/admin/relays.vue index ca24d01cb0..6ff0d8bd22 100644 --- a/packages/frontend/src/pages/admin/relays.vue +++ b/packages/frontend/src/pages/admin/relays.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -84,10 +84,10 @@ const headerActions = computed(() => [{ const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.relays, icon: 'ph-planet ph-bold ph-lg', -}); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/roles.edit.vue b/packages/frontend/src/pages/admin/roles.edit.vue index ff6fb360f4..e6023d2f2a 100644 --- a/packages/frontend/src/pages/admin/roles.edit.vue +++ b/packages/frontend/src/pages/admin/roles.edit.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -87,11 +87,8 @@ async function save() { const headerTabs = computed(() => []); -definePageMetadata(computed(() => role.value ? { - title: i18n.ts._role.edit + ': ' + role.value.name, - icon: 'ph-seal-check ph-bold ph-lg', -} : { - title: i18n.ts._role.new, +definePageMetadata(() => ({ + title: role.value ? `${i18n.ts._role.edit}: ${role.value.name}` : i18n.ts._role.new, icon: 'ph-seal-check ph-bold ph-lg', })); </script> diff --git a/packages/frontend/src/pages/admin/roles.editor.vue b/packages/frontend/src/pages/admin/roles.editor.vue index 164510fd24..3cc086baa1 100644 --- a/packages/frontend/src/pages/admin/roles.editor.vue +++ b/packages/frontend/src/pages/admin/roles.editor.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> diff --git a/packages/frontend/src/pages/admin/roles.role.vue b/packages/frontend/src/pages/admin/roles.role.vue index fdfd6e8f25..cda524f787 100644 --- a/packages/frontend/src/pages/admin/roles.role.vue +++ b/packages/frontend/src/pages/admin/roles.role.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -170,10 +170,10 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(computed(() => ({ - title: i18n.ts.role + ': ' + role.name, +definePageMetadata(() => ({ + title: `${i18n.ts.role}: ${role.name}`, icon: 'ph-seal-check ph-bold ph-lg', -}))); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/roles.vue b/packages/frontend/src/pages/admin/roles.vue index 29935974c5..9553e72c8d 100644 --- a/packages/frontend/src/pages/admin/roles.vue +++ b/packages/frontend/src/pages/admin/roles.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -290,10 +290,10 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(computed(() => ({ +definePageMetadata(() => ({ title: i18n.ts.roles, icon: 'ph-seal-check ph-bold ph-lg', -}))); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/security.vue b/packages/frontend/src/pages/admin/security.vue index b1083636db..d3ab4313a5 100644 --- a/packages/frontend/src/pages/admin/security.vue +++ b/packages/frontend/src/pages/admin/security.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -163,8 +163,8 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.security, icon: 'ph-lock ph-bold ph-lg', -}); +})); </script> diff --git a/packages/frontend/src/pages/admin/server-rules.vue b/packages/frontend/src/pages/admin/server-rules.vue index 6aecb43399..e1b4d6b037 100644 --- a/packages/frontend/src/pages/admin/server-rules.vue +++ b/packages/frontend/src/pages/admin/server-rules.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -67,10 +67,10 @@ const remove = (index: number): void => { const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.serverRules, - icon: 'ph-check ph-bold ph-lgbox', -}); + icon: 'ph-check ph-bold ph-lg', +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/settings.vue b/packages/frontend/src/pages/admin/settings.vue index f11d37ab23..88a1e33179 100644 --- a/packages/frontend/src/pages/admin/settings.vue +++ b/packages/frontend/src/pages/admin/settings.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -34,6 +34,16 @@ SPDX-License-Identifier: AGPL-3.0-only </MkInput> </FormSplit> + <MkInput v-model="repositoryUrl" type="url"> + <template #label>{{ i18n.ts.repositoryUrl }}</template> + <template #prefix><i class="ti ti-link"></i></template> + <template #caption>{{ i18n.ts.repositoryUrlDescription }}</template> + </MkInput> + + <MkInfo v-if="!instance.providesTarball && !repositoryUrl" warn> + {{ i18n.ts.repositoryUrlOrTarballRequired }} + </MkInfo> + <MkInput v-model="impressumUrl" type="url"> <template #label>{{ i18n.ts.impressumUrl }}</template> <template #prefix><i class="ph-link ph-bold ph-lg"></i></template> @@ -164,7 +174,7 @@ import FormSplit from '@/components/form/split.vue'; import FormSuspense from '@/components/form/suspense.vue'; import * as os from '@/os.js'; import { misskeyApi } from '@/scripts/misskey-api.js'; -import { fetchInstance } from '@/instance.js'; +import { fetchInstance, instance } from '@/instance.js'; import { i18n } from '@/i18n.js'; import { definePageMetadata } from '@/scripts/page-metadata.js'; import MkButton from '@/components/MkButton.vue'; @@ -174,6 +184,7 @@ const shortName = ref<string | null>(null); const description = ref<string | null>(null); const maintainerName = ref<string | null>(null); const maintainerEmail = ref<string | null>(null); +const repositoryUrl = ref<string | null>(null); const impressumUrl = ref<string | null>(null); const donationUrl = ref<string | null>(null); const pinnedUsers = ref<string>(''); @@ -197,6 +208,7 @@ async function init(): Promise<void> { description.value = meta.description; maintainerName.value = meta.maintainerName; maintainerEmail.value = meta.maintainerEmail; + repositoryUrl.value = meta.repositoryUrl; impressumUrl.value = meta.impressumUrl; donationUrl.value = meta.donationUrl; pinnedUsers.value = meta.pinnedUsers.join('\n'); @@ -221,6 +233,7 @@ async function save(): void { description: description.value, maintainerName: maintainerName.value, maintainerEmail: maintainerEmail.value, + repositoryUrl: repositoryUrl.value, impressumUrl: impressumUrl.value, donationUrl: donationUrl.value, pinnedUsers: pinnedUsers.value.split('\n'), @@ -243,10 +256,10 @@ async function save(): void { const headerTabs = computed(() => []); -definePageMetadata({ +definePageMetadata(() => ({ title: i18n.ts.general, icon: 'ph-gear ph-bold ph-lg', -}); +})); </script> <style lang="scss" module> diff --git a/packages/frontend/src/pages/admin/users.vue b/packages/frontend/src/pages/admin/users.vue index 51edfd5263..626346a998 100644 --- a/packages/frontend/src/pages/admin/users.vue +++ b/packages/frontend/src/pages/admin/users.vue @@ -1,5 +1,5 @@ <!-- -SPDX-FileCopyrightText: syuilo and other misskey contributors +SPDX-FileCopyrightText: syuilo and misskey-project SPDX-License-Identifier: AGPL-3.0-only --> @@ -138,10 +138,10 @@ const headerActions = computed(() => [{ const headerTabs = computed(() => []); -definePageMetadata(computed(() => ({ +definePageMetadata(() => ({ title: i18n.ts.users, icon: 'ph-users ph-bold ph-lg', -}))); +})); </script> <style lang="scss" module> |