fix(desktop): gateway restart no longer clickable-by-mistake next to reconnect
Community report (X @Cobalt_Peak): Reconnect and Restart gateway in the statusbar gateway popover rendered the same RefreshCw icon side by side, so users triggered full gateway restarts when they meant to reconnect. - Restart now uses a Power icon with a destructive hover tint - Moved restart to the end of the row, after the system-panel button, behind a visual divider separating it from the benign actions
This commit is contained in:
@@ -6,7 +6,7 @@ import { LogView } from '@/components/ui/log-view'
|
||||
import { Tip } from '@/components/ui/tooltip'
|
||||
import { getLogs } from '@/hermes'
|
||||
import { useI18n } from '@/i18n'
|
||||
import { LayoutDashboard, RefreshCw } from '@/lib/icons'
|
||||
import { LayoutDashboard, Power, RefreshCw } from '@/lib/icons'
|
||||
import type { RuntimeReadinessResult } from '@/lib/runtime-readiness'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { reconnectGateway } from '@/store/gateway-reconnect'
|
||||
@@ -185,17 +185,6 @@ export function GatewayMenuPanel({
|
||||
</Button>
|
||||
</Tip>
|
||||
)}
|
||||
<Tip label={t.commandCenter.restartGateway}>
|
||||
<Button
|
||||
aria-label={t.commandCenter.restartGateway}
|
||||
className="text-muted-foreground hover:text-foreground"
|
||||
onClick={restart}
|
||||
size="icon-xs"
|
||||
variant="ghost"
|
||||
>
|
||||
<RefreshCw />
|
||||
</Button>
|
||||
</Tip>
|
||||
<Tip label={copy.openSystem}>
|
||||
<Button
|
||||
aria-label={copy.openSystem}
|
||||
@@ -207,6 +196,21 @@ export function GatewayMenuPanel({
|
||||
<LayoutDashboard />
|
||||
</Button>
|
||||
</Tip>
|
||||
{/* Restart is the heavy, disruptive action: keep it visually distinct
|
||||
(power icon, destructive hover) and separated from the benign
|
||||
reconnect/system buttons so it can't be hit by mistake. */}
|
||||
<span aria-hidden className="mx-1 h-4 w-px bg-border/70" />
|
||||
<Tip label={t.commandCenter.restartGateway}>
|
||||
<Button
|
||||
aria-label={t.commandCenter.restartGateway}
|
||||
className="text-muted-foreground hover:text-destructive"
|
||||
onClick={restart}
|
||||
size="icon-xs"
|
||||
variant="ghost"
|
||||
>
|
||||
<Power />
|
||||
</Button>
|
||||
</Tip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ import {
|
||||
IconPin as Pin,
|
||||
IconPlayerPlay as Play,
|
||||
IconPlus as Plus,
|
||||
IconPower as Power,
|
||||
IconRefresh as RefreshCw,
|
||||
IconRefresh as RefreshCwIcon,
|
||||
IconDeviceFloppy as Save,
|
||||
@@ -222,6 +223,7 @@ export {
|
||||
Pin,
|
||||
Play,
|
||||
Plus,
|
||||
Power,
|
||||
RefreshCw,
|
||||
RefreshCwIcon,
|
||||
Save,
|
||||
|
||||
Reference in New Issue
Block a user