diff --git a/apps/desktop-client/src/renderer/views/PublishManagementView.vue b/apps/desktop-client/src/renderer/views/PublishManagementView.vue index edec577..e86e280 100644 --- a/apps/desktop-client/src/renderer/views/PublishManagementView.vue +++ b/apps/desktop-client/src/renderer/views/PublishManagementView.vue @@ -14,6 +14,7 @@ import { computed, onMounted, onUnmounted, ref, watch } from "vue"; import StatusBadge from "../components/StatusBadge.vue"; import { useDesktopRuntime } from "../composables/useDesktopRuntime"; +import { unwrapClientErrorMessage } from "../lib/client-errors"; import { formatDateTime, formatRelativeTime } from "../lib/formatters"; import { desktopPlatformShortName, desktopPublishMediaCatalog, translateDesktopPlatform } from "../lib/media-catalog"; import { normalizePublisherErrorMessage } from "../../shared/publisher-errors"; @@ -199,7 +200,7 @@ function summaryForTask( ): string { switch (status) { case "queued": - return "任务已进入队列,等前面的 PublishTasks 翻完后再继续展示历史记录。"; + return "任务已进入队列,待前面的发布任务完成后继续执行。"; case "in_progress": return "当前正在由桌面端执行发送,请避免重复触发。"; case "succeeded": @@ -277,7 +278,7 @@ async function refreshTasks(page = currentPage.value) { taskPage.value = response; currentPage.value = response.page; } catch (err) { - error.value = err instanceof Error ? err.message : "desktop publish tasks unavailable"; + error.value = normalizeTaskErrorMessage(unwrapClientErrorMessage(err, "发布任务暂时不可用")); } finally { loading.value = false; } @@ -291,7 +292,7 @@ async function retryTask(taskId: string) { notifySuccess("已重新加入发布队列"); await refreshTasks(); } catch (err) { - notifyActionError(err instanceof Error ? err.message : "重新发送失败"); + notifyActionError(normalizeTaskErrorMessage(unwrapClientErrorMessage(err, "重新发送失败")) ?? "重新发送失败"); } finally { actionPendingTaskId.value = null; } @@ -305,7 +306,7 @@ async function openExternalUrl(url: string | null) { try { await window.desktopBridge.app.openExternalUrl(url); } catch (err) { - notifyActionError(err instanceof Error ? err.message : "打开外链失败"); + notifyActionError(normalizeTaskErrorMessage(unwrapClientErrorMessage(err, "打开外链失败")) ?? "打开外链失败"); } } @@ -321,7 +322,7 @@ async function openAccountWorkbench(record: PublishTaskItem) { displayName: account?.displayName ?? record.accountName, }); } catch (err) { - notifyActionError(err instanceof Error ? err.message : "打开账号工作台失败"); + notifyActionError(normalizeTaskErrorMessage(unwrapClientErrorMessage(err, "打开账号工作台失败")) ?? "打开账号工作台失败"); } finally { consolePendingTaskId.value = null; } @@ -359,7 +360,7 @@ async function copyErrorMessage(record: PublishTaskItem) { } }, 1_500); } catch (err) { - notifyActionError(err instanceof Error ? err.message : "复制错误详情失败"); + notifyActionError(normalizeTaskErrorMessage(unwrapClientErrorMessage(err, "复制错误详情失败")) ?? "复制错误详情失败"); } } @@ -470,7 +471,7 @@ const tableScroll = { x: 1080 } as const;
-

PUBLISH EXECUTION DESK

+

发布执行台

发布管理

@@ -505,7 +506,7 @@ const tableScroll = { x: 1080 } as const;

待发布与已发送记录

-

待发布任务始终排在最前,每页 10 条;分页与总数以服务端返回的 PublishTasks 为准。

+

待发布任务始终排在最前,每页 10 条;分页与总数以服务端返回的发布任务为准。