diff --git a/packages/frontend/src/components/MkPageWindow.vue b/packages/frontend/src/components/MkPageWindow.vue index 780b434456..5c0fa60847 100644 --- a/packages/frontend/src/components/MkPageWindow.vue +++ b/packages/frontend/src/components/MkPageWindow.vue @@ -32,14 +32,14 @@ SPDX-License-Identifier: AGPL-3.0-only import { computed, onMounted, onUnmounted, provide, ref, shallowRef } from 'vue'; import { url } from '@@/js/config.js'; import { getScrollContainer } from '@@/js/scroll.js'; -import type { PageMetadata } from '@/utility/page-metadata.js'; +import type { PageMetadata } from '@/page.js'; import RouterView from '@/components/global/RouterView.vue'; import MkWindow from '@/components/MkWindow.vue'; import { popout as _popout } from '@/utility/popout.js'; import { copyToClipboard } from '@/utility/copy-to-clipboard.js'; import { useScrollPositionManager } from '@/nirax.js'; import { i18n } from '@/i18n.js'; -import { provideMetadataReceiver, provideReactiveMetadata } from '@/utility/page-metadata.js'; +import { provideMetadataReceiver, provideReactiveMetadata } from '@/page.js'; import { openingWindowsCount } from '@/os.js'; import { claimAchievement } from '@/utility/achievements.js'; import { useRouterFactory } from '@/router/supplier.js'; diff --git a/packages/frontend/src/components/global/MkPageHeader.vue b/packages/frontend/src/components/global/MkPageHeader.vue index d3c64bf85a..728e37cf51 100644 --- a/packages/frontend/src/components/global/MkPageHeader.vue +++ b/packages/frontend/src/components/global/MkPageHeader.vue @@ -47,9 +47,9 @@ import { scrollToTop } from '@@/js/scroll.js'; import XTabs from './MkPageHeader.tabs.vue'; import type { Tab } from './MkPageHeader.tabs.vue'; import type { PageHeaderItem } from '@/types/page-header.js'; -import type { PageMetadata } from '@/utility/page-metadata.js'; +import type { PageMetadata } from '@/page.js'; import { globalEvents } from '@/events.js'; -import { injectReactiveMetadata } from '@/utility/page-metadata.js'; +import { injectReactiveMetadata } from '@/page.js'; import { $i, openAccountMenu as openAccountMenu_ } from '@/account.js'; const props = withDefaults(defineProps<{ diff --git a/packages/frontend/src/utility/page-metadata.ts b/packages/frontend/src/page.ts similarity index 95% rename from packages/frontend/src/utility/page-metadata.ts rename to packages/frontend/src/page.ts index 671751147c..f3ec09a16f 100644 --- a/packages/frontend/src/utility/page-metadata.ts +++ b/packages/frontend/src/page.ts @@ -35,7 +35,7 @@ const getMetadata = (): Ref | undefined => { return inject>(METADATA_KEY); }; -export const definePageMetadata = (maybeRefOrGetterMetadata: MaybeRefOrGetter): void => { +export const definePage = (maybeRefOrGetterMetadata: MaybeRefOrGetter): void => { const metadataRef = ref(toValue(maybeRefOrGetterMetadata)); const metadataGetter = () => metadataRef.value; const receiver = getReceiver(); diff --git a/packages/frontend/src/pages/_error_.vue b/packages/frontend/src/pages/_error_.vue index 05fa8a8a6b..066980db1f 100644 --- a/packages/frontend/src/pages/_error_.vue +++ b/packages/frontend/src/pages/_error_.vue @@ -33,7 +33,7 @@ import MkLink from '@/components/MkLink.vue'; import { misskeyApi } from '@/utility/misskey-api.js'; import { unisonReload } from '@/utility/unison-reload.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { miLocalStorage } from '@/local-storage.js'; import { prefer } from '@/preferences.js'; import { serverErrorImageUrl } from '@/instance.js'; @@ -67,7 +67,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.error, icon: 'ti ti-alert-triangle', })); diff --git a/packages/frontend/src/pages/about-misskey.vue b/packages/frontend/src/pages/about-misskey.vue index 5316398ba4..55d703b9ea 100644 --- a/packages/frontend/src/pages/about-misskey.vue +++ b/packages/frontend/src/pages/about-misskey.vue @@ -145,7 +145,7 @@ import { i18n } from '@/i18n.js'; import { instance } from '@/instance.js'; import { store } from '@/store.js'; import * as os from '@/os.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { claimAchievement, claimedAchievements } from '@/utility/achievements.js'; import { $i } from '@/account.js'; @@ -450,7 +450,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.aboutMisskey, icon: null, })); diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue index 11a2ed4062..d6833a3d97 100644 --- a/packages/frontend/src/pages/about.vue +++ b/packages/frontend/src/pages/about.vue @@ -28,7 +28,7 @@ import { computed, defineAsyncComponent, ref, watch } from 'vue'; import { instance } from '@/instance.js'; import { i18n } from '@/i18n.js'; import { claimAchievement } from '@/utility/achievements.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue'; const XOverview = defineAsyncComponent(() => import('@/pages/about.overview.vue')); @@ -81,7 +81,7 @@ const headerTabs = computed(() => { return items; }); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.instanceInfo, icon: 'ti ti-info-circle', })); diff --git a/packages/frontend/src/pages/achievements.vue b/packages/frontend/src/pages/achievements.vue index f23046b476..53ce75f9bf 100644 --- a/packages/frontend/src/pages/achievements.vue +++ b/packages/frontend/src/pages/achievements.vue @@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only import { onActivated, onDeactivated, onMounted, onUnmounted } from 'vue'; import MkAchievements from '@/components/MkAchievements.vue'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { $i } from '@/account.js'; import { claimAchievement } from '@/utility/achievements.js'; @@ -48,7 +48,7 @@ onDeactivated(() => { } }); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.achievements, icon: 'ti ti-medal', })); diff --git a/packages/frontend/src/pages/admin-file.vue b/packages/frontend/src/pages/admin-file.vue index 46a5388e7e..0af28e94fa 100644 --- a/packages/frontend/src/pages/admin-file.vue +++ b/packages/frontend/src/pages/admin-file.vue @@ -85,7 +85,7 @@ import bytes from '@/filters/bytes.js'; import * as os from '@/os.js'; import { misskeyApi } from '@/utility/misskey-api.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { iAmAdmin, iAmModerator } from '@/account.js'; const tab = ref('overview'); @@ -161,7 +161,7 @@ const headerTabs = computed(() => [{ icon: 'ti ti-code', }]); -definePageMetadata(() => ({ +definePage(() => ({ title: file.value ? `${i18n.ts.file}: ${file.value.name}` : i18n.ts.file, icon: 'ti ti-file', })); diff --git a/packages/frontend/src/pages/admin-user.vue b/packages/frontend/src/pages/admin-user.vue index e1da305b84..2efae999ce 100644 --- a/packages/frontend/src/pages/admin-user.vue +++ b/packages/frontend/src/pages/admin-user.vue @@ -231,7 +231,7 @@ import MkInfo from '@/components/MkInfo.vue'; import * as os from '@/os.js'; import { misskeyApi } from '@/utility/misskey-api.js'; import { acct } from '@/filters/user.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { i18n } from '@/i18n.js'; import { iAmAdmin, $i, iAmModerator } from '@/account.js'; import MkRolePreview from '@/components/MkRolePreview.vue'; @@ -545,7 +545,7 @@ const headerTabs = computed(() => isSystem.value ? [{ icon: 'ti ti-code', }]); -definePageMetadata(() => ({ +definePage(() => ({ title: user.value ? acct(user.value) : i18n.ts.userInfo, icon: 'ti ti-user-exclamation', })); diff --git a/packages/frontend/src/pages/admin/_header_.vue b/packages/frontend/src/pages/admin/_header_.vue index d5dac40e86..1382cad9a4 100644 --- a/packages/frontend/src/pages/admin/_header_.vue +++ b/packages/frontend/src/pages/admin/_header_.vue @@ -39,7 +39,7 @@ import { scrollToTop } from '@@/js/scroll.js'; import { popupMenu } from '@/os.js'; import MkButton from '@/components/MkButton.vue'; import { globalEvents } from '@/events.js'; -import { injectReactiveMetadata } from '@/utility/page-metadata.js'; +import { injectReactiveMetadata } from '@/page.js'; type Tab = { key?: string | null; diff --git a/packages/frontend/src/pages/admin/abuses.vue b/packages/frontend/src/pages/admin/abuses.vue index 8b396c1821..e4119bb62d 100644 --- a/packages/frontend/src/pages/admin/abuses.vue +++ b/packages/frontend/src/pages/admin/abuses.vue @@ -65,7 +65,7 @@ import MkSelect from '@/components/MkSelect.vue'; import MkPagination from '@/components/MkPagination.vue'; import XAbuseReport from '@/components/MkAbuseReport.vue'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import MkButton from '@/components/MkButton.vue'; import MkInfo from '@/components/MkInfo.vue'; import { store } from '@/store.js'; @@ -100,7 +100,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.abuseReports, icon: 'ti ti-exclamation-circle', })); diff --git a/packages/frontend/src/pages/admin/ads.vue b/packages/frontend/src/pages/admin/ads.vue index d707e15c61..ebc3d23296 100644 --- a/packages/frontend/src/pages/admin/ads.vue +++ b/packages/frontend/src/pages/admin/ads.vue @@ -98,7 +98,7 @@ import FormSplit from '@/components/form/split.vue'; import * as os from '@/os.js'; import { misskeyApi } from '@/utility/misskey-api.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; const ads = ref([]); @@ -255,7 +255,7 @@ const headerActions = computed(() => [{ const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.ads, icon: 'ti ti-ad', })); diff --git a/packages/frontend/src/pages/admin/announcements.vue b/packages/frontend/src/pages/admin/announcements.vue index 48a072bc8a..f6b331455f 100644 --- a/packages/frontend/src/pages/admin/announcements.vue +++ b/packages/frontend/src/pages/admin/announcements.vue @@ -96,7 +96,7 @@ import MkInfo from '@/components/MkInfo.vue'; import * as os from '@/os.js'; import { misskeyApi } from '@/utility/misskey-api.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import MkFolder from '@/components/MkFolder.vue'; import MkTextarea from '@/components/MkTextarea.vue'; @@ -199,7 +199,7 @@ const headerActions = computed(() => [{ const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.announcements, icon: 'ti ti-speakerphone', })); diff --git a/packages/frontend/src/pages/admin/branding.vue b/packages/frontend/src/pages/admin/branding.vue index 02f08ecc05..0ac45914e8 100644 --- a/packages/frontend/src/pages/admin/branding.vue +++ b/packages/frontend/src/pages/admin/branding.vue @@ -114,7 +114,7 @@ import * as os from '@/os.js'; import { misskeyApi } from '@/utility/misskey-api.js'; import { instance, fetchInstance } from '@/instance.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import MkButton from '@/components/MkButton.vue'; import MkColorInput from '@/components/MkColorInput.vue'; import { host } from '@@/js/config.js'; @@ -175,7 +175,7 @@ function save() { const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.branding, icon: 'ti ti-paint', })); diff --git a/packages/frontend/src/pages/admin/custom-emojis-manager2.vue b/packages/frontend/src/pages/admin/custom-emojis-manager2.vue index f75393baac..7667206fa8 100644 --- a/packages/frontend/src/pages/admin/custom-emojis-manager2.vue +++ b/packages/frontend/src/pages/admin/custom-emojis-manager2.vue @@ -18,7 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only diff --git a/packages/frontend/src/pages/flash/flash-index.vue b/packages/frontend/src/pages/flash/flash-index.vue index 688b5c2ac6..3cd7c46c1e 100644 --- a/packages/frontend/src/pages/flash/flash-index.vue +++ b/packages/frontend/src/pages/flash/flash-index.vue @@ -46,7 +46,7 @@ import MkPagination from '@/components/MkPagination.vue'; import MkButton from '@/components/MkButton.vue'; import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { useRouter } from '@/router/supplier.js'; const router = useRouter(); @@ -91,7 +91,7 @@ const headerTabs = computed(() => [{ icon: 'ti ti-heart', }]); -definePageMetadata(() => ({ +definePage(() => ({ title: 'Play', icon: 'ti ti-player-play', })); diff --git a/packages/frontend/src/pages/flash/flash.vue b/packages/frontend/src/pages/flash/flash.vue index e2e7cc6f74..6bce6689d4 100644 --- a/packages/frontend/src/pages/flash/flash.vue +++ b/packages/frontend/src/pages/flash/flash.vue @@ -73,7 +73,7 @@ import MkButton from '@/components/MkButton.vue'; import * as os from '@/os.js'; import { misskeyApi } from '@/utility/misskey-api.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import MkAsUi from '@/components/MkAsUi.vue'; import { registerAsUiLib } from '@/aiscript/ui.js'; import { aiScriptReadline, createAiScriptEnv } from '@/aiscript/api.js'; @@ -304,7 +304,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: flash.value ? flash.value.title : 'Play', ...flash.value ? { avatar: flash.value.user, diff --git a/packages/frontend/src/pages/follow-requests.vue b/packages/frontend/src/pages/follow-requests.vue index 43532026fc..bd48b882d2 100644 --- a/packages/frontend/src/pages/follow-requests.vue +++ b/packages/frontend/src/pages/follow-requests.vue @@ -52,7 +52,7 @@ import MkButton from '@/components/MkButton.vue'; import { userPage, acct } from '@/filters/user.js'; import * as os from '@/os.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { infoImageUrl } from '@/instance.js'; import { $i } from '@/account.js'; import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue'; @@ -105,7 +105,7 @@ const headerTabs = computed(() => [ const tab = ref($i?.isLocked ? 'list' : 'sent'); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.followRequests, icon: 'ti ti-user-plus', })); diff --git a/packages/frontend/src/pages/gallery/edit.vue b/packages/frontend/src/pages/gallery/edit.vue index 974dd18224..9cd59d0aa5 100644 --- a/packages/frontend/src/pages/gallery/edit.vue +++ b/packages/frontend/src/pages/gallery/edit.vue @@ -48,7 +48,7 @@ import FormSuspense from '@/components/form/suspense.vue'; import { selectFiles } from '@/utility/select-file.js'; import * as os from '@/os.js'; import { misskeyApi } from '@/utility/misskey-api.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { i18n } from '@/i18n.js'; import { useRouter } from '@/router/supplier.js'; @@ -122,7 +122,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: props.postId ? i18n.ts.edit : i18n.ts.postToGallery, icon: 'ti ti-pencil', })); diff --git a/packages/frontend/src/pages/gallery/index.vue b/packages/frontend/src/pages/gallery/index.vue index 49b7e349e8..14b3f7bf3c 100644 --- a/packages/frontend/src/pages/gallery/index.vue +++ b/packages/frontend/src/pages/gallery/index.vue @@ -52,7 +52,7 @@ import MkFoldableSection from '@/components/MkFoldableSection.vue'; import MkPagination from '@/components/MkPagination.vue'; import MkGalleryPostPreview from '@/components/MkGalleryPostPreview.vue'; import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { i18n } from '@/i18n.js'; import { useRouter } from '@/router/supplier.js'; @@ -119,7 +119,7 @@ const headerTabs = computed(() => [{ icon: 'ti ti-edit', }]); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.gallery, icon: 'ti ti-icons', })); diff --git a/packages/frontend/src/pages/gallery/post.vue b/packages/frontend/src/pages/gallery/post.vue index 81c63b0f4e..56ddb820cf 100644 --- a/packages/frontend/src/pages/gallery/post.vue +++ b/packages/frontend/src/pages/gallery/post.vue @@ -75,7 +75,7 @@ import MkPagination from '@/components/MkPagination.vue'; import MkGalleryPostPreview from '@/components/MkGalleryPostPreview.vue'; import MkFollowButton from '@/components/MkFollowButton.vue'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { prefer } from '@/preferences.js'; import { $i } from '@/account.js'; import { isSupportShare } from '@/utility/navigator.js'; @@ -208,7 +208,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: post.value ? post.value.title : i18n.ts.gallery, ...post.value ? { avatar: post.value.user, diff --git a/packages/frontend/src/pages/games.vue b/packages/frontend/src/pages/games.vue index f6eb8a5d7e..48adead383 100644 --- a/packages/frontend/src/pages/games.vue +++ b/packages/frontend/src/pages/games.vue @@ -25,9 +25,9 @@ SPDX-License-Identifier: AGPL-3.0-only diff --git a/packages/frontend/src/pages/settings/mute-block.vue b/packages/frontend/src/pages/settings/mute-block.vue index 6fa2b5e689..d9c190f546 100644 --- a/packages/frontend/src/pages/settings/mute-block.vue +++ b/packages/frontend/src/pages/settings/mute-block.vue @@ -178,7 +178,7 @@ import XWordMute from './mute-block.word-mute.vue'; import MkPagination from '@/components/MkPagination.vue'; import { userPage } from '@/filters/user.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import MkUserCardMini from '@/components/MkUserCardMini.vue'; import * as os from '@/os.js'; import { instance, infoImageUrl } from '@/instance.js'; @@ -287,7 +287,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.muteAndBlock, icon: 'ti ti-ban', })); diff --git a/packages/frontend/src/pages/settings/navbar.vue b/packages/frontend/src/pages/settings/navbar.vue index 28e6bcc161..706cb731eb 100644 --- a/packages/frontend/src/pages/settings/navbar.vue +++ b/packages/frontend/src/pages/settings/navbar.vue @@ -56,7 +56,7 @@ import { navbarItemDef } from '@/navbar.js'; import { store } from '@/store.js'; import { reloadAsk } from '@/utility/reload-ask.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { prefer } from '@/preferences.js'; import { PREF_DEF } from '@/preferences/def.js'; @@ -106,7 +106,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.navbar, icon: 'ti ti-list', })); diff --git a/packages/frontend/src/pages/settings/notifications.vue b/packages/frontend/src/pages/settings/notifications.vue index dfbcf91a3f..ca0de0b4b1 100644 --- a/packages/frontend/src/pages/settings/notifications.vue +++ b/packages/frontend/src/pages/settings/notifications.vue @@ -73,7 +73,7 @@ import * as os from '@/os.js'; import { signinRequired } from '@/account.js'; import { misskeyApi } from '@/utility/misskey-api.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import MkPushNotificationAllowButton from '@/components/MkPushNotificationAllowButton.vue'; import { notificationTypes } from '@@/js/const.js'; @@ -138,7 +138,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.notifications, icon: 'ti ti-bell', })); diff --git a/packages/frontend/src/pages/settings/other.vue b/packages/frontend/src/pages/settings/other.vue index f2d998579f..835739a6c6 100644 --- a/packages/frontend/src/pages/settings/other.vue +++ b/packages/frontend/src/pages/settings/other.vue @@ -120,7 +120,7 @@ import { misskeyApi } from '@/utility/misskey-api.js'; import { store } from '@/store.js'; import { signout, signinRequired } from '@/account.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { reloadAsk } from '@/utility/reload-ask.js'; import FormSection from '@/components/form/section.vue'; import { prefer } from '@/preferences.js'; @@ -175,7 +175,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.other, icon: 'ti ti-dots', })); diff --git a/packages/frontend/src/pages/settings/plugin.install.vue b/packages/frontend/src/pages/settings/plugin.install.vue index 915eb8031c..e984ed7f8a 100644 --- a/packages/frontend/src/pages/settings/plugin.install.vue +++ b/packages/frontend/src/pages/settings/plugin.install.vue @@ -24,7 +24,7 @@ import MkButton from '@/components/MkButton.vue'; import FormInfo from '@/components/MkInfo.vue'; import * as os from '@/os.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { installPlugin } from '@/plugin.js'; import { useRouter } from '@/router/supplier.js'; @@ -53,7 +53,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts._plugin.install, icon: 'ti ti-download', })); diff --git a/packages/frontend/src/pages/settings/plugin.vue b/packages/frontend/src/pages/settings/plugin.vue index 32c35e3670..93a0e8a850 100644 --- a/packages/frontend/src/pages/settings/plugin.vue +++ b/packages/frontend/src/pages/settings/plugin.vue @@ -99,7 +99,7 @@ import MkCode from '@/components/MkCode.vue'; import MkFolder from '@/components/MkFolder.vue'; import MkKeyValue from '@/components/MkKeyValue.vue'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { changePluginActive, configPlugin, pluginLogs, uninstallPlugin, reloadPlugin } from '@/plugin.js'; import { prefer } from '@/preferences.js'; import * as os from '@/os.js'; @@ -138,7 +138,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.plugins, icon: 'ti ti-plug', })); diff --git a/packages/frontend/src/pages/settings/preferences.vue b/packages/frontend/src/pages/settings/preferences.vue index f3f52d0914..58e01df633 100644 --- a/packages/frontend/src/pages/settings/preferences.vue +++ b/packages/frontend/src/pages/settings/preferences.vue @@ -377,7 +377,7 @@ import * as os from '@/os.js'; import { misskeyApi } from '@/utility/misskey-api.js'; import { reloadAsk } from '@/utility/reload-ask.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { miLocalStorage } from '@/local-storage.js'; import { prefer } from '@/preferences.js'; import MkPreferenceContainer from '@/components/MkPreferenceContainer.vue'; @@ -521,7 +521,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.general, icon: 'ti ti-adjustments', })); diff --git a/packages/frontend/src/pages/settings/privacy.vue b/packages/frontend/src/pages/settings/privacy.vue index 7b69e91be9..d42dd323e0 100644 --- a/packages/frontend/src/pages/settings/privacy.vue +++ b/packages/frontend/src/pages/settings/privacy.vue @@ -182,7 +182,7 @@ import { misskeyApi } from '@/utility/misskey-api.js'; import { i18n } from '@/i18n.js'; import { instance } from '@/instance.js'; import { signinRequired } from '@/account.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import FormSlot from '@/components/form/slot.vue'; import { formatDateTimeString } from '@/utility/format-time-string.js'; import MkInput from '@/components/MkInput.vue'; @@ -263,7 +263,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.privacy, icon: 'ti ti-lock-open', })); diff --git a/packages/frontend/src/pages/settings/profile.vue b/packages/frontend/src/pages/settings/profile.vue index 5efd986ce7..1d85ba7834 100644 --- a/packages/frontend/src/pages/settings/profile.vue +++ b/packages/frontend/src/pages/settings/profile.vue @@ -166,7 +166,7 @@ import * as os from '@/os.js'; import { i18n } from '@/i18n.js'; import { signinRequired } from '@/account.js'; import { langmap } from '@/utility/langmap.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { claimAchievement } from '@/utility/achievements.js'; import { store } from '@/store.js'; import { globalEvents } from '@/events.js'; @@ -316,7 +316,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.profile, icon: 'ti ti-user', })); diff --git a/packages/frontend/src/pages/settings/roles.vue b/packages/frontend/src/pages/settings/roles.vue index 4b0daff7fa..c1cabad2c3 100644 --- a/packages/frontend/src/pages/settings/roles.vue +++ b/packages/frontend/src/pages/settings/roles.vue @@ -28,7 +28,7 @@ import FormSection from '@/components/form/section.vue'; import * as os from '@/os.js'; import { i18n } from '@/i18n.js'; import { signinRequired } from '@/account.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import MkRolePreview from '@/components/MkRolePreview.vue'; const $i = signinRequired(); @@ -37,7 +37,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.roles, icon: 'ti ti-badges', })); diff --git a/packages/frontend/src/pages/settings/security.vue b/packages/frontend/src/pages/settings/security.vue index fec760582c..9b664fa98a 100644 --- a/packages/frontend/src/pages/settings/security.vue +++ b/packages/frontend/src/pages/settings/security.vue @@ -58,7 +58,7 @@ import MkPagination from '@/components/MkPagination.vue'; import * as os from '@/os.js'; import { misskeyApi } from '@/utility/misskey-api.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; const pagination = { endpoint: 'i/signin-history' as const, @@ -112,7 +112,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.security, icon: 'ti ti-lock', })); diff --git a/packages/frontend/src/pages/settings/sounds.vue b/packages/frontend/src/pages/settings/sounds.vue index ea634646f6..0c447b1a67 100644 --- a/packages/frontend/src/pages/settings/sounds.vue +++ b/packages/frontend/src/pages/settings/sounds.vue @@ -65,7 +65,7 @@ import MkButton from '@/components/MkButton.vue'; import FormSection from '@/components/form/section.vue'; import MkFolder from '@/components/MkFolder.vue'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { operationTypes } from '@/utility/sound.js'; import MkSwitch from '@/components/MkSwitch.vue'; import MkPreferenceContainer from '@/components/MkPreferenceContainer.vue'; @@ -117,7 +117,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.sounds, icon: 'ti ti-music', })); diff --git a/packages/frontend/src/pages/settings/statusbar.vue b/packages/frontend/src/pages/settings/statusbar.vue index 7b09093c85..7e6a536216 100644 --- a/packages/frontend/src/pages/settings/statusbar.vue +++ b/packages/frontend/src/pages/settings/statusbar.vue @@ -23,7 +23,7 @@ import MkFolder from '@/components/MkFolder.vue'; import MkButton from '@/components/MkButton.vue'; import { misskeyApi } from '@/utility/misskey-api.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { prefer } from '@/preferences.js'; const statusbars = prefer.r.statusbars; @@ -50,7 +50,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.statusbar, icon: 'ti ti-list', })); diff --git a/packages/frontend/src/pages/settings/theme.install.vue b/packages/frontend/src/pages/settings/theme.install.vue index 92f4893f1a..68e4bef5c4 100644 --- a/packages/frontend/src/pages/settings/theme.install.vue +++ b/packages/frontend/src/pages/settings/theme.install.vue @@ -23,7 +23,7 @@ import MkButton from '@/components/MkButton.vue'; import { parseThemeCode, previewTheme, installTheme } from '@/theme.js'; import * as os from '@/os.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { useRouter } from '@/router/supplier.js'; const router = useRouter(); @@ -63,7 +63,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts._theme.install, icon: 'ti ti-download', })); diff --git a/packages/frontend/src/pages/settings/theme.manage.vue b/packages/frontend/src/pages/settings/theme.manage.vue index cc730cf4f0..e2b48ea232 100644 --- a/packages/frontend/src/pages/settings/theme.manage.vue +++ b/packages/frontend/src/pages/settings/theme.manage.vue @@ -43,7 +43,7 @@ import { copyToClipboard } from '@/utility/copy-to-clipboard.js'; import * as os from '@/os.js'; import { getThemes, removeTheme } from '@/theme-store.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; const installedThemes = ref(getThemes()); const builtinThemes = getBuiltinThemesRef(); @@ -77,7 +77,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts._theme.manage, icon: 'ti ti-tool', })); diff --git a/packages/frontend/src/pages/settings/theme.vue b/packages/frontend/src/pages/settings/theme.vue index f536b92599..71dba777b7 100644 --- a/packages/frontend/src/pages/settings/theme.vue +++ b/packages/frontend/src/pages/settings/theme.vue @@ -91,7 +91,7 @@ import { i18n } from '@/i18n.js'; import { instance } from '@/instance.js'; import { uniqueBy } from '@/utility/array.js'; import { getThemes } from '@/theme-store.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { miLocalStorage } from '@/local-storage.js'; import { reloadAsk } from '@/utility/reload-ask.js'; import { prefer } from '@/preferences.js'; @@ -230,7 +230,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.theme, icon: 'ti ti-palette', })); diff --git a/packages/frontend/src/pages/settings/webhook.edit.vue b/packages/frontend/src/pages/settings/webhook.edit.vue index 83902fe6ba..2de948c69d 100644 --- a/packages/frontend/src/pages/settings/webhook.edit.vue +++ b/packages/frontend/src/pages/settings/webhook.edit.vue @@ -78,7 +78,7 @@ import MkButton from '@/components/MkButton.vue'; import * as os from '@/os.js'; import { misskeyApi } from '@/utility/misskey-api.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { useRouter } from '@/router/supplier.js'; const router = useRouter(); @@ -155,7 +155,7 @@ const headerActions = computed(() => []); // eslint-disable-next-line @typescript-eslint/no-unused-vars const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: 'Edit webhook', icon: 'ti ti-webhook', })); diff --git a/packages/frontend/src/pages/settings/webhook.new.vue b/packages/frontend/src/pages/settings/webhook.new.vue index ef5b7393bb..e853f967cb 100644 --- a/packages/frontend/src/pages/settings/webhook.new.vue +++ b/packages/frontend/src/pages/settings/webhook.new.vue @@ -46,7 +46,7 @@ import MkSwitch from '@/components/MkSwitch.vue'; import MkButton from '@/components/MkButton.vue'; import * as os from '@/os.js'; import { i18n } from '@/i18n.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; const name = ref(''); const url = ref(''); @@ -82,7 +82,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: 'Create new webhook', icon: 'ti ti-webhook', })); diff --git a/packages/frontend/src/pages/settings/webhook.vue b/packages/frontend/src/pages/settings/webhook.vue index 7f84d87973..bf8af8cdce 100644 --- a/packages/frontend/src/pages/settings/webhook.vue +++ b/packages/frontend/src/pages/settings/webhook.vue @@ -37,7 +37,7 @@ import { computed } from 'vue'; import MkPagination from '@/components/MkPagination.vue'; import FormSection from '@/components/form/section.vue'; import FormLink from '@/components/form/link.vue'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { i18n } from '@/i18n.js'; const pagination = { @@ -50,7 +50,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: 'Webhook', icon: 'ti ti-webhook', })); diff --git a/packages/frontend/src/pages/share.vue b/packages/frontend/src/pages/share.vue index fc93f86a5b..abd84c8590 100644 --- a/packages/frontend/src/pages/share.vue +++ b/packages/frontend/src/pages/share.vue @@ -38,7 +38,7 @@ import MkButton from '@/components/MkButton.vue'; import MkPostForm from '@/components/MkPostForm.vue'; import * as os from '@/os.js'; import { misskeyApi } from '@/utility/misskey-api.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { postMessageToParentWindow } from '@/utility/post-message.js'; import { i18n } from '@/i18n.js'; @@ -199,7 +199,7 @@ const headerActions = computed(() => []); const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.share, icon: 'ti ti-share', })); diff --git a/packages/frontend/src/pages/tag.vue b/packages/frontend/src/pages/tag.vue index f7e0302ca7..1af69d82db 100644 --- a/packages/frontend/src/pages/tag.vue +++ b/packages/frontend/src/pages/tag.vue @@ -23,7 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only import { computed, ref } from 'vue'; import MkNotes from '@/components/MkNotes.vue'; import MkButton from '@/components/MkButton.vue'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { i18n } from '@/i18n.js'; import { $i } from '@/account.js'; import { store } from '@/store.js'; @@ -68,7 +68,7 @@ const headerActions = computed(() => [{ const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: props.tag, icon: 'ti ti-hash', })); diff --git a/packages/frontend/src/pages/theme-editor.vue b/packages/frontend/src/pages/theme-editor.vue index 43ac5f38d7..11971756f4 100644 --- a/packages/frontend/src/pages/theme-editor.vue +++ b/packages/frontend/src/pages/theme-editor.vue @@ -93,7 +93,7 @@ import { store } from '@/store.js'; import { addTheme } from '@/theme-store.js'; import { i18n } from '@/i18n.js'; import { useLeaveGuard } from '@/utility/use-leave-guard.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { prefer } from '@/preferences.js'; const bgColors = [ @@ -228,7 +228,7 @@ const headerActions = computed(() => [{ const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.themeEditor, icon: 'ti ti-palette', })); diff --git a/packages/frontend/src/pages/timeline.vue b/packages/frontend/src/pages/timeline.vue index 8d64b0a974..0ac6979b05 100644 --- a/packages/frontend/src/pages/timeline.vue +++ b/packages/frontend/src/pages/timeline.vue @@ -49,7 +49,7 @@ import { misskeyApi } from '@/utility/misskey-api.js'; import { store } from '@/store.js'; import { i18n } from '@/i18n.js'; import { $i } from '@/account.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { antennasCache, userListsCache, favoritedChannelsCache } from '@/cache.js'; import { deviceKind } from '@/utility/device-kind.js'; import { deepMerge } from '@/utility/merge.js'; @@ -333,7 +333,7 @@ const headerTabsWhenNotLogin = computed(() => [...availableBasicTimelines().map( iconOnly: true, }))] as Tab[]); -definePageMetadata(() => ({ +definePage(() => ({ title: i18n.ts.timeline, icon: isBasicTimeline(src.value) ? basicTimelineIconClass(src.value) : 'ti ti-home', })); diff --git a/packages/frontend/src/pages/user-list-timeline.vue b/packages/frontend/src/pages/user-list-timeline.vue index 7ab1c91975..d4c7c9386d 100644 --- a/packages/frontend/src/pages/user-list-timeline.vue +++ b/packages/frontend/src/pages/user-list-timeline.vue @@ -29,7 +29,7 @@ import * as Misskey from 'misskey-js'; import MkTimeline from '@/components/MkTimeline.vue'; import { scroll } from '@@/js/scroll.js'; import { misskeyApi } from '@/utility/misskey-api.js'; -import { definePageMetadata } from '@/utility/page-metadata.js'; +import { definePage } from '@/page.js'; import { i18n } from '@/i18n.js'; import { useRouter } from '@/router/supplier.js'; @@ -70,7 +70,7 @@ const headerActions = computed(() => list.value ? [{ const headerTabs = computed(() => []); -definePageMetadata(() => ({ +definePage(() => ({ title: list.value ? list.value.name : i18n.ts.lists, icon: 'ti ti-list', })); diff --git a/packages/frontend/src/pages/user-tag.vue b/packages/frontend/src/pages/user-tag.vue index af543ac723..fc9ff92080 100644 --- a/packages/frontend/src/pages/user-tag.vue +++ b/packages/frontend/src/pages/user-tag.vue @@ -18,7 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only