feat: open server info by clicking the ticker
This commit is contained in:
parent
d004df52be
commit
fbe1ab1b85
@ -4,6 +4,7 @@
|
|||||||
v-tooltip="capitalize(instance.softwareName)"
|
v-tooltip="capitalize(instance.softwareName)"
|
||||||
class="hpaizdrt"
|
class="hpaizdrt"
|
||||||
:style="bg"
|
:style="bg"
|
||||||
|
@click.stop="os.pageWindow(instanceInfoUrl)"
|
||||||
>
|
>
|
||||||
<img class="icon" :src="getInstanceIcon(instance)" aria-hidden="true" />
|
<img class="icon" :src="getInstanceIcon(instance)" aria-hidden="true" />
|
||||||
<span class="name">{{ instance.name }}</span>
|
<span class="name">{{ instance.name }}</span>
|
||||||
@ -16,6 +17,7 @@ import { ref } from "vue";
|
|||||||
import { instanceName } from "@/config";
|
import { instanceName } from "@/config";
|
||||||
import { instance as Instance } from "@/instance";
|
import { instance as Instance } from "@/instance";
|
||||||
import { getProxiedImageUrlNullable } from "@/scripts/media-proxy";
|
import { getProxiedImageUrlNullable } from "@/scripts/media-proxy";
|
||||||
|
import * as os from "@/os";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
instance?: {
|
instance?: {
|
||||||
@ -24,6 +26,7 @@ const props = defineProps<{
|
|||||||
themeColor?: string;
|
themeColor?: string;
|
||||||
softwareName?: string;
|
softwareName?: string;
|
||||||
};
|
};
|
||||||
|
host: string | null;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const ticker = ref<HTMLElement | null>(null);
|
const ticker = ref<HTMLElement | null>(null);
|
||||||
@ -40,6 +43,9 @@ const instance = props.instance ?? {
|
|||||||
softwareName: Instance.softwareName ?? "Firefish",
|
softwareName: Instance.softwareName ?? "Firefish",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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,6 +40,7 @@
|
|||||||
v-if="showTicker"
|
v-if="showTicker"
|
||||||
class="ticker"
|
class="ticker"
|
||||||
:instance="note.user.instance"
|
:instance="note.user.instance"
|
||||||
|
:host="note.user.host"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user