diff --git a/frontend/pages/sns.vue b/frontend/pages/sns.vue index 6e37b16..e8daf15 100644 --- a/frontend/pages/sns.vue +++ b/frontend/pages/sns.vue @@ -593,32 +593,15 @@
当前导出任务
ID:{{ exportJob.exportId || '-' }}
-
- - 状态:{{ exportStatusText }} - - - {{ exportOverallPercent }}% - - - -
+
@@ -815,15 +798,6 @@
已选 {{ exportSelectedCount }} 人
-
@@ -1139,17 +1114,6 @@ const exportActiveFormatLabel = computed(() => { return exportFormatOptions.find((item) => item.value === exportActiveFormat.value)?.label || 'HTML' }) -const exportStatusText = computed(() => { - const status = String(exportJob.value?.status || '').trim() - return { - queued: '排队中', - running: '导出中', - done: '已完成', - error: '失败', - cancelled: '已取消' - }[status] || status || '-' -}) - const exportOverallPercent = computed(() => { const status = String(exportJob.value?.status || '').trim() if (status === 'done') return 100 @@ -1187,6 +1151,24 @@ const canCancelSnsExport = computed(() => { return status === 'queued' || status === 'running' }) +const exportPrimaryActionLabel = computed(() => { + if (canCancelSnsExport.value) return isExportCancelling.value ? '取消中…' : '取消导出' + return isSnsExportBusy.value ? '导出中…' : '开始导出' +}) + +const exportPrimaryActionDisabled = computed(() => { + if (canCancelSnsExport.value) return isExportCancelling.value + return !selectedAccount.value || !exportSelectedCount.value || isSnsExportBusy.value +}) + +const handleExportPrimaryAction = async () => { + if (canCancelSnsExport.value) { + await cancelSnsExportJob() + return + } + await startSnsExportFromModal() +} + const normalizeExportSelectedUsernames = (list) => { const validUsernames = new Set( visibleSnsUsers.value