Add unreachable status handling to ServerCard
All checks were successful
Deploy GSM / deploy (push) Successful in 24s
All checks were successful
Deploy GSM / deploy (push) Successful in 24s
- Gray out unreachable servers with 50% opacity - Disable click interaction for unreachable servers - Show "Nicht erreichbar" badge Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -107,17 +107,20 @@ export default function ServerCard({ server, onClick, isAuthenticated, displaySe
|
||||
return { class: 'badge badge-warning', text: 'Starting...' }
|
||||
case 'stopping':
|
||||
return { class: 'badge badge-warning', text: 'Stopping...' }
|
||||
case 'unreachable':
|
||||
return { class: 'badge bg-neutral-600 text-neutral-400', text: 'Nicht erreichbar' }
|
||||
default:
|
||||
return { class: 'badge badge-destructive', text: 'Offline' }
|
||||
}
|
||||
}
|
||||
|
||||
const statusBadge = getStatusBadge()
|
||||
const isUnreachable = server.status === 'unreachable'
|
||||
|
||||
return (
|
||||
<div
|
||||
className="card card-clickable p-5"
|
||||
onClick={onClick}
|
||||
className={isUnreachable ? "card p-5 opacity-50 cursor-not-allowed" : "card card-clickable p-5"}
|
||||
onClick={isUnreachable ? undefined : onClick}
|
||||
>
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
|
||||
Reference in New Issue
Block a user