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 { publishTasksApi, tenantAccountsApi } from '@/lib/api'
|
||||||
import { formatDateTime } from '@/lib/display'
|
import { formatDateTime } from '@/lib/display'
|
||||||
import { formatError } from '@/lib/errors'
|
import { formatError } from '@/lib/errors'
|
||||||
|
import { resolvePlatformLogoUrl } from '@/lib/publish-account-cards'
|
||||||
import { getPublishPlatformMeta, normalizePublishPlatformId } from '@/lib/publish-platforms'
|
import { getPublishPlatformMeta, normalizePublishPlatformId } from '@/lib/publish-platforms'
|
||||||
|
|
||||||
const PAGE_SIZE = 10
|
const PAGE_SIZE = 10
|
||||||
@@ -34,6 +35,7 @@ interface PublishTaskItem {
|
|||||||
platformName: string
|
platformName: string
|
||||||
platformShortName: string
|
platformShortName: string
|
||||||
platformAccent: string
|
platformAccent: string
|
||||||
|
platformLogoUrl: string | null
|
||||||
accountId: string
|
accountId: string
|
||||||
accountName: string
|
accountName: string
|
||||||
platformUid: string
|
platformUid: string
|
||||||
@@ -390,6 +392,7 @@ const publishTasks = computed<PublishTaskItem[]>(() =>
|
|||||||
platformName: platformMeta.name,
|
platformName: platformMeta.name,
|
||||||
platformShortName: platformMeta.shortName,
|
platformShortName: platformMeta.shortName,
|
||||||
platformAccent: platformMeta.accent,
|
platformAccent: platformMeta.accent,
|
||||||
|
platformLogoUrl: resolvePlatformLogoUrl(platformId),
|
||||||
accountId: task.target_account_id,
|
accountId: task.target_account_id,
|
||||||
accountName,
|
accountName,
|
||||||
platformUid,
|
platformUid,
|
||||||
@@ -576,7 +579,12 @@ async function copyErrorMessage(record: PublishTaskItem): Promise<void> {
|
|||||||
<template v-else-if="column.key === 'account'">
|
<template v-else-if="column.key === 'account'">
|
||||||
<div class="publish-account-cell">
|
<div class="publish-account-cell">
|
||||||
<span class="platform-avatar" :style="{ color: record.platformAccent }">
|
<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>
|
</span>
|
||||||
<div class="publish-cell-stack">
|
<div class="publish-cell-stack">
|
||||||
<span class="publish-cell-title publish-cell-title--compact">
|
<span class="publish-cell-title publish-cell-title--compact">
|
||||||
@@ -893,6 +901,7 @@ async function copyErrorMessage(record: PublishTaskItem): Promise<void> {
|
|||||||
|
|
||||||
.platform-avatar {
|
.platform-avatar {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
overflow: hidden;
|
||||||
width: 28px;
|
width: 28px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
@@ -905,6 +914,12 @@ async function copyErrorMessage(record: PublishTaskItem): Promise<void> {
|
|||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.platform-avatar img {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
.publish-meta-cell {
|
.publish-meta-cell {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user