fix(host-grid): 對齊 figma — 服務行去掉 port/描述,hostname 顯示末段 IP
All checks were successful
CD Pipeline / build-and-deploy (push) Successful in 7m4s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-04-03 00:59:59 +08:00
parent 702350925a
commit 2dcbedd80f

View File

@@ -42,25 +42,16 @@ function ServiceRow({ svc }: { svc: HostService }) {
const isK3s = svc.isK3s ?? false
const dotColor = isK3s ? '#4f8ef7' : svc.healthy ? '#22C55E' : '#b0ad9f'
return (
<div style={{ display: 'flex', alignItems: 'center', gap: 5, minHeight: 17 }}>
<div style={{ display: 'flex', alignItems: 'center', gap: 5, minHeight: 16 }}>
<div style={{ width: 4, height: 4, borderRadius: '50%', background: dotColor, flexShrink: 0 }} />
<span style={{
fontSize: 11,
fontWeight: isK3s ? 600 : 400,
color: isK3s ? '#3b7de8' : '#49483f',
fontFamily: 'var(--font-body), monospace',
flexShrink: 0,
}}>
{svc.name}
</span>
{svc.port && (
<span style={{ fontSize: 10, color: '#b0ad9f' }}>:{svc.port}</span>
)}
{svc.description && (
<span style={{ fontSize: 10, color: '#b0ad9f', marginLeft: 'auto', flexShrink: 0, textAlign: 'right' }}>
{svc.description}
</span>
)}
</div>
)
}
@@ -89,7 +80,8 @@ function HostCard({ host }: { host: HostInfo }) {
<div style={{ display: 'flex', alignItems: 'center', gap: 5 }}>
<div style={{ width: 6, height: 6, borderRadius: '50%', background: accentColor, flexShrink: 0 }} />
<span style={{ fontSize: 12, fontWeight: 700, color: '#141413', fontFamily: 'var(--font-body), monospace' }}>
{host.hostname}
{/* 顯示末段 IP 作為簡短標識,完整名稱放 IP 欄位 */}
{host.ip.split('.').pop() ?? host.hostname}
</span>
{isK3s && (
<span style={{