feat(publish): add baijiahao and jianshu desktop adapters
Wires up Baijiahao (百家号) and Jianshu (简书) as first-class desktop publish targets, with risk-control prompts surfaced in the runtime controller and a normalized error message in publish records. Adds external-link buttons in the publish management table, an asset format conversion endpoint for cover image compatibility, and reorders publish-status display priority so failures take precedence over partial successes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -108,26 +108,22 @@ const pendingEntries = computed(() =>
|
||||
);
|
||||
|
||||
const displayStatus = computed(() => {
|
||||
if (successEntries.value.length > 0) {
|
||||
return "success";
|
||||
}
|
||||
|
||||
if (platformEntries.value.length > 0 && failedEntries.value.length === platformEntries.value.length) {
|
||||
if (failedEntries.value.length > 0) {
|
||||
return "failed";
|
||||
}
|
||||
|
||||
if (pendingEntries.value.some((entry) => entry.status === "publishing")) {
|
||||
return "publishing";
|
||||
}
|
||||
|
||||
if (pendingEntries.value.length > 0) {
|
||||
return "publishing";
|
||||
}
|
||||
|
||||
if (props.status === "partial_success") {
|
||||
if (successEntries.value.length > 0) {
|
||||
return "success";
|
||||
}
|
||||
|
||||
if (props.status === "partial_success") {
|
||||
return "failed";
|
||||
}
|
||||
|
||||
if (props.status === "publish_success" || props.status === "published") {
|
||||
return "success";
|
||||
}
|
||||
@@ -161,15 +157,6 @@ const statusTone = computed(() => {
|
||||
const popoverSections = computed<PublishPlatformSection[]>(() => {
|
||||
const sections: PublishPlatformSection[] = [];
|
||||
|
||||
if (successEntries.value.length > 0) {
|
||||
sections.push({
|
||||
key: "success",
|
||||
label: `${getPublishStatusMeta("success").label}:`,
|
||||
tone: "success",
|
||||
entries: successEntries.value,
|
||||
});
|
||||
}
|
||||
|
||||
if (failedEntries.value.length > 0) {
|
||||
sections.push({
|
||||
key: "failed",
|
||||
@@ -188,6 +175,15 @@ const popoverSections = computed<PublishPlatformSection[]>(() => {
|
||||
});
|
||||
}
|
||||
|
||||
if (successEntries.value.length > 0) {
|
||||
sections.push({
|
||||
key: "success",
|
||||
label: `${getPublishStatusMeta("success").label}:`,
|
||||
tone: "success",
|
||||
entries: successEntries.value,
|
||||
});
|
||||
}
|
||||
|
||||
return sections;
|
||||
});
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@ const requirementCatalog: Record<string, Partial<PlatformCoverRequirement>> = {
|
||||
baijiahao: {
|
||||
required: true,
|
||||
supportMode: "native",
|
||||
aspectRatio: 16 / 9,
|
||||
aspectLabel: "16:9",
|
||||
aspectRatio: 3 / 2,
|
||||
aspectLabel: "3:2",
|
||||
outputWidth: 1200,
|
||||
outputHeight: 675,
|
||||
outputHeight: 800,
|
||||
priority: 100,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user