feat: open server info by clicking the ticker

This commit is contained in:
naskya 2023-09-17 10:04:58 +09:00
parent d004df52be
commit fbe1ab1b85
No known key found for this signature in database
GPG Key ID: 164DFF24E2D40139
2 changed files with 7 additions and 0 deletions

View File

@ -4,6 +4,7 @@
v-tooltip="capitalize(instance.softwareName)"
class="hpaizdrt"
:style="bg"
@click.stop="os.pageWindow(instanceInfoUrl)"
>
<img class="icon" :src="getInstanceIcon(instance)" aria-hidden="true" />
<span class="name">{{ instance.name }}</span>
@ -16,6 +17,7 @@ import { ref } from "vue";
import { instanceName } from "@/config";
import { instance as Instance } from "@/instance";
import { getProxiedImageUrlNullable } from "@/scripts/media-proxy";
import * as os from "@/os";
const props = defineProps<{
instance?: {
@ -24,6 +26,7 @@ const props = defineProps<{
themeColor?: string;
softwareName?: string;
};
host: string | null;
}>();
const ticker = ref<HTMLElement | null>(null);
@ -40,6 +43,9 @@ const instance = props.instance ?? {
softwareName: Instance.softwareName ?? "Firefish",
};
const instanceInfoUrl =
props.host == null ? "/about" : `/instance-info/${props.host}`;
const commonNames = new Map<string, string>([
["birdsitelive", "BirdsiteLIVE"],
["bookwyrm", "BookWyrm"],

View File

@ -40,6 +40,7 @@
v-if="showTicker"
class="ticker"
:instance="note.user.instance"
:host="note.user.host"
/>
</div>
</div>