mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 18:07:31 -07:00
capitalize string
This commit is contained in:
parent
61ce6fd0ea
commit
6d47c9d555
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="hpaizdrt" ref="ticker" :style="bg">
|
<div class="hpaizdrt" ref="ticker" :style="bg">
|
||||||
<img v-tooltip="instance.softwareName" class="icon" :src="getInstanceIcon(instance)" aria-hidden="true" />
|
<img v-tooltip="capitalize(instance.softwareName)" class="icon" :src="getInstanceIcon(instance)" aria-hidden="true" />
|
||||||
<span class="name">{{ instance.name }}</span>
|
<span class="name">{{ instance.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -33,6 +33,8 @@ const instance = props.instance ?? {
|
||||||
software: Instance.softwareName || "Calckey",
|
software: Instance.softwareName || "Calckey",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const capitalize = (s: string) => s && s[0].toUpperCase() + s.slice(1)
|
||||||
|
|
||||||
const computedStyle = getComputedStyle(document.documentElement);
|
const computedStyle = getComputedStyle(document.documentElement);
|
||||||
const themeColor =
|
const themeColor =
|
||||||
instance.themeColor ?? computedStyle.getPropertyValue("--bg");
|
instance.themeColor ?? computedStyle.getPropertyValue("--bg");
|
||||||
|
|
Loading…
Reference in a new issue