Skip to content

Commit e3891ff

Browse files
committed
fix: add offline badge to NodeCardWidget for disconnected nodes
- Introduced a new badge that displays "offline" in red when a node is not connected or has zero uptime
1 parent bbb2188 commit e3891ff

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/widgets/dashboard/nodes/node-card/node-card.widget.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,20 @@ export function NodeCardWidget(props: IProps) {
169169
</Badge>
170170
)}
171171

172+
{(!node.isConnected || node.xrayUptime === '0') && (
173+
<Badge
174+
color="red"
175+
leftSection={<PiCpu size={18} />}
176+
maw={'20ch'}
177+
radius="md"
178+
size="lg"
179+
style={{ cursor: 'pointer' }}
180+
variant="outline"
181+
>
182+
offline
183+
</Badge>
184+
)}
185+
172186
<Badge
173187
autoContrast
174188
color={'gray'}

0 commit comments

Comments
 (0)