style: show online status indicator only when available

This commit is contained in:
naskya 2024-02-22 17:24:20 +09:00
parent 26b8b479cd
commit 8a1bc7c085
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -1,5 +1,10 @@
<template>
<div v-tooltip="text" class="fzgwjkgc" :class="user.onlineStatus"></div>
<div
v-if="user.onlineStatus !== 'unknown'"
v-tooltip="text"
class="fzgwjkgc"
:class="user.onlineStatus"
></div>
</template>
<script lang="ts" setup>
@ -20,8 +25,6 @@ const text = computed(() => {
return i18n.ts.active;
case "offline":
return i18n.ts.offline;
case "unknown":
return i18n.ts.unknown;
}
});
</script>
@ -42,9 +45,5 @@ const text = computed(() => {
&.offline {
background: #eb6f92;
}
&.unknown {
background: #6e6a86;
}
}
</style>