From 45e5d8935362dc19d61ede2cfccadd2f4be42003 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 10 Apr 2021 12:54:12 +0900 Subject: [PATCH] refactor(client): Use symbol --- src/client/components/page-window.vue | 5 +++-- src/client/pages/_error_.vue | 3 ++- src/client/pages/about-misskey.vue | 3 ++- src/client/pages/about.vue | 3 ++- src/client/pages/advanced-theme-editor.vue | 3 ++- src/client/pages/announcements.vue | 3 ++- src/client/pages/api-console.vue | 3 ++- src/client/pages/channel-editor.vue | 3 ++- src/client/pages/channel.vue | 3 ++- src/client/pages/channels.vue | 3 ++- src/client/pages/clip.vue | 3 ++- src/client/pages/doc.vue | 3 ++- src/client/pages/docs.vue | 3 ++- src/client/pages/drive.vue | 3 ++- src/client/pages/explore.vue | 3 ++- src/client/pages/favorites.vue | 3 ++- src/client/pages/featured.vue | 3 ++- src/client/pages/follow-requests.vue | 3 ++- src/client/pages/instance/abuses.vue | 3 ++- src/client/pages/instance/announcements.vue | 3 ++- src/client/pages/instance/emojis.vue | 3 ++- src/client/pages/instance/federation.vue | 3 ++- src/client/pages/instance/files.vue | 3 ++- src/client/pages/instance/index.vue | 3 ++- src/client/pages/instance/logs.vue | 3 ++- src/client/pages/instance/queue.vue | 3 ++- src/client/pages/instance/relays.vue | 3 ++- src/client/pages/instance/settings.vue | 3 ++- src/client/pages/instance/users.vue | 3 ++- src/client/pages/mentions.vue | 3 ++- src/client/pages/messages.vue | 3 ++- src/client/pages/messaging/index.vue | 3 ++- src/client/pages/messaging/messaging-room.vue | 3 ++- src/client/pages/mfm-cheat-sheet.vue | 3 ++- src/client/pages/my-antennas/index.vue | 3 ++- src/client/pages/my-clips/index.vue | 3 ++- src/client/pages/my-groups/group.vue | 3 ++- src/client/pages/my-groups/index.vue | 3 ++- src/client/pages/my-lists/index.vue | 3 ++- src/client/pages/my-lists/list.vue | 3 ++- src/client/pages/not-found.vue | 3 ++- src/client/pages/note.vue | 3 ++- src/client/pages/notifications.vue | 3 ++- src/client/pages/page-editor/page-editor.vue | 3 ++- src/client/pages/page.vue | 3 ++- src/client/pages/pages.vue | 3 ++- src/client/pages/preview.vue | 3 ++- src/client/pages/reversi/game.vue | 3 ++- src/client/pages/reversi/index.vue | 3 ++- src/client/pages/room/room.vue | 3 ++- src/client/pages/scratchpad.vue | 3 ++- src/client/pages/search.vue | 3 ++- src/client/pages/settings/2fa.vue | 3 ++- src/client/pages/settings/account-info.vue | 5 +++-- src/client/pages/settings/api.vue | 5 +++-- src/client/pages/settings/apps.vue | 5 +++-- src/client/pages/settings/deck.vue | 5 +++-- src/client/pages/settings/drive.vue | 5 +++-- src/client/pages/settings/email-address.vue | 5 +++-- src/client/pages/settings/email-notification.vue | 6 ++++-- src/client/pages/settings/email.vue | 5 +++-- src/client/pages/settings/experimental-features.vue | 5 +++-- src/client/pages/settings/general.vue | 5 +++-- src/client/pages/settings/import-export.vue | 5 +++-- src/client/pages/settings/index.vue | 3 ++- src/client/pages/settings/integration.vue | 5 +++-- src/client/pages/settings/mute-block.vue | 5 +++-- src/client/pages/settings/notifications.vue | 5 +++-- src/client/pages/settings/other.vue | 5 +++-- src/client/pages/settings/plugin.install.vue | 5 +++-- src/client/pages/settings/plugin.manage.vue | 5 +++-- src/client/pages/settings/plugin.vue | 5 +++-- src/client/pages/settings/privacy.vue | 5 +++-- src/client/pages/settings/profile.vue | 5 +++-- src/client/pages/settings/reaction.vue | 5 +++-- src/client/pages/settings/registry.keys.vue | 5 +++-- src/client/pages/settings/registry.value.vue | 5 +++-- src/client/pages/settings/registry.vue | 5 +++-- src/client/pages/settings/security.vue | 5 +++-- src/client/pages/settings/sidebar.vue | 5 +++-- src/client/pages/settings/sounds.vue | 5 +++-- src/client/pages/settings/theme.install.vue | 5 +++-- src/client/pages/settings/theme.manage.vue | 5 +++-- src/client/pages/settings/theme.vue | 3 ++- src/client/pages/settings/update.vue | 5 +++-- src/client/pages/settings/word-mute.vue | 5 +++-- src/client/pages/share.vue | 3 ++- src/client/pages/tag.vue | 3 ++- src/client/pages/test.vue | 3 ++- src/client/pages/theme-editor.vue | 3 ++- src/client/pages/timeline.vue | 3 ++- src/client/pages/user/index.vue | 3 ++- src/client/pages/v.vue | 3 ++- src/client/pages/welcome.vue | 3 ++- src/client/symbols.ts | 1 + src/client/ui/chat/side.vue | 5 +++-- src/client/ui/deck/main-column.vue | 5 +++-- src/client/ui/default.side.vue | 5 +++-- src/client/ui/default.vue | 5 +++-- src/client/ui/universal.vue | 5 +++-- src/client/ui/visitor/a.vue | 5 +++-- src/client/ui/visitor/b.vue | 5 +++-- src/client/ui/zen.vue | 5 +++-- 103 files changed, 246 insertions(+), 142 deletions(-) create mode 100644 src/client/symbols.ts diff --git a/src/client/components/page-window.vue b/src/client/components/page-window.vue index e423757e0..1afde2550 100644 --- a/src/client/components/page-window.vue +++ b/src/client/components/page-window.vue @@ -29,6 +29,7 @@ import { popout } from '@client/scripts/popout'; import copyToClipboard from '@client/scripts/copy-to-clipboard'; import { resolve } from '@client/router'; import { url } from '@client/config'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -123,8 +124,8 @@ export default defineComponent({ methods: { changePage(page) { if (page == null) return; - if (page.INFO) { - this.pageInfo = page.INFO; + if (page[symbols.PAGE_INFO]) { + this.pageInfo = page[symbols.PAGE_INFO]; } }, diff --git a/src/client/pages/_error_.vue b/src/client/pages/_error_.vue index b31791558..67c1a1991 100644 --- a/src/client/pages/_error_.vue +++ b/src/client/pages/_error_.vue @@ -14,6 +14,7 @@ import { defineComponent } from 'vue'; import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; import MkButton from '@client/components/ui/button.vue'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -21,7 +22,7 @@ export default defineComponent({ }, data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.error, icon: faExclamationTriangle }, diff --git a/src/client/pages/about-misskey.vue b/src/client/pages/about-misskey.vue index 72b94968d..cfffc7db5 100644 --- a/src/client/pages/about-misskey.vue +++ b/src/client/pages/about-misskey.vue @@ -64,6 +64,7 @@ import FormKeyValueView from '@client/components/form/key-value-view.vue'; import MkLink from '@client/components/link.vue'; import { physics } from '@client/scripts/physics.ts'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; const patrons = [ 'Satsuki Yanagi', @@ -115,7 +116,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.aboutMisskey, icon: null }, diff --git a/src/client/pages/about.vue b/src/client/pages/about.vue index 911fc0bc6..4084256cf 100644 --- a/src/client/pages/about.vue +++ b/src/client/pages/about.vue @@ -48,6 +48,7 @@ import FormGroup from '@client/components/form/group.vue'; import FormKeyValueView from '@client/components/form/key-value-view.vue'; import * as os from '@client/os'; import number from '@client/filters/number'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -59,7 +60,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.instanceInfo, icon: faInfoCircle }, diff --git a/src/client/pages/advanced-theme-editor.vue b/src/client/pages/advanced-theme-editor.vue index e1bd0ebc0..3808c8abb 100644 --- a/src/client/pages/advanced-theme-editor.vue +++ b/src/client/pages/advanced-theme-editor.vue @@ -109,6 +109,7 @@ import { host } from '@client/config'; import * as os from '@client/os'; import { ColdDeviceStorage } from '@client/store'; import { addTheme } from '@client/theme-store'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -122,7 +123,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.themeEditor, icon: faPalette, }, diff --git a/src/client/pages/announcements.vue b/src/client/pages/announcements.vue index 7c8ab28d8..041f513f9 100644 --- a/src/client/pages/announcements.vue +++ b/src/client/pages/announcements.vue @@ -21,6 +21,7 @@ import { faCheck, faBroadcastTower } from '@fortawesome/free-solid-svg-icons'; import MkPagination from '@client/components/ui/pagination.vue'; import MkButton from '@client/components/ui/button.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -30,7 +31,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.announcements, icon: faBroadcastTower }, diff --git a/src/client/pages/api-console.vue b/src/client/pages/api-console.vue index f5b4dceb2..5321f8e7c 100644 --- a/src/client/pages/api-console.vue +++ b/src/client/pages/api-console.vue @@ -32,6 +32,7 @@ import MkInput from '@client/components/ui/input.vue'; import MkTextarea from '@client/components/ui/textarea.vue'; import MkSwitch from '@client/components/ui/switch.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -40,7 +41,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: 'API console', icon: faTerminal }, diff --git a/src/client/pages/channel-editor.vue b/src/client/pages/channel-editor.vue index f5b8a66a6..7216aaec4 100644 --- a/src/client/pages/channel-editor.vue +++ b/src/client/pages/channel-editor.vue @@ -30,6 +30,7 @@ import MkButton from '@client/components/ui/button.vue'; import MkInput from '@client/components/ui/input.vue'; import { selectFile } from '@client/scripts/select-file'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -45,7 +46,7 @@ export default defineComponent({ data() { return { - INFO: computed(() => this.channelId ? { + [symbols.PAGE_INFO]: computed(() => this.channelId ? { title: this.$ts._channel.edit, icon: faSatelliteDish, } : { diff --git a/src/client/pages/channel.vue b/src/client/pages/channel.vue index d2ddebb4a..4302f963e 100644 --- a/src/client/pages/channel.vue +++ b/src/client/pages/channel.vue @@ -35,6 +35,7 @@ import XPostForm from '@client/components/post-form.vue'; import XTimeline from '@client/components/timeline.vue'; import XChannelFollowButton from '@client/components/channel-follow-button.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -53,7 +54,7 @@ export default defineComponent({ data() { return { - INFO: computed(() => this.channel ? { + [symbols.PAGE_INFO]: computed(() => this.channel ? { title: this.channel.name, icon: faSatelliteDish, } : null), diff --git a/src/client/pages/channels.vue b/src/client/pages/channels.vue index d75c4e5ba..530af7a4a 100644 --- a/src/client/pages/channels.vue +++ b/src/client/pages/channels.vue @@ -39,6 +39,7 @@ import MkChannelPreview from '@client/components/channel-preview.vue'; import MkPagination from '@client/components/ui/pagination.vue'; import MkButton from '@client/components/ui/button.vue'; import MkTab from '@client/components/tab.vue'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -46,7 +47,7 @@ export default defineComponent({ }, data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.channel, icon: faSatelliteDish, action: { diff --git a/src/client/pages/clip.vue b/src/client/pages/clip.vue index 9ae41c72f..e0f5868a1 100644 --- a/src/client/pages/clip.vue +++ b/src/client/pages/clip.vue @@ -20,6 +20,7 @@ import MkContainer from '@client/components/ui/container.vue'; import XPostForm from '@client/components/post-form.vue'; import XNotes from '@client/components/notes.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -37,7 +38,7 @@ export default defineComponent({ data() { return { - INFO: computed(() => this.clip ? { + [symbols.PAGE_INFO]: computed(() => this.clip ? { title: this.clip.name, icon: faPaperclip, action: { diff --git a/src/client/pages/doc.vue b/src/client/pages/doc.vue index 8b8a89efc..cf3628daf 100644 --- a/src/client/pages/doc.vue +++ b/src/client/pages/doc.vue @@ -15,6 +15,7 @@ import MarkdownIt from 'markdown-it'; import MarkdownItAnchor from 'markdown-it-anchor'; import { url, lang } from '@client/config'; import MkLink from '@client/components/link.vue'; +import * as symbols from '@client/symbols'; const markdown = MarkdownIt({ html: true @@ -38,7 +39,7 @@ export default defineComponent({ data() { return { - INFO: computed(() => this.title ? { + [symbols.PAGE_INFO]: computed(() => this.title ? { title: this.title, icon: faQuestionCircle, } : null), diff --git a/src/client/pages/docs.vue b/src/client/pages/docs.vue index f57be3d32..92eab8671 100644 --- a/src/client/pages/docs.vue +++ b/src/client/pages/docs.vue @@ -16,11 +16,12 @@ import { defineComponent } from 'vue'; import { faQuestionCircle } from '@fortawesome/free-solid-svg-icons' import { url, lang } from '@client/config'; +import * as symbols from '@client/symbols'; export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.help, icon: faQuestionCircle }, diff --git a/src/client/pages/drive.vue b/src/client/pages/drive.vue index 3ca7f6009..33bbfbc50 100644 --- a/src/client/pages/drive.vue +++ b/src/client/pages/drive.vue @@ -9,6 +9,7 @@ import { computed, defineComponent } from 'vue'; import { faCloud } from '@fortawesome/free-solid-svg-icons'; import XDrive from '@client/components/drive.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -17,7 +18,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: computed(() => this.folder ? this.folder.name : this.$ts.drive), icon: faCloud, menu: () => this.$refs.drive.getMenu() diff --git a/src/client/pages/explore.vue b/src/client/pages/explore.vue index dc3d424ba..07989f844 100644 --- a/src/client/pages/explore.vue +++ b/src/client/pages/explore.vue @@ -75,6 +75,7 @@ import MkFolder from '@client/components/ui/folder.vue'; import MkInput from '@client/components/ui/input.vue'; import number from '@client/filters/number'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -92,7 +93,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.explore, icon: faHashtag }, diff --git a/src/client/pages/favorites.vue b/src/client/pages/favorites.vue index c87855484..7ecd32713 100644 --- a/src/client/pages/favorites.vue +++ b/src/client/pages/favorites.vue @@ -10,6 +10,7 @@ import { faStar } from '@fortawesome/free-solid-svg-icons'; import Progress from '@client/scripts/loading'; import XNotes from '@client/components/notes.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -18,7 +19,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.favorites, icon: faStar }, diff --git a/src/client/pages/featured.vue b/src/client/pages/featured.vue index 3866c4b48..cd7343f58 100644 --- a/src/client/pages/featured.vue +++ b/src/client/pages/featured.vue @@ -9,6 +9,7 @@ import { defineComponent } from 'vue'; import { faFireAlt } from '@fortawesome/free-solid-svg-icons'; import Progress from '@client/scripts/loading'; import XNotes from '@client/components/notes.vue'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -17,7 +18,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.featured, icon: faFireAlt }, diff --git a/src/client/pages/follow-requests.vue b/src/client/pages/follow-requests.vue index 64e6fa03e..309c5b4fd 100644 --- a/src/client/pages/follow-requests.vue +++ b/src/client/pages/follow-requests.vue @@ -35,6 +35,7 @@ import { faUserClock, faCheck, faTimes } from '@fortawesome/free-solid-svg-icons import MkPagination from '@client/components/ui/pagination.vue'; import { userPage, acct } from '../filters/user'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -43,7 +44,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.followRequests, icon: faUserClock, }, diff --git a/src/client/pages/instance/abuses.vue b/src/client/pages/instance/abuses.vue index d7d7697eb..9727c160b 100644 --- a/src/client/pages/instance/abuses.vue +++ b/src/client/pages/instance/abuses.vue @@ -72,6 +72,7 @@ import MkSelect from '@client/components/ui/select.vue'; import MkPagination from '@client/components/ui/pagination.vue'; import { acct } from '../../filters/user'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -83,7 +84,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.abuseReports, icon: faExclamationCircle }, diff --git a/src/client/pages/instance/announcements.vue b/src/client/pages/instance/announcements.vue index 15e5f389b..426199c16 100644 --- a/src/client/pages/instance/announcements.vue +++ b/src/client/pages/instance/announcements.vue @@ -34,6 +34,7 @@ import MkButton from '@client/components/ui/button.vue'; import MkInput from '@client/components/ui/input.vue'; import MkTextarea from '@client/components/ui/textarea.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -44,7 +45,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.announcements, icon: faBroadcastTower }, diff --git a/src/client/pages/instance/emojis.vue b/src/client/pages/instance/emojis.vue index 01e207f49..722ed0063 100644 --- a/src/client/pages/instance/emojis.vue +++ b/src/client/pages/instance/emojis.vue @@ -59,6 +59,7 @@ import MkPagination from '@client/components/ui/pagination.vue'; import MkTab from '@client/components/tab.vue'; import { selectFile } from '@client/scripts/select-file'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -70,7 +71,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.customEmojis, icon: faLaugh, action: { diff --git a/src/client/pages/instance/federation.vue b/src/client/pages/instance/federation.vue index ba452c545..2a820e5ba 100644 --- a/src/client/pages/instance/federation.vue +++ b/src/client/pages/instance/federation.vue @@ -67,6 +67,7 @@ import MkSelect from '@client/components/ui/select.vue'; import MkPagination from '@client/components/ui/pagination.vue'; import MkInstanceInfo from './instance.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -78,7 +79,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.federation, icon: faGlobe }, diff --git a/src/client/pages/instance/files.vue b/src/client/pages/instance/files.vue index aa6671378..a1f134f55 100644 --- a/src/client/pages/instance/files.vue +++ b/src/client/pages/instance/files.vue @@ -71,6 +71,7 @@ import MkPagination from '@client/components/ui/pagination.vue'; import MkDriveFileThumbnail from '@client/components/drive-file-thumbnail.vue'; import bytes from '@client/filters/bytes'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -83,7 +84,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.files, icon: faCloud }, diff --git a/src/client/pages/instance/index.vue b/src/client/pages/instance/index.vue index 5a35309ed..7e3497693 100644 --- a/src/client/pages/instance/index.vue +++ b/src/client/pages/instance/index.vue @@ -70,6 +70,7 @@ import number from '../../filters/number'; import MkInstanceInfo from './instance.vue'; import XMetrics from './index.metrics.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -85,7 +86,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { tabs: [{ id: 'index', title: null, diff --git a/src/client/pages/instance/logs.vue b/src/client/pages/instance/logs.vue index de1e81750..f27546a40 100644 --- a/src/client/pages/instance/logs.vue +++ b/src/client/pages/instance/logs.vue @@ -37,6 +37,7 @@ import MkInput from '@client/components/ui/input.vue'; import MkSelect from '@client/components/ui/select.vue'; import MkTextarea from '@client/components/ui/textarea.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -48,7 +49,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.serverLogs, icon: faStream }, diff --git a/src/client/pages/instance/queue.vue b/src/client/pages/instance/queue.vue index 17c8430a0..249babcf4 100644 --- a/src/client/pages/instance/queue.vue +++ b/src/client/pages/instance/queue.vue @@ -21,6 +21,7 @@ import { faTrashAlt } from '@fortawesome/free-regular-svg-icons'; import MkButton from '@client/components/ui/button.vue'; import XQueue from './queue.chart.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -30,7 +31,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.jobQueue, icon: faExchangeAlt, }, diff --git a/src/client/pages/instance/relays.vue b/src/client/pages/instance/relays.vue index ef11366a1..d97a07cbb 100644 --- a/src/client/pages/instance/relays.vue +++ b/src/client/pages/instance/relays.vue @@ -28,6 +28,7 @@ import { faSave, faTrashAlt } from '@fortawesome/free-regular-svg-icons'; import MkButton from '@client/components/ui/button.vue'; import MkInput from '@client/components/ui/input.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -37,7 +38,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.relays, icon: faProjectDiagram, }, diff --git a/src/client/pages/instance/settings.vue b/src/client/pages/instance/settings.vue index 891eba3cf..660a3d4fe 100644 --- a/src/client/pages/instance/settings.vue +++ b/src/client/pages/instance/settings.vue @@ -261,6 +261,7 @@ import { url } from '@client/config'; import getAcct from '@/misc/acct/render'; import * as os from '@client/os'; import { fetchInstance } from '@client/instance'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -274,7 +275,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.instance, icon: faCog, }, diff --git a/src/client/pages/instance/users.vue b/src/client/pages/instance/users.vue index 013eed397..9452a91ea 100644 --- a/src/client/pages/instance/users.vue +++ b/src/client/pages/instance/users.vue @@ -89,6 +89,7 @@ import MkSelect from '@client/components/ui/select.vue'; import MkPagination from '@client/components/ui/pagination.vue'; import { acct } from '../../filters/user'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -100,7 +101,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.users, icon: faUsers, action: { diff --git a/src/client/pages/mentions.vue b/src/client/pages/mentions.vue index 5bd051453..042c3a498 100644 --- a/src/client/pages/mentions.vue +++ b/src/client/pages/mentions.vue @@ -9,6 +9,7 @@ import { defineComponent } from 'vue'; import { faAt } from '@fortawesome/free-solid-svg-icons'; import Progress from '@client/scripts/loading'; import XNotes from '@client/components/notes.vue'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -17,7 +18,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.mentions, icon: faAt }, diff --git a/src/client/pages/messages.vue b/src/client/pages/messages.vue index 02aa9c6fd..09d92e51b 100644 --- a/src/client/pages/messages.vue +++ b/src/client/pages/messages.vue @@ -9,6 +9,7 @@ import { defineComponent } from 'vue'; import { faEnvelope } from '@fortawesome/free-solid-svg-icons'; import Progress from '@client/scripts/loading'; import XNotes from '@client/components/notes.vue'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -17,7 +18,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.directNotes, icon: faEnvelope }, diff --git a/src/client/pages/messaging/index.vue b/src/client/pages/messaging/index.vue index 114a01ec3..9510349d5 100644 --- a/src/client/pages/messaging/index.vue +++ b/src/client/pages/messaging/index.vue @@ -43,6 +43,7 @@ import getAcct from '@/misc/acct/render'; import MkButton from '@client/components/ui/button.vue'; import { acct } from '../../filters/user'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -51,7 +52,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.messaging, icon: faComments }, diff --git a/src/client/pages/messaging/messaging-room.vue b/src/client/pages/messaging/messaging-room.vue index 8473bb36c..dae459021 100644 --- a/src/client/pages/messaging/messaging-room.vue +++ b/src/client/pages/messaging/messaging-room.vue @@ -47,6 +47,7 @@ import { isBottom, onScrollBottom, scroll } from '@client/scripts/scroll'; import * as os from '@client/os'; import { popout } from '@client/scripts/popout'; import * as sound from '@client/scripts/sound'; +import * as symbols from '@client/symbols'; const Component = defineComponent({ components: { @@ -70,7 +71,7 @@ const Component = defineComponent({ data() { return { - INFO: computed(() => !this.fetching ? this.user ? { + [symbols.PAGE_INFO]: computed(() => !this.fetching ? this.user ? { userName: this.user, avatar: this.user, action: { diff --git a/src/client/pages/mfm-cheat-sheet.vue b/src/client/pages/mfm-cheat-sheet.vue index 4452604e4..b30c3414e 100644 --- a/src/client/pages/mfm-cheat-sheet.vue +++ b/src/client/pages/mfm-cheat-sheet.vue @@ -272,6 +272,7 @@ import { defineComponent } from 'vue'; import { faQuestionCircle } from '@fortawesome/free-regular-svg-icons'; import MkTextarea from '@client/components/ui/textarea.vue'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -280,7 +281,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts._mfm.cheatSheet, icon: faQuestionCircle, }, diff --git a/src/client/pages/my-antennas/index.vue b/src/client/pages/my-antennas/index.vue index f4d5f4aad..dfb752b83 100644 --- a/src/client/pages/my-antennas/index.vue +++ b/src/client/pages/my-antennas/index.vue @@ -18,6 +18,7 @@ import { faSatellite, faPlus } from '@fortawesome/free-solid-svg-icons'; import MkPagination from '@client/components/ui/pagination.vue'; import MkButton from '@client/components/ui/button.vue'; import XAntenna from './index.antenna.vue'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -28,7 +29,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.manageAntennas, icon: faSatellite, action: { diff --git a/src/client/pages/my-clips/index.vue b/src/client/pages/my-clips/index.vue index d29d147e8..be69e523a 100644 --- a/src/client/pages/my-clips/index.vue +++ b/src/client/pages/my-clips/index.vue @@ -19,6 +19,7 @@ import { faPlus, faPaperclip } from '@fortawesome/free-solid-svg-icons'; import MkPagination from '@client/components/ui/pagination.vue'; import MkButton from '@client/components/ui/button.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -28,7 +29,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.clip, icon: faPaperclip, action: { diff --git a/src/client/pages/my-groups/group.vue b/src/client/pages/my-groups/group.vue index 8d0d8716c..878d14cec 100644 --- a/src/client/pages/my-groups/group.vue +++ b/src/client/pages/my-groups/group.vue @@ -39,6 +39,7 @@ import { faTimes, faUsers } from '@fortawesome/free-solid-svg-icons'; import Progress from '@client/scripts/loading'; import MkButton from '@client/components/ui/button.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -54,7 +55,7 @@ export default defineComponent({ data() { return { - INFO: computed(() => this.group ? { + [symbols.PAGE_INFO]: computed(() => this.group ? { title: this.group.name, icon: faUsers, } : null), diff --git a/src/client/pages/my-groups/index.vue b/src/client/pages/my-groups/index.vue index 2bc0d36b9..5125ce3f4 100644 --- a/src/client/pages/my-groups/index.vue +++ b/src/client/pages/my-groups/index.vue @@ -54,6 +54,7 @@ import MkContainer from '@client/components/ui/container.vue'; import MkAvatars from '@client/components/avatars.vue'; import MkTab from '@client/components/tab.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -66,7 +67,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.groups, icon: faUsers }, diff --git a/src/client/pages/my-lists/index.vue b/src/client/pages/my-lists/index.vue index bbb2192aa..e680b90d1 100644 --- a/src/client/pages/my-lists/index.vue +++ b/src/client/pages/my-lists/index.vue @@ -16,6 +16,7 @@ import { faListUl, faPlus } from '@fortawesome/free-solid-svg-icons'; import MkPagination from '@client/components/ui/pagination.vue'; import MkButton from '@client/components/ui/button.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -25,7 +26,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.manageLists, icon: faListUl, action: { diff --git a/src/client/pages/my-lists/list.vue b/src/client/pages/my-lists/list.vue index dcaae222c..285c48695 100644 --- a/src/client/pages/my-lists/list.vue +++ b/src/client/pages/my-lists/list.vue @@ -38,6 +38,7 @@ import { faTimes, faListUl } from '@fortawesome/free-solid-svg-icons'; import Progress from '@client/scripts/loading'; import MkButton from '@client/components/ui/button.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -46,7 +47,7 @@ export default defineComponent({ data() { return { - INFO: computed(() => this.list ? { + [symbols.PAGE_INFO]: computed(() => this.list ? { title: this.list.name, icon: faListUl, } : null), diff --git a/src/client/pages/not-found.vue b/src/client/pages/not-found.vue index 61ca3870c..b13bdac2b 100644 --- a/src/client/pages/not-found.vue +++ b/src/client/pages/not-found.vue @@ -11,11 +11,12 @@ import { defineComponent } from 'vue'; import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.notFound, icon: faExclamationTriangle }, diff --git a/src/client/pages/note.vue b/src/client/pages/note.vue index 6debb611f..921e73c0b 100644 --- a/src/client/pages/note.vue +++ b/src/client/pages/note.vue @@ -44,6 +44,7 @@ import XNotes from '@client/components/notes.vue'; import MkRemoteCaution from '@client/components/remote-caution.vue'; import MkButton from '@client/components/ui/button.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -61,7 +62,7 @@ export default defineComponent({ }, data() { return { - INFO: computed(() => this.note ? { + [symbols.PAGE_INFO]: computed(() => this.note ? { title: this.$ts.note, avatar: this.note.user, } : null), diff --git a/src/client/pages/notifications.vue b/src/client/pages/notifications.vue index 19b172675..6f38d7739 100644 --- a/src/client/pages/notifications.vue +++ b/src/client/pages/notifications.vue @@ -10,6 +10,7 @@ import { faBell } from '@fortawesome/free-solid-svg-icons'; import Progress from '@client/scripts/loading'; import XNotifications from '@client/components/notifications.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -18,7 +19,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.notifications, icon: faBell }, diff --git a/src/client/pages/page-editor/page-editor.vue b/src/client/pages/page-editor/page-editor.vue index 79e3bfdf9..148f5f8c4 100644 --- a/src/client/pages/page-editor/page-editor.vue +++ b/src/client/pages/page-editor/page-editor.vue @@ -108,6 +108,7 @@ import { url } from '@client/config'; import { collectPageVars } from '@client/scripts/collect-page-vars'; import * as os from '@client/os'; import { selectFile } from '@client/scripts/select-file'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -132,7 +133,7 @@ export default defineComponent({ data() { return { - INFO: computed(() => { + [symbols.PAGE_INFO]: computed(() => { let title = this.$ts._pages.newPage; if (this.initPageId) { title = this.$ts._pages.editPage; diff --git a/src/client/pages/page.vue b/src/client/pages/page.vue index 121383a7a..6dda65f50 100644 --- a/src/client/pages/page.vue +++ b/src/client/pages/page.vue @@ -37,6 +37,7 @@ import { faHeart as faHeartS } from '@fortawesome/free-solid-svg-icons'; import { faHeart as faHeartR } from '@fortawesome/free-regular-svg-icons'; import XPage from '@client/components/page/page.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -56,7 +57,7 @@ export default defineComponent({ data() { return { - INFO: computed(() => this.page ? { + [symbols.PAGE_INFO]: computed(() => this.page ? { title: computed(() => this.page.title || this.page.name), avatar: this.page.user, } : null), diff --git a/src/client/pages/pages.vue b/src/client/pages/pages.vue index 9bedda04e..d7e5f9a1d 100644 --- a/src/client/pages/pages.vue +++ b/src/client/pages/pages.vue @@ -37,6 +37,7 @@ import MkPagePreview from '@client/components/page-preview.vue'; import MkPagination from '@client/components/ui/pagination.vue'; import MkButton from '@client/components/ui/button.vue'; import MkTab from '@client/components/tab.vue'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -44,7 +45,7 @@ export default defineComponent({ }, data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.pages, icon: faStickyNote, action: { diff --git a/src/client/pages/preview.vue b/src/client/pages/preview.vue index 0b0293f69..bd4e08db6 100644 --- a/src/client/pages/preview.vue +++ b/src/client/pages/preview.vue @@ -8,6 +8,7 @@ import { defineComponent } from 'vue'; import { faEye } from '@fortawesome/free-solid-svg-icons'; import MkSample from '@client/components/sample.vue'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -16,7 +17,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.preview, icon: faEye, }, diff --git a/src/client/pages/reversi/game.vue b/src/client/pages/reversi/game.vue index 3a88b0258..896dbc39c 100644 --- a/src/client/pages/reversi/game.vue +++ b/src/client/pages/reversi/game.vue @@ -10,6 +10,7 @@ import GameSetting from './game.setting.vue'; import GameBoard from './game.board.vue'; import * as os from '@client/os'; import { faGamepad } from '@fortawesome/free-solid-svg-icons'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -26,7 +27,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts._reversi.reversi, icon: faGamepad }, diff --git a/src/client/pages/reversi/index.vue b/src/client/pages/reversi/index.vue index b6a1db116..d590bbeb9 100644 --- a/src/client/pages/reversi/index.vue +++ b/src/client/pages/reversi/index.vue @@ -65,6 +65,7 @@ import * as os from '@client/os'; import MkButton from '@client/components/ui/button.vue'; import MkFolder from '@client/components/ui/folder.vue'; import { faGamepad } from '@fortawesome/free-solid-svg-icons'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -75,7 +76,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts._reversi.reversi, icon: faGamepad }, diff --git a/src/client/pages/room/room.vue b/src/client/pages/room/room.vue index e6e280972..e1de52b8f 100644 --- a/src/client/pages/room/room.vue +++ b/src/client/pages/room/room.vue @@ -63,6 +63,7 @@ import MkSelect from '@client/components/ui/select.vue'; import { selectFile } from '@client/scripts/select-file'; import * as os from '@client/os'; import { ColdDeviceStorage } from '@client/store'; +import * as symbols from '@client/symbols'; let room: Room; @@ -82,7 +83,7 @@ export default defineComponent({ data() { return { - INFO: computed(() => this.user ? { + [symbols.PAGE_INFO]: computed(() => this.user ? { title: this.$ts.room, avatar: this.user, } : null), diff --git a/src/client/pages/scratchpad.vue b/src/client/pages/scratchpad.vue index febc9c501..a5107bd52 100644 --- a/src/client/pages/scratchpad.vue +++ b/src/client/pages/scratchpad.vue @@ -33,6 +33,7 @@ import MkContainer from '@client/components/ui/container.vue'; import MkButton from '@client/components/ui/button.vue'; import { createAiScriptEnv } from '@client/scripts/aiscript/api'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -43,7 +44,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.scratchpad, icon: faTerminal, }, diff --git a/src/client/pages/search.vue b/src/client/pages/search.vue index 28d2aec99..b67071473 100644 --- a/src/client/pages/search.vue +++ b/src/client/pages/search.vue @@ -11,6 +11,7 @@ import { computed, defineComponent } from 'vue'; import { faSearch } from '@fortawesome/free-solid-svg-icons'; import Progress from '@client/scripts/loading'; import XNotes from '@client/components/notes.vue'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -19,7 +20,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: computed(() => this.$t('searchWith', { q: this.$route.query.q })), icon: faSearch }, diff --git a/src/client/pages/settings/2fa.vue b/src/client/pages/settings/2fa.vue index 48f1bc6e7..361611bcb 100644 --- a/src/client/pages/settings/2fa.vue +++ b/src/client/pages/settings/2fa.vue @@ -79,6 +79,7 @@ import FormBase from '@client/components/form/base.vue'; import FormGroup from '@client/components/form/group.vue'; import FormButton from '@client/components/form/button.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -90,7 +91,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.twoStepAuthentication, icon: faLock }, diff --git a/src/client/pages/settings/account-info.vue b/src/client/pages/settings/account-info.vue index 1b8baadf4..955a0f784 100644 --- a/src/client/pages/settings/account-info.vue +++ b/src/client/pages/settings/account-info.vue @@ -143,6 +143,7 @@ import FormKeyValueView from '@client/components/form/key-value-view.vue'; import * as os from '@client/os'; import number from '@client/filters/number'; import bytes from '@client/filters/bytes'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -159,7 +160,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.accountInfo, icon: faInfoCircle }, @@ -168,7 +169,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); os.api('users/stats', { userId: this.$i.id diff --git a/src/client/pages/settings/api.vue b/src/client/pages/settings/api.vue index da9ed88b5..9b5339987 100644 --- a/src/client/pages/settings/api.vue +++ b/src/client/pages/settings/api.vue @@ -16,6 +16,7 @@ import FormBase from '@client/components/form/base.vue'; import FormGroup from '@client/components/form/group.vue'; import FormButton from '@client/components/form/button.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -28,7 +29,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: 'API', icon: faKey }, @@ -37,7 +38,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/apps.vue b/src/client/pages/settings/apps.vue index d0fcacfae..82bf9b7f8 100644 --- a/src/client/pages/settings/apps.vue +++ b/src/client/pages/settings/apps.vue @@ -47,6 +47,7 @@ import FormBase from '@client/components/form/base.vue'; import FormGroup from '@client/components/form/group.vue'; import FormButton from '@client/components/form/button.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -58,7 +59,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.installedApps, icon: faPlug, }, @@ -74,7 +75,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/deck.vue b/src/client/pages/settings/deck.vue index ce4099db2..84992adc0 100644 --- a/src/client/pages/settings/deck.vue +++ b/src/client/pages/settings/deck.vue @@ -41,6 +41,7 @@ import FormGroup from '@client/components/form/group.vue'; import { deckStore } from '@client/ui/deck/deck-store'; import * as os from '@client/os'; import { unisonReload } from '@client/scripts/unison-reload'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -56,7 +57,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.deck, icon: faColumns }, @@ -87,7 +88,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/drive.vue b/src/client/pages/settings/drive.vue index 4684d3b55..675b025ab 100644 --- a/src/client/pages/settings/drive.vue +++ b/src/client/pages/settings/drive.vue @@ -44,6 +44,7 @@ import FormKeyValueView from '@client/components/form/key-value-view.vue'; import FormBase from '@client/components/form/base.vue'; import * as os from '@client/os'; import bytes from '@client/filters/bytes'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -57,7 +58,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.drive, icon: faCloud }, @@ -100,7 +101,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/email-address.vue b/src/client/pages/settings/email-address.vue index 56e9973ae..97c5d396c 100644 --- a/src/client/pages/settings/email-address.vue +++ b/src/client/pages/settings/email-address.vue @@ -20,6 +20,7 @@ import FormInput from '@client/components/form/input.vue'; import FormBase from '@client/components/form/base.vue'; import FormGroup from '@client/components/form/group.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -33,7 +34,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.emailAddress, icon: faEnvelope }, @@ -48,7 +49,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/email-notification.vue b/src/client/pages/settings/email-notification.vue index 5894b8475..cc28bac4b 100644 --- a/src/client/pages/settings/email-notification.vue +++ b/src/client/pages/settings/email-notification.vue @@ -32,6 +32,8 @@ import FormSwitch from '@client/components/form/switch.vue'; import FormBase from '@client/components/form/base.vue'; import FormGroup from '@client/components/form/group.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -45,7 +47,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.emailNotification, icon: faEnvelope }, @@ -69,7 +71,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/email.vue b/src/client/pages/settings/email.vue index bd2e4634d..04f433f9a 100644 --- a/src/client/pages/settings/email.vue +++ b/src/client/pages/settings/email.vue @@ -30,6 +30,7 @@ import FormBase from '@client/components/form/base.vue'; import FormGroup from '@client/components/form/group.vue'; import FormSwitch from '@client/components/form/switch.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -44,7 +45,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.email, icon: faEnvelope }, @@ -53,7 +54,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/experimental-features.vue b/src/client/pages/settings/experimental-features.vue index 1cbda219d..25453b7e1 100644 --- a/src/client/pages/settings/experimental-features.vue +++ b/src/client/pages/settings/experimental-features.vue @@ -15,6 +15,7 @@ import FormGroup from '@client/components/form/group.vue'; import FormButton from '@client/components/form/button.vue'; import FormKeyValueView from '@client/components/form/key-value-view.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -31,7 +32,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.experimentalFeatures, icon: faFlask }, @@ -40,7 +41,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/general.vue b/src/client/pages/settings/general.vue index 6612fc0ca..7e80e2249 100644 --- a/src/client/pages/settings/general.vue +++ b/src/client/pages/settings/general.vue @@ -98,6 +98,7 @@ import { defaultStore } from '@client/store'; import { ColdDeviceStorage } from '@client/store'; import * as os from '@client/os'; import { unisonReload } from '@client/scripts/unison-reload'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -115,7 +116,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.general, icon: faCogs }, @@ -191,7 +192,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/import-export.vue b/src/client/pages/settings/import-export.vue index 2f80ef0c6..1591a9d54 100644 --- a/src/client/pages/settings/import-export.vue +++ b/src/client/pages/settings/import-export.vue @@ -34,6 +34,7 @@ import FormBase from '@client/components/form/base.vue'; import FormGroup from '@client/components/form/group.vue'; import * as os from '@client/os'; import { selectFile } from '@client/scripts/select-file'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -46,7 +47,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.importAndExport, icon: faBoxes }, @@ -55,7 +56,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/index.vue b/src/client/pages/settings/index.vue index 300035671..a7ec086bb 100644 --- a/src/client/pages/settings/index.vue +++ b/src/client/pages/settings/index.vue @@ -53,6 +53,7 @@ import FormButton from '@client/components/form/button.vue'; import { scroll } from '@client/scripts/scroll'; import { signout } from '@client/account'; import { unisonReload } from '@client/scripts/unison-reload'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -148,7 +149,7 @@ export default defineComponent({ }); return { - INFO, + [symbols.PAGE_INFO]: INFO, narrow, view, el, diff --git a/src/client/pages/settings/integration.vue b/src/client/pages/settings/integration.vue index e2ab11841..49f955bc3 100644 --- a/src/client/pages/settings/integration.vue +++ b/src/client/pages/settings/integration.vue @@ -37,6 +37,7 @@ import { apiUrl } from '@client/config'; import FormBase from '@client/components/form/base.vue'; import MkButton from '@client/components/ui/button.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -48,7 +49,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.integration, icon: faShareAlt }, @@ -80,7 +81,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); document.cookie = `igi=${this.$i.token}; path=/;` + ` max-age=31536000;` + diff --git a/src/client/pages/settings/mute-block.vue b/src/client/pages/settings/mute-block.vue index f7eebbb9c..d1c3d5f29 100644 --- a/src/client/pages/settings/mute-block.vue +++ b/src/client/pages/settings/mute-block.vue @@ -42,6 +42,7 @@ import FormBase from '@client/components/form/base.vue'; import FormGroup from '@client/components/form/group.vue'; import { userPage } from '@client/filters/user'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -57,7 +58,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.muteAndBlock, icon: faBan }, @@ -74,7 +75,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/notifications.vue b/src/client/pages/settings/notifications.vue index b26c2805a..ea72bcfee 100644 --- a/src/client/pages/settings/notifications.vue +++ b/src/client/pages/settings/notifications.vue @@ -19,6 +19,7 @@ import FormBase from '@client/components/form/base.vue'; import FormGroup from '@client/components/form/group.vue'; import { notificationTypes } from '../../../types'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -32,7 +33,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.notifications, icon: faBell }, @@ -41,7 +42,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/other.vue b/src/client/pages/settings/other.vue index e5cfc5ee1..2bd9c2476 100644 --- a/src/client/pages/settings/other.vue +++ b/src/client/pages/settings/other.vue @@ -44,6 +44,7 @@ import { debug } from '@client/config'; import { defaultStore } from '@client/store'; import { signout } from '@client/account'; import { unisonReload } from '@client/scripts/unison-reload'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -59,7 +60,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.other, icon: faEllipsisH }, @@ -73,7 +74,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/plugin.install.vue b/src/client/pages/settings/plugin.install.vue index 70c302b36..ecda0a4e0 100644 --- a/src/client/pages/settings/plugin.install.vue +++ b/src/client/pages/settings/plugin.install.vue @@ -29,6 +29,7 @@ import MkInfo from '@client/components/ui/info.vue'; import * as os from '@client/os'; import { ColdDeviceStorage } from '@client/store'; import { unisonReload } from '@client/scripts/unison-reload'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -46,7 +47,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts._plugin.install, icon: faDownload }, @@ -56,7 +57,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/plugin.manage.vue b/src/client/pages/settings/plugin.manage.vue index 0bc04493a..16d2225d0 100644 --- a/src/client/pages/settings/plugin.manage.vue +++ b/src/client/pages/settings/plugin.manage.vue @@ -42,6 +42,7 @@ import FormBase from '@client/components/form/base.vue'; import FormGroup from '@client/components/form/group.vue'; import * as os from '@client/os'; import { ColdDeviceStorage } from '@client/store'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -58,7 +59,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts._plugin.manage, icon: faPlug }, @@ -68,7 +69,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/plugin.vue b/src/client/pages/settings/plugin.vue index b101420d0..bee4e57ec 100644 --- a/src/client/pages/settings/plugin.vue +++ b/src/client/pages/settings/plugin.vue @@ -13,6 +13,7 @@ import FormGroup from '@client/components/form/group.vue'; import FormLink from '@client/components/form/link.vue'; import * as os from '@client/os'; import { ColdDeviceStorage } from '@client/store'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -24,7 +25,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.plugins, icon: faPlug }, @@ -34,7 +35,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, }); diff --git a/src/client/pages/settings/privacy.vue b/src/client/pages/settings/privacy.vue index f58faab0b..0542c527f 100644 --- a/src/client/pages/settings/privacy.vue +++ b/src/client/pages/settings/privacy.vue @@ -36,6 +36,7 @@ import FormBase from '@client/components/form/base.vue'; import FormGroup from '@client/components/form/group.vue'; import * as os from '@client/os'; import { defaultStore } from '@client/store'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -49,7 +50,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.privacy, icon: faLockOpen }, @@ -74,7 +75,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/profile.vue b/src/client/pages/settings/profile.vue index 61f0a8e19..5ec580a20 100644 --- a/src/client/pages/settings/profile.vue +++ b/src/client/pages/settings/profile.vue @@ -59,6 +59,7 @@ import FormGroup from '@client/components/form/group.vue'; import { host, langs } from '@client/config'; import { selectFile } from '@client/scripts/select-file'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -75,7 +76,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.profile, icon: faUser }, @@ -136,7 +137,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/reaction.vue b/src/client/pages/settings/reaction.vue index 170f8c9a0..0293f53fa 100644 --- a/src/client/pages/settings/reaction.vue +++ b/src/client/pages/settings/reaction.vue @@ -45,6 +45,7 @@ import FormBase from '@client/components/form/base.vue'; import FormButton from '@client/components/form/button.vue'; import * as os from '@client/os'; import { defaultStore } from '@client/store'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -59,7 +60,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.reaction, icon: faLaugh, action: { @@ -87,7 +88,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/registry.keys.vue b/src/client/pages/settings/registry.keys.vue index 243672000..d2fd75aca 100644 --- a/src/client/pages/settings/registry.keys.vue +++ b/src/client/pages/settings/registry.keys.vue @@ -33,6 +33,7 @@ import FormGroup from '@client/components/form/group.vue'; import FormButton from '@client/components/form/button.vue'; import FormKeyValueView from '@client/components/form/key-value-view.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -56,7 +57,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.registry, icon: faCogs }, @@ -71,7 +72,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); this.fetch(); }, diff --git a/src/client/pages/settings/registry.value.vue b/src/client/pages/settings/registry.value.vue index e760e4b1e..bba92bb74 100644 --- a/src/client/pages/settings/registry.value.vue +++ b/src/client/pages/settings/registry.value.vue @@ -48,6 +48,7 @@ import FormGroup from '@client/components/form/group.vue'; import FormButton from '@client/components/form/button.vue'; import FormKeyValueView from '@client/components/form/key-value-view.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -74,7 +75,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.registry, icon: faCogs }, @@ -91,7 +92,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); this.fetch(); }, diff --git a/src/client/pages/settings/registry.vue b/src/client/pages/settings/registry.vue index 5e061f95f..a09c309d3 100644 --- a/src/client/pages/settings/registry.vue +++ b/src/client/pages/settings/registry.vue @@ -21,6 +21,7 @@ import FormGroup from '@client/components/form/group.vue'; import FormButton from '@client/components/form/button.vue'; import FormKeyValueView from '@client/components/form/key-value-view.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -38,7 +39,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.registry, icon: faCogs }, @@ -51,7 +52,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/security.vue b/src/client/pages/settings/security.vue index 7d6aaa652..64733c55a 100644 --- a/src/client/pages/settings/security.vue +++ b/src/client/pages/settings/security.vue @@ -32,6 +32,7 @@ import FormGroup from '@client/components/form/group.vue'; import FormButton from '@client/components/form/button.vue'; import FormPagination from '@client/components/form/pagination.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -46,7 +47,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.security, icon: faLock }, @@ -59,7 +60,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/sidebar.vue b/src/client/pages/settings/sidebar.vue index bbb1b43af..adeec2f63 100644 --- a/src/client/pages/settings/sidebar.vue +++ b/src/client/pages/settings/sidebar.vue @@ -29,6 +29,7 @@ import FormButton from '@client/components/form/button.vue'; import * as os from '@client/os'; import { sidebarDef } from '@client/sidebar'; import { defaultStore } from '@client/store'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -42,7 +43,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.sidebar, icon: faListUl }, @@ -65,7 +66,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/sounds.vue b/src/client/pages/settings/sounds.vue index 830574410..54be00311 100644 --- a/src/client/pages/settings/sounds.vue +++ b/src/client/pages/settings/sounds.vue @@ -28,6 +28,7 @@ import FormGroup from '@client/components/form/group.vue'; import * as os from '@client/os'; import { ColdDeviceStorage } from '@client/store'; import { playFile } from '@client/scripts/sound'; +import * as symbols from '@client/symbols'; const soundsTypes = [ null, @@ -68,7 +69,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.sounds, icon: faMusic }, @@ -100,7 +101,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/theme.install.vue b/src/client/pages/settings/theme.install.vue index 618438365..744d1aba4 100644 --- a/src/client/pages/settings/theme.install.vue +++ b/src/client/pages/settings/theme.install.vue @@ -26,6 +26,7 @@ import { applyTheme, validateTheme } from '@client/scripts/theme'; import * as os from '@client/os'; import { ColdDeviceStorage } from '@client/store'; import { addTheme, getThemes } from '@client/theme-store'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -42,7 +43,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts._theme.install, icon: faDownload }, @@ -52,7 +53,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/theme.manage.vue b/src/client/pages/settings/theme.manage.vue index da7bb2703..c05576b27 100644 --- a/src/client/pages/settings/theme.manage.vue +++ b/src/client/pages/settings/theme.manage.vue @@ -38,6 +38,7 @@ import copyToClipboard from '@client/scripts/copy-to-clipboard'; import * as os from '@client/os'; import { ColdDeviceStorage } from '@client/store'; import { getThemes, removeTheme } from '@client/theme-store'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -54,7 +55,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts._theme.manage, icon: faFolderOpen }, @@ -82,7 +83,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/settings/theme.vue b/src/client/pages/settings/theme.vue index 14cdb533a..4aba6ea4d 100644 --- a/src/client/pages/settings/theme.vue +++ b/src/client/pages/settings/theme.vue @@ -78,6 +78,7 @@ import { ColdDeviceStorage } from '@client/store'; import { i18n } from '@client/i18n'; import { defaultStore } from '@client/store'; import { fetchThemes, getThemes } from '@client/theme-store'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -144,7 +145,7 @@ export default defineComponent({ }); return { - INFO, + [symbols.PAGE_INFO]: INFO, darkThemes, lightThemes, darkTheme, diff --git a/src/client/pages/settings/update.vue b/src/client/pages/settings/update.vue index bc26af421..fb1458da8 100644 --- a/src/client/pages/settings/update.vue +++ b/src/client/pages/settings/update.vue @@ -41,6 +41,7 @@ import FormKeyValueView from '@client/components/form/key-value-view.vue'; import MkInfo from '@client/components/ui/info.vue'; import * as os from '@client/os'; import { version, instanceName } from '@client/config'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -58,7 +59,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: 'Misskey Update', icon: faSyncAlt }, @@ -70,7 +71,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); os.api('meta', { detail: false diff --git a/src/client/pages/settings/word-mute.vue b/src/client/pages/settings/word-mute.vue index 26cc7a3d8..029eb5d41 100644 --- a/src/client/pages/settings/word-mute.vue +++ b/src/client/pages/settings/word-mute.vue @@ -41,6 +41,7 @@ import MkTab from '@client/components/tab.vue'; import MkInfo from '@client/components/ui/info.vue'; import * as os from '@client/os'; import number from '@client/filters/number'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -56,7 +57,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.wordMute, icon: faCommentSlash }, @@ -92,7 +93,7 @@ export default defineComponent({ }, mounted() { - this.$emit('info', this.INFO); + this.$emit('info', this[symbols.PAGE_INFO]); }, methods: { diff --git a/src/client/pages/share.vue b/src/client/pages/share.vue index 41ce4d21f..313b73b9c 100644 --- a/src/client/pages/share.vue +++ b/src/client/pages/share.vue @@ -17,6 +17,7 @@ import { faShareAlt } from '@fortawesome/free-solid-svg-icons'; import MkButton from '@client/components/ui/button.vue'; import XPostForm from '@client/components/post-form.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -26,7 +27,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.share, icon: faShareAlt }, diff --git a/src/client/pages/tag.vue b/src/client/pages/tag.vue index 7561eba2e..813181dd1 100644 --- a/src/client/pages/tag.vue +++ b/src/client/pages/tag.vue @@ -9,6 +9,7 @@ import { defineComponent } from 'vue'; import { faHashtag } from '@fortawesome/free-solid-svg-icons'; import Progress from '@client/scripts/loading'; import XNotes from '@client/components/notes.vue'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -24,7 +25,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.tag, icon: faHashtag }, diff --git a/src/client/pages/test.vue b/src/client/pages/test.vue index af8395b2c..cbfdd16c8 100644 --- a/src/client/pages/test.vue +++ b/src/client/pages/test.vue @@ -139,6 +139,7 @@ import MkSwitch from '@client/components/ui/switch.vue'; import MkTextarea from '@client/components/ui/textarea.vue'; import MkRadio from '@client/components/ui/radio.vue'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -151,7 +152,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: 'TEST', icon: faExclamationTriangle }, diff --git a/src/client/pages/theme-editor.vue b/src/client/pages/theme-editor.vue index a28510dcd..8d0ba3e18 100644 --- a/src/client/pages/theme-editor.vue +++ b/src/client/pages/theme-editor.vue @@ -67,6 +67,7 @@ import { host } from '@client/config'; import * as os from '@client/os'; import { ColdDeviceStorage } from '@client/store'; import { addTheme } from '@client/theme-store'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -78,7 +79,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: this.$ts.themeEditor, icon: faPalette, }, diff --git a/src/client/pages/timeline.vue b/src/client/pages/timeline.vue index 0d8e5b0ec..da8162712 100644 --- a/src/client/pages/timeline.vue +++ b/src/client/pages/timeline.vue @@ -44,6 +44,7 @@ import XTimeline from '@client/components/timeline.vue'; import XPostForm from '@client/components/post-form.vue'; import { scroll } from '@client/scripts/scroll'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ name: 'timeline', @@ -63,7 +64,7 @@ export default defineComponent({ menuOpened: false, queue: 0, width: 0, - INFO: computed(() => ({ + [symbols.PAGE_INFO]: computed(() => ({ title: this.$ts.timeline, icon: this.src === 'local' ? faComments : this.src === 'social' ? faShareAlt : this.src === 'global' ? faGlobe : faHome, action: { diff --git a/src/client/pages/user/index.vue b/src/client/pages/user/index.vue index 18f78d270..1adf57f60 100644 --- a/src/client/pages/user/index.vue +++ b/src/client/pages/user/index.vue @@ -237,6 +237,7 @@ import number from '../../filters/number'; import { userPage, acct as getAcct } from '../../filters/user'; import * as os from '@client/os'; import { url } from '@client/config'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -268,7 +269,7 @@ export default defineComponent({ data() { return { - INFO: computed(() => this.user ? { + [symbols.PAGE_INFO]: computed(() => this.user ? { userName: this.user, avatar: this.user, share: { diff --git a/src/client/pages/v.vue b/src/client/pages/v.vue index a9deea24b..37a850b62 100644 --- a/src/client/pages/v.vue +++ b/src/client/pages/v.vue @@ -14,11 +14,12 @@ import { defineComponent } from 'vue'; import { faInfoCircle } from '@fortawesome/free-solid-svg-icons'; import { version } from '@client/config'; +import * as symbols from '@client/symbols'; export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: 'Misskey', icon: null }, diff --git a/src/client/pages/welcome.vue b/src/client/pages/welcome.vue index 845a30485..b6a715830 100644 --- a/src/client/pages/welcome.vue +++ b/src/client/pages/welcome.vue @@ -11,6 +11,7 @@ import XSetup from './welcome.setup.vue'; import XEntrance from './welcome.entrance.a.vue'; import { instanceName } from '@client/config'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -20,7 +21,7 @@ export default defineComponent({ data() { return { - INFO: { + [symbols.PAGE_INFO]: { title: instanceName, icon: null }, diff --git a/src/client/symbols.ts b/src/client/symbols.ts new file mode 100644 index 000000000..6913f29c2 --- /dev/null +++ b/src/client/symbols.ts @@ -0,0 +1 @@ +export const PAGE_INFO = Symbol('Page info'); diff --git a/src/client/ui/chat/side.vue b/src/client/ui/chat/side.vue index a3c03b6d0..2f182175b 100644 --- a/src/client/ui/chat/side.vue +++ b/src/client/ui/chat/side.vue @@ -17,6 +17,7 @@ import * as os from '@client/os'; import copyToClipboard from '@client/scripts/copy-to-clipboard'; import { resolve } from '@client/router'; import { url } from '@client/config'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -51,8 +52,8 @@ export default defineComponent({ methods: { changePage(page) { if (page == null) return; - if (page.INFO) { - this.pageInfo = page.INFO; + if (page[symbols.PAGE_INFO]) { + this.pageInfo = page[symbols.PAGE_INFO]; } }, diff --git a/src/client/ui/deck/main-column.vue b/src/client/ui/deck/main-column.vue index 5a8c72d87..2206fa5e1 100644 --- a/src/client/ui/deck/main-column.vue +++ b/src/client/ui/deck/main-column.vue @@ -22,6 +22,7 @@ import XNotes from '@client/components/notes.vue'; import XHeader from '@client/ui/_common_/header.vue'; import { deckStore } from '@client/ui/deck/deck-store'; import * as os from '@client/os'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -51,8 +52,8 @@ export default defineComponent({ methods: { changePage(page) { if (page == null) return; - if (page.INFO) { - this.pageInfo = page.INFO; + if (page[symbols.PAGE_INFO]) { + this.pageInfo = page[symbols.PAGE_INFO]; } }, diff --git a/src/client/ui/default.side.vue b/src/client/ui/default.side.vue index 3a32cb4e1..89b648244 100644 --- a/src/client/ui/default.side.vue +++ b/src/client/ui/default.side.vue @@ -20,6 +20,7 @@ import * as os from '@client/os'; import copyToClipboard from '@client/scripts/copy-to-clipboard'; import { resolve } from '@client/router'; import { url } from '@client/config'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -54,8 +55,8 @@ export default defineComponent({ methods: { changePage(page) { if (page == null) return; - if (page.INFO) { - this.pageInfo = page.INFO; + if (page[symbols.PAGE_INFO]) { + this.pageInfo = page[symbols.PAGE_INFO]; } }, diff --git a/src/client/ui/default.vue b/src/client/ui/default.vue index 84d6c0109..78f754184 100644 --- a/src/client/ui/default.vue +++ b/src/client/ui/default.vue @@ -63,6 +63,7 @@ import XCommon from './_common_/common.vue'; import XHeader from './_common_/header.vue'; import * as os from '@client/os'; import { sidebarDef } from '@client/sidebar'; +import * as symbols from '@client/symbols'; const DESKTOP_THRESHOLD = 1100; const MOBILE_THRESHOLD = 600; @@ -125,8 +126,8 @@ export default defineComponent({ methods: { changePage(page) { if (page == null) return; - if (page.INFO) { - this.pageInfo = page.INFO; + if (page[symbols.PAGE_INFO]) { + this.pageInfo = page[symbols.PAGE_INFO]; document.title = `${this.pageInfo.title} | ${instanceName}`; } }, diff --git a/src/client/ui/universal.vue b/src/client/ui/universal.vue index e1b368c25..1387b02b2 100644 --- a/src/client/ui/universal.vue +++ b/src/client/ui/universal.vue @@ -64,6 +64,7 @@ import XHeader from './_common_/header.vue'; import XSide from './default.side.vue'; import * as os from '@client/os'; import { sidebarDef } from '@client/sidebar'; +import * as symbols from '@client/symbols'; const DESKTOP_THRESHOLD = 1100; @@ -144,8 +145,8 @@ export default defineComponent({ methods: { changePage(page) { if (page == null) return; - if (page.INFO) { - this.pageInfo = page.INFO; + if (page[symbols.PAGE_INFO]) { + this.pageInfo = page[symbols.PAGE_INFO]; document.title = `${this.pageInfo.title} | ${instanceName}`; } }, diff --git a/src/client/ui/visitor/a.vue b/src/client/ui/visitor/a.vue index ba4506ec5..1b080c9e8 100644 --- a/src/client/ui/visitor/a.vue +++ b/src/client/ui/visitor/a.vue @@ -49,6 +49,7 @@ import MkPagination from '@client/components/ui/pagination.vue'; import MkButton from '@client/components/ui/button.vue'; import XHeader from './header.vue'; import { ColdDeviceStorage } from '@client/store'; +import * as symbols from '@client/symbols'; const DESKTOP_THRESHOLD = 1100; @@ -110,8 +111,8 @@ export default defineComponent({ changePage(page) { if (page == null) return; - if (page.INFO) { - this.pageInfo = page.INFO; + if (page[symbols.PAGE_INFO]) { + this.pageInfo = page[symbols.PAGE_INFO]; } }, diff --git a/src/client/ui/visitor/b.vue b/src/client/ui/visitor/b.vue index 34690ec64..da2ae4518 100644 --- a/src/client/ui/visitor/b.vue +++ b/src/client/ui/visitor/b.vue @@ -61,6 +61,7 @@ import MkButton from '@client/components/ui/button.vue'; import XHeader from './header.vue'; import XKanban from './kanban.vue'; import { ColdDeviceStorage } from '@client/store'; +import * as symbols from '@client/symbols'; const DESKTOP_THRESHOLD = 1100; @@ -124,8 +125,8 @@ export default defineComponent({ methods: { changePage(page) { if (page == null) return; - if (page.INFO) { - this.pageInfo = page.INFO; + if (page[symbols.PAGE_INFO]) { + this.pageInfo = page[symbols.PAGE_INFO]; } }, diff --git a/src/client/ui/zen.vue b/src/client/ui/zen.vue index 321eb1a02..af3e53225 100644 --- a/src/client/ui/zen.vue +++ b/src/client/ui/zen.vue @@ -28,6 +28,7 @@ import { faBell } from '@fortawesome/free-regular-svg-icons'; import { host } from '@client/config'; import XHeader from './_common_/header.vue'; import XCommon from './_common_/common.vue'; +import * as symbols from '@client/symbols'; export default defineComponent({ components: { @@ -50,8 +51,8 @@ export default defineComponent({ methods: { changePage(page) { if (page == null) return; - if (page.INFO) { - this.pageInfo = page.INFO; + if (page[symbols.PAGE_INFO]) { + this.pageInfo = page[symbols.PAGE_INFO]; } },