forked from naskya/firefish
fix: unable to open server info by clicking tickers
This commit is contained in:
parent
9f66a25edd
commit
2f9a48b1ac
2 changed files with 3 additions and 12 deletions
|
@ -27,7 +27,6 @@ const props = defineProps<{
|
||||||
softwareName?: string;
|
softwareName?: string;
|
||||||
softwareVersion?: string;
|
softwareVersion?: string;
|
||||||
};
|
};
|
||||||
host: string | null;
|
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const ticker = ref<HTMLElement | null>(null);
|
const ticker = ref<HTMLElement | null>(null);
|
||||||
|
@ -45,9 +44,6 @@ const instance = props.instance ?? {
|
||||||
softwareVersion: version,
|
softwareVersion: version,
|
||||||
};
|
};
|
||||||
|
|
||||||
const instanceInfoUrl =
|
|
||||||
props.host == null ? "/about" : `/instance-info/${props.host}`;
|
|
||||||
|
|
||||||
const commonNames = new Map<string, string>([
|
const commonNames = new Map<string, string>([
|
||||||
["birdsitelive", "BirdsiteLIVE"],
|
["birdsitelive", "BirdsiteLIVE"],
|
||||||
["bookwyrm", "BookWyrm"],
|
["bookwyrm", "BookWyrm"],
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
v-if="showTicker"
|
v-if="showTicker"
|
||||||
class="ticker"
|
class="ticker"
|
||||||
:instance="note.user.instance"
|
:instance="note.user.instance"
|
||||||
:host="note.user.host"
|
|
||||||
@click.stop="openServerInfo"
|
@click.stop="openServerInfo"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -74,15 +73,11 @@ const showTicker =
|
||||||
note.value.user.instance);
|
note.value.user.instance);
|
||||||
|
|
||||||
function openServerInfo() {
|
function openServerInfo() {
|
||||||
if (
|
if (!props.canOpenServerInfo || !defaultStore.state.openServerInfo) return;
|
||||||
(props.canOpenServerInfo && !defaultStore.state.openServerInfo) ||
|
|
||||||
!note.value.user.instance
|
|
||||||
)
|
|
||||||
return;
|
|
||||||
const instanceInfoUrl =
|
const instanceInfoUrl =
|
||||||
props.host == null
|
note.value.user.host == null
|
||||||
? "/about"
|
? "/about"
|
||||||
: `/instance-info/${note.value.user.instance}`;
|
: `/instance-info/${note.value.user.host}`;
|
||||||
pageWindow(instanceInfoUrl);
|
pageWindow(instanceInfoUrl);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue