From ce406f986131070166712882c635d91237fc1824 Mon Sep 17 00:00:00 2001 From: naskya Date: Thu, 7 Mar 2024 10:52:32 +0900 Subject: [PATCH] refactor (client): $instance -> instance --- packages/client/src/components/MkDonation.vue | 6 +++--- packages/client/src/init.ts | 1 - packages/client/src/instance.ts | 7 ------- packages/client/src/pages/about-firefish.vue | 3 ++- packages/client/src/pages/about.emojis.vue | 9 +++++++-- packages/client/src/pages/about.vue | 20 +++++++++---------- packages/client/src/pages/admin/index.vue | 6 +++--- packages/client/src/ui/_common_/navbar.vue | 6 ------ packages/client/src/ui/visitor/a.vue | 5 +++-- packages/client/src/ui/visitor/kanban.vue | 4 +++- packages/client/src/widgets/server-info.vue | 9 +++++---- 11 files changed, 36 insertions(+), 40 deletions(-) diff --git a/packages/client/src/components/MkDonation.vue b/packages/client/src/components/MkDonation.vue index 095dd7a14b..f213867d65 100644 --- a/packages/client/src/components/MkDonation.vue +++ b/packages/client/src/components/MkDonation.vue @@ -10,7 +10,7 @@
{{ i18n.ts._aboutFirefish.pleaseDonateToFirefish }} -

+

{{ i18n.t("_aboutFirefish.pleaseDonateToHost", { host: hostname, @@ -27,9 +27,9 @@ >{{ i18n.ts._aboutFirefish.donate }} {{ i18n.t("_aboutFirefish.donateHost", { host: hostname, diff --git a/packages/client/src/init.ts b/packages/client/src/init.ts index c5e003ed18..859f5211ce 100644 --- a/packages/client/src/init.ts +++ b/packages/client/src/init.ts @@ -205,7 +205,6 @@ function checkForSplash() { app.config.globalProperties = { $i, - $instance: instance, }; widgets(app); diff --git a/packages/client/src/instance.ts b/packages/client/src/instance.ts index 319c95b2ea..7a5a7f4def 100644 --- a/packages/client/src/instance.ts +++ b/packages/client/src/instance.ts @@ -46,10 +46,3 @@ export const emojiTags = computed(() => { } return Array.from(tags); }); - -// このファイルに書きたくないけどここに書かないと何故かVeturが認識しない -declare module "@vue/runtime-core" { - interface ComponentCustomProperties { - $instance: typeof instance; - } -} diff --git a/packages/client/src/pages/about-firefish.vue b/packages/client/src/pages/about-firefish.vue index 64c33cee3e..4ddd508fbb 100644 --- a/packages/client/src/pages/about-firefish.vue +++ b/packages/client/src/pages/about-firefish.vue @@ -35,7 +35,7 @@ > diff --git a/packages/client/src/pages/about.vue b/packages/client/src/pages/about.vue index 815611cdd5..0a9c546df6 100644 --- a/packages/client/src/pages/about.vue +++ b/packages/client/src/pages/about.vue @@ -28,7 +28,7 @@

@@ -41,7 +41,7 @@ @click="easterEgg" />
- {{ $instance.name || host }} + {{ instance.name || host }}
@@ -49,7 +49,7 @@ @@ -70,7 +70,7 @@ i18n.ts.administrator }} @@ -78,20 +78,20 @@ i18n.ts.contact }} {{ i18n.ts.tos }} {{ i18n.t("_aboutFirefish.donateHost", { - host: $instance.name || host, + host: instance.name || host, }) }} diff --git a/packages/client/src/pages/admin/index.vue b/packages/client/src/pages/admin/index.vue index 29c43946f3..9a3e0eca49 100644 --- a/packages/client/src/pages/admin/index.vue +++ b/packages/client/src/pages/admin/index.vue @@ -5,7 +5,7 @@
diff --git a/packages/client/src/ui/visitor/a.vue b/packages/client/src/ui/visitor/a.vue index bc8f601457..1010d3a052 100644 --- a/packages/client/src/ui/visitor/a.vue +++ b/packages/client/src/ui/visitor/a.vue @@ -3,7 +3,7 @@