From 96aa9d08136f535097acce773eec561989231656 Mon Sep 17 00:00:00 2001 From: tisonhuang Date: Sun, 1 Mar 2026 16:49:23 +0800 Subject: [PATCH] feat(export): adjust path actions and compact sns card --- src/pages/ExportPage.scss | 49 +++++++++++++++++++++++++------------- src/pages/ExportPage.tsx | 50 ++++++++++++++++++--------------------- 2 files changed, 55 insertions(+), 44 deletions(-) diff --git a/src/pages/ExportPage.scss b/src/pages/ExportPage.scss index e8a1380..00a5f1e 100644 --- a/src/pages/ExportPage.scss +++ b/src/pages/ExportPage.scss @@ -51,36 +51,52 @@ .path-value { border: 1px dashed var(--border-color); border-radius: 10px; - padding: 10px 12px; + background: var(--bg-secondary); + display: flex; + align-items: stretch; + min-width: 0; + flex: 1; + overflow: hidden; + } + + .path-link { + border: none; + background: transparent; font-size: 13px; color: var(--text-primary); - background: var(--bg-secondary); + text-align: left; + padding: 10px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; - } - - .path-link { cursor: pointer; - text-align: left; - &:hover:not(:disabled) { - border-color: var(--primary); + &:hover { color: var(--primary); } - &:disabled { - cursor: not-allowed; - opacity: 0.65; + &:focus-visible { + outline: none; } } - .path-actions { - display: flex; - gap: 8px; + .path-change-btn { + border: none; + border-left: 1px dashed var(--border-color); + background: transparent; + color: var(--text-secondary); + font-size: 12px; + font-weight: 600; + padding: 0 12px; + cursor: pointer; flex-shrink: 0; + + &:hover { + border-color: var(--primary); + color: var(--primary); + } } .write-layout-control { @@ -1072,9 +1088,8 @@ flex-wrap: wrap; } - .path-actions { - width: 100%; - justify-content: flex-end; + .path-inline-row > .secondary-btn { + margin-left: auto; } } diff --git a/src/pages/ExportPage.tsx b/src/pages/ExportPage.tsx index f5c2b39..2d18979 100644 --- a/src/pages/ExportPage.tsx +++ b/src/pages/ExportPage.tsx @@ -1174,7 +1174,6 @@ function ExportPage() { label: '朋友圈', stats: [ { label: '朋友圈条数', value: snsStats.totalPosts }, - { label: '好友数', value: snsStats.totalFriends }, { label: '已导出朋友圈条数', value: snsExportedCount } ] } @@ -1373,6 +1372,17 @@ function ExportPage() { () => visibleSessions.map(renderRow), [visibleSessions, selectedSessions, sessionMetrics, activeTab, runningSessionIds, queuedSessionIds, nowTick, lastExportBySession] ) + const chooseExportFolder = useCallback(async () => { + const result = await window.electronAPI.dialog.openFile({ + title: '选择导出目录', + properties: ['openDirectory'] + }) + if (!result.canceled && result.filePaths.length > 0) { + const nextPath = result.filePaths[0] + setExportFolder(nextPath) + await configService.setExportPath(nextPath) + } + }, []) return (
@@ -1381,36 +1391,22 @@ function ExportPage() {
导出位置
- -
- +
+
+