fix: address review — error state for live indicator (#172)

This commit is contained in:
openhands 2026-02-22 22:12:38 +00:00
parent 7d5d8cabb2
commit 1b55ae8ac8

View file

@ -1,7 +1,7 @@
<template>
<div v-if="!error && stats" class="live-stats">
<div class="live-header">
<span class="live-dot"></span>
<span class="live-dot" :class="{ 'live-dot-error': error }"></span>
<span class="live-text">Live</span>
</div>
<div class="stats-grid" :class="{ 'has-floor': showFloorPrice }">
@ -47,7 +47,7 @@
<div class="growth-badge growth-flat">{{ lastRebalance }}</div>
</div>
</div>
<div class="freshness">Updated {{ secondsSinceUpdate }}s ago</div>
<div class="freshness">{{ error ? 'Connection lost' : `Updated ${secondsSinceUpdate}s ago` }}</div>
</div>
<div v-else-if="!error && !stats" class="live-stats">
<div class="stats-grid">
@ -638,6 +638,10 @@ onUnmounted(() => {
background: #4ade80
animation: dot-pulse 2s ease-in-out infinite
.live-dot-error
background: #ef4444
animation: none
.live-text
font-size: 11px
color: rgba(240, 240, 240, 0.5)