Manually apply

Signed-off-by: limepotato <limepot@protonmail.ch>
This commit is contained in:
nelle 2024-07-05 22:19:06 -06:00
parent c8ab8e762b
commit 0a448813dd

View file

@ -4,6 +4,7 @@
v-tooltip="capitalize(instance.softwareName)"
ref="ticker"
:style="bg"
@click.stop="os.pageWindow(instanceInfoUrl)"
>
<img class="icon" :src="getInstanceIcon(instance)" aria-hidden="true" />
<span class="name">{{ instance.name }}</span>
@ -14,6 +15,7 @@
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?: {
@ -22,6 +24,7 @@ const props = defineProps<{
themeColor?: string;
softwareName?: string;
};
host: string | null;
}>();
let ticker = $ref<HTMLElement | null>(null);
@ -38,6 +41,9 @@ const instance = props.instance ?? {
softwareName: Instance.softwareName || "Iceshrimp",
};
const instanceInfoUrl =
props.host == null ? "/about" : `/instance-info/${props.host}`;
const capitalize = (s: string) => s && s[0].toUpperCase() + s.slice(1);
const computedStyle = getComputedStyle(document.documentElement);