fix openServerInfo

This commit is contained in:
naskya 2023-09-22 15:54:16 +09:00
parent f70f208f05
commit c468bf9ed7
No known key found for this signature in database
GPG key ID: 164DFF24E2D40139
2 changed files with 3 additions and 9 deletions

View file

@ -24,7 +24,6 @@ const props = defineProps<{
themeColor?: string;
softwareName?: string;
};
host: string | null;
}>();
const ticker = ref<HTMLElement | null>(null);

View file

@ -40,7 +40,6 @@
v-if="showTicker"
class="ticker"
:instance="note.user.instance"
:host="note.user.host"
@click.stop="openServerInfo"
/>
</div>
@ -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);
}
</script>