refactor(admin-web): tighten publish modal status display
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user