capitalize string

This commit is contained in:
ThatOneCalculator 2023-04-16 17:50:05 -07:00
parent 2a8b9dc92a
commit dfd20a3a22
No known key found for this signature in database
GPG Key ID: 8703CACD01000000

View File

@ -1,6 +1,6 @@
<template>
<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>
</div>
</template>
@ -33,6 +33,8 @@ const instance = props.instance ?? {
software: Instance.softwareName || "Calckey",
};
const capitalize = (s: string) => s && s[0].toUpperCase() + s.slice(1)
const computedStyle = getComputedStyle(document.documentElement);
const themeColor =
instance.themeColor ?? computedStyle.getPropertyValue("--bg");