chg: [front] Improved socket state UI

This commit is contained in:
Sami Mokaddem 2024-07-01 08:31:28 +02:00
parent b71af55b1a
commit c9d90283eb

View file

@ -6,9 +6,13 @@
</script>
<template>
<span class="text-slate-900 dark:text-slate-400 shadow-blue-500/50">
<span :class="{
'px-2 py-1 rounded-md inline-block w-48': true,
'text-slate-900 dark:text-slate-400': socketConnected,
'text-slate-50 bg-red-600': !socketConnected,
}">
<span class="mr-1">Socket.IO:</span>
<span v-show="socketConnected" class="font-semibold text-green-600 dark:text-green-400">Connected</span>
<span v-show="!socketConnected" class="font-semibold text-red-500">Disconnected</span>
<span v-show="!socketConnected" class="font-semibold text-slate-50">Disconnected</span>
</span>
</template>