Compare commits
2 Commits
1ba29b9a09
...
e3c0fe98d7
| Author | SHA1 | Date | |
|---|---|---|---|
| e3c0fe98d7 | |||
| 56232c5c93 |
@@ -35,6 +35,7 @@ import {
|
||||
buildPublishPlatformMap,
|
||||
clientStatusColor,
|
||||
clientStatusLabel,
|
||||
clientStatusTooltip,
|
||||
healthColor,
|
||||
healthLabel,
|
||||
publishStateLabel,
|
||||
@@ -795,7 +796,7 @@ function decisionAlertType(result: ComplianceCheckResult | null | undefined) {
|
||||
'publish-modal__card--active': isSelected(account.id),
|
||||
'publish-modal__card--disabled': !account.selectable || accountSelectionLocked,
|
||||
}"
|
||||
:disabled="!account.selectable || accountSelectionLocked"
|
||||
:aria-disabled="!account.selectable || accountSelectionLocked"
|
||||
@click="toggleAccount(account.id, account.selectable)"
|
||||
>
|
||||
<div class="publish-modal__card-header">
|
||||
@@ -810,7 +811,17 @@ function decisionAlertType(result: ComplianceCheckResult | null | undefined) {
|
||||
<span v-else>{{ accountInitial(account) }}</span>
|
||||
</span>
|
||||
<div class="publish-modal__identity-copy">
|
||||
<strong :title="account.displayName">{{ account.displayName }}</strong>
|
||||
<div class="publish-modal__account-name-row">
|
||||
<strong :title="account.displayName">{{ account.displayName }}</strong>
|
||||
<a-tooltip :title="account.statusText" placement="top">
|
||||
<span
|
||||
class="publish-modal__state-pill publish-modal__state-pill--compact"
|
||||
:class="`publish-modal__state-pill--${account.publishState}`"
|
||||
>
|
||||
{{ publishStateLabel(account.publishState) }}
|
||||
</span>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<span
|
||||
class="publish-modal__platform-line"
|
||||
:title="`${account.platformName} · ${account.platformUid}`"
|
||||
@@ -845,17 +856,15 @@ function decisionAlertType(result: ComplianceCheckResult | null | undefined) {
|
||||
<a-tag :color="healthColor(account.health)">
|
||||
{{ healthLabel(account.health) }}
|
||||
</a-tag>
|
||||
<a-tag :color="clientStatusColor(account)">{{ clientStatusLabel(account) }}</a-tag>
|
||||
<a-tooltip :title="clientStatusTooltip(account)" placement="topLeft">
|
||||
<a-tag
|
||||
:color="clientStatusColor(account)"
|
||||
class="publish-modal__client-status-tag"
|
||||
>
|
||||
{{ clientStatusLabel(account) }}
|
||||
</a-tag>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
|
||||
<a-tooltip :title="account.statusText" placement="top">
|
||||
<span
|
||||
class="publish-modal__state-pill"
|
||||
:class="`publish-modal__state-pill--${account.publishState}`"
|
||||
>
|
||||
{{ publishStateLabel(account.publishState) }}
|
||||
</span>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
@@ -1339,7 +1348,15 @@ function decisionAlertType(result: ComplianceCheckResult | null | undefined) {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.publish-modal__account-name-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.publish-modal__identity-copy strong {
|
||||
min-width: 0;
|
||||
color: #111827;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
@@ -1405,6 +1422,13 @@ function decisionAlertType(result: ComplianceCheckResult | null | undefined) {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.publish-modal__state-pill--compact {
|
||||
min-width: 0;
|
||||
height: 22px;
|
||||
padding: 0 9px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.publish-modal__state-pill--immediate {
|
||||
background: #ecfdf5;
|
||||
color: #059669;
|
||||
@@ -1434,6 +1458,15 @@ function decisionAlertType(result: ComplianceCheckResult | null | undefined) {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.publish-modal__client-status-tag {
|
||||
display: inline-block;
|
||||
max-width: 118px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: top;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.publish-modal__cover-body {
|
||||
display: flex;
|
||||
margin-top: 12px;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -877,6 +877,7 @@ async function submitCompetitor(): Promise<void> {
|
||||
<a-form-item :label="t('brands.sections.keywords')">
|
||||
<a-select
|
||||
v-model:value="questionForm.keyword_id"
|
||||
disabled
|
||||
:options="
|
||||
(keywordsQuery.data.value || []).map((item) => ({ label: item.name, value: item.id }))
|
||||
"
|
||||
|
||||
@@ -53,7 +53,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS uniq_platform_accounts_desktop_id
|
||||
ON platform_accounts (desktop_id);
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS uniq_platform_accounts_workspace_identity_active
|
||||
ON platform_accounts (workspace_id, platform_id, platform_uid)
|
||||
ON platform_accounts (workspace_id, client_id, platform_id, platform_uid)
|
||||
WHERE deleted_at IS NULL;
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_platform_accounts_client_id
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
DROP INDEX IF EXISTS uk_platform_accounts_identity_active;
|
||||
DROP INDEX IF EXISTS uniq_platform_accounts_workspace_identity_active;
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS uniq_platform_accounts_workspace_identity_active
|
||||
ON platform_accounts (workspace_id, platform_id, platform_uid)
|
||||
ON platform_accounts (workspace_id, client_id, platform_id, platform_uid)
|
||||
WHERE deleted_at IS NULL;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
DROP INDEX IF EXISTS uk_platform_accounts_identity_active;
|
||||
DROP INDEX IF EXISTS uniq_platform_accounts_workspace_identity_active;
|
||||
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS uniq_platform_accounts_workspace_identity_active
|
||||
|
||||
Reference in New Issue
Block a user