client: dont display tooltip if software name unknown

Changelog: Fixed
This commit is contained in:
Johann150 2023-01-02 21:51:13 +01:00
parent 5b898c6c82
commit e0560dbe9e
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -1,5 +1,5 @@
<template>
<div v-tooltip="instance.softwareName + ' ' + instance.softwareVersion" class="hpaizdrt" :style="bg">
<div v-tooltip="tooltip" class="hpaizdrt" :style="bg">
<img v-if="instance.faviconUrl" class="icon" :src="instance.faviconUrl"/>
<span class="name">{{ instance.name ?? host }}</span>
<span v-if="instance.softwareName" class="software">{{ instance.softwareName }}</span>
@ -35,6 +35,10 @@ const themeColor = instance.themeColor ?? '#777777';
const bg = {
background: `linear-gradient(90deg, ${themeColor}, ${themeColor}00)`,
};
const tooltip = instance.softwareName == null || instance.softwareVersion == null
? null
: instance.softwareName + ' ' + instance.softwareVersion;
</script>
<style lang="scss" scoped>