refactor(admin-web): tighten publish modal status display
Frontend CI / Frontend (push) Successful in 2m29s
Backend CI / Backend (push) Successful in 13m51s

Move publish-state pill next to account name, surface device name in the
client-status tag with truncation + tooltip, and switch the card click
target from disabled to aria-disabled so tooltips remain interactive.
Also disable the keyword selector in the brand question form to prevent
mid-edit reassignment.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-06 13:42:58 +08:00
parent 56232c5c93
commit e3c0fe98d7
3 changed files with 60 additions and 13 deletions
@@ -194,7 +194,20 @@ export function clientStatusLabel(card: PublishAccountCard): string {
if (!card.clientId) {
return '未绑定客户端'
}
return card.clientOnline ? '客户端在线' : '客户端离线'
const state = card.clientOnline ? '在线' : '离线'
const deviceName = card.clientDeviceName?.trim()
return deviceName ? `${state} · ${deviceName}` : `客户端${state}`
}
export function clientStatusTooltip(card: PublishAccountCard): string {
if (!card.clientId) {
return '未绑定桌面客户端'
}
const state = card.clientOnline ? '在线' : '离线'
const deviceName = card.clientDeviceName?.trim()
return deviceName ? `${state} · ${deviceName}` : `客户端${state}`
}
export function clientStatusColor(card: PublishAccountCard): string {