feat(admin-web): use real platform logos in publish queue table
Frontend CI / Frontend (push) Successful in 9m6s
Frontend CI / Frontend (push) Successful in 9m6s
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import { useI18n } from 'vue-i18n'
|
||||
import { publishTasksApi, tenantAccountsApi } from '@/lib/api'
|
||||
import { formatDateTime } from '@/lib/display'
|
||||
import { formatError } from '@/lib/errors'
|
||||
import { resolvePlatformLogoUrl } from '@/lib/publish-account-cards'
|
||||
import { getPublishPlatformMeta, normalizePublishPlatformId } from '@/lib/publish-platforms'
|
||||
|
||||
const PAGE_SIZE = 10
|
||||
@@ -34,6 +35,7 @@ interface PublishTaskItem {
|
||||
platformName: string
|
||||
platformShortName: string
|
||||
platformAccent: string
|
||||
platformLogoUrl: string | null
|
||||
accountId: string
|
||||
accountName: string
|
||||
platformUid: string
|
||||
@@ -390,6 +392,7 @@ const publishTasks = computed<PublishTaskItem[]>(() =>
|
||||
platformName: platformMeta.name,
|
||||
platformShortName: platformMeta.shortName,
|
||||
platformAccent: platformMeta.accent,
|
||||
platformLogoUrl: resolvePlatformLogoUrl(platformId),
|
||||
accountId: task.target_account_id,
|
||||
accountName,
|
||||
platformUid,
|
||||
@@ -576,7 +579,12 @@ async function copyErrorMessage(record: PublishTaskItem): Promise<void> {
|
||||
<template v-else-if="column.key === 'account'">
|
||||
<div class="publish-account-cell">
|
||||
<span class="platform-avatar" :style="{ color: record.platformAccent }">
|
||||
{{ record.platformShortName }}
|
||||
<img
|
||||
v-if="record.platformLogoUrl"
|
||||
:src="record.platformLogoUrl"
|
||||
:alt="record.platformName"
|
||||
/>
|
||||
<template v-else>{{ record.platformShortName }}</template>
|
||||
</span>
|
||||
<div class="publish-cell-stack">
|
||||
<span class="publish-cell-title publish-cell-title--compact">
|
||||
@@ -893,6 +901,7 @@ async function copyErrorMessage(record: PublishTaskItem): Promise<void> {
|
||||
|
||||
.platform-avatar {
|
||||
display: inline-flex;
|
||||
overflow: hidden;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
flex: 0 0 auto;
|
||||
@@ -905,6 +914,12 @@ async function copyErrorMessage(record: PublishTaskItem): Promise<void> {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.platform-avatar img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.publish-meta-cell {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user