From 2f9a48b1acd2dbeb771c2a3db9f23cbed4e88e50 Mon Sep 17 00:00:00 2001 From: naskya Date: Fri, 22 Sep 2023 15:46:38 +0900 Subject: [PATCH] fix: unable to open server info by clicking tickers --- packages/client/src/components/MkInstanceTicker.vue | 4 ---- packages/client/src/components/MkNoteHeader.vue | 11 +++-------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/packages/client/src/components/MkInstanceTicker.vue b/packages/client/src/components/MkInstanceTicker.vue index 1fe55f8e5..a365cbc87 100644 --- a/packages/client/src/components/MkInstanceTicker.vue +++ b/packages/client/src/components/MkInstanceTicker.vue @@ -27,7 +27,6 @@ const props = defineProps<{ softwareName?: string; softwareVersion?: string; }; - host: string | null; }>(); const ticker = ref(null); @@ -45,9 +44,6 @@ const instance = props.instance ?? { softwareVersion: version, }; -const instanceInfoUrl = - props.host == null ? "/about" : `/instance-info/${props.host}`; - const commonNames = new Map([ ["birdsitelive", "BirdsiteLIVE"], ["bookwyrm", "BookWyrm"], diff --git a/packages/client/src/components/MkNoteHeader.vue b/packages/client/src/components/MkNoteHeader.vue index 2b6eb217c..f70e2476e 100644 --- a/packages/client/src/components/MkNoteHeader.vue +++ b/packages/client/src/components/MkNoteHeader.vue @@ -40,7 +40,6 @@ v-if="showTicker" class="ticker" :instance="note.user.instance" - :host="note.user.host" @click.stop="openServerInfo" /> @@ -74,15 +73,11 @@ const showTicker = note.value.user.instance); function openServerInfo() { - if ( - (props.canOpenServerInfo && !defaultStore.state.openServerInfo) || - !note.value.user.instance - ) - return; + if (!props.canOpenServerInfo || !defaultStore.state.openServerInfo) return; const instanceInfoUrl = - props.host == null + note.value.user.host == null ? "/about" - : `/instance-info/${note.value.user.instance}`; + : `/instance-info/${note.value.user.host}`; pageWindow(instanceInfoUrl); }