feat(admin-web/articles): show partial-success publish status from records

ArticlePublishStatus now derives partial_success when both succeeded and
failed records are present, fetches publish_records eagerly with a 30s
stale window so the popover lights up without a click, and ArticleDetail
Drawer reuses the component instead of its own tag. Relabel partial_
success copy to 部分发布 / Partially Published to match the new bucket.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-29 21:02:36 +08:00
parent e8c4fedb45
commit 2f3055babd
4 changed files with 21 additions and 9 deletions
@@ -7,6 +7,7 @@ import type { ArticleVersion, PublishRecord } from "@geo/shared-types";
import { computed, ref, watch } from "vue";
import { useI18n } from "vue-i18n";
import ArticlePublishStatus from "@/components/ArticlePublishStatus.vue";
import MarkdownPreview from "@/components/MarkdownPreview.vue";
import {
articlesApi,
@@ -121,7 +122,6 @@ const displayMarkdown = computed(() => streamMarkdown.value || detail.value?.mar
const generateMeta = computed(() =>
getGenerateStatusMeta(streamStatus.value || detail.value?.generate_status),
);
const publishMeta = computed(() => getPublishStatusMeta(detail.value?.publish_status));
const sourceArticleTitle = computed(() => detail.value?.source_title?.trim() || "");
const sourceArticleURL = computed(() => detail.value?.source_url?.trim() || "");
@@ -274,7 +274,11 @@ async function copyPublishLink(record: PublishRecord): Promise<void> {
<div class="article-drawer__tags">
<a-tag :color="generateMeta.color">{{ generateMeta.label }}</a-tag>
<a-tag :color="publishMeta.color">{{ publishMeta.label }}</a-tag>
<ArticlePublishStatus
:status="detail.publish_status"
:article-id="detail.id"
:show-platforms="false"
/>
</div>
</section>