diff --git a/package.json b/package.json
index f47737c..6d2cec2 100644
--- a/package.json
+++ b/package.json
@@ -1,9 +1,9 @@
{
"name": "weflow",
- "version": "1.0.2",
+ "version": "1.0.3",
"description": "WeFlow - 微信聊天记录查看工具",
"main": "dist-electron/main.js",
- "author": "cc",
+ "author": "cc",
"scripts": {
"dev": "vite",
"build": "tsc && vite build && electron-builder",
@@ -64,7 +64,7 @@
},
"nsis": {
"oneClick": false,
- "differentialPackage":false,
+ "differentialPackage": false,
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,
"unicode": true,
@@ -98,4 +98,4 @@
"dist-electron/**/*"
]
}
-}
+}
\ No newline at end of file
diff --git a/src/pages/ExportPage.scss b/src/pages/ExportPage.scss
index 596fcd4..12fe9d2 100644
--- a/src/pages/ExportPage.scss
+++ b/src/pages/ExportPage.scss
@@ -463,6 +463,43 @@
margin: 8px 0 0;
}
+ .select-folder-btn {
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: 8px;
+ padding: 10px 16px;
+ margin-top: 12px;
+ background: var(--bg-secondary);
+ border: 1px solid var(--border-color);
+ border-radius: 8px;
+ font-size: 13px;
+ font-weight: 500;
+ color: var(--text-primary);
+ cursor: pointer;
+ transition: all 0.2s;
+
+ &:hover {
+ background: var(--bg-hover);
+ border-color: var(--primary);
+ color: var(--primary);
+
+ svg {
+ color: var(--primary);
+ }
+ }
+
+ &:active {
+ transform: scale(0.98);
+ }
+
+ svg {
+ color: var(--text-secondary);
+ transition: color 0.2s;
+ }
+ }
+
.export-action {
padding: 20px 24px;
border-top: 1px solid var(--border-color);
diff --git a/src/pages/ExportPage.tsx b/src/pages/ExportPage.tsx
index 8fb4fd4..a8fc14f 100644
--- a/src/pages/ExportPage.tsx
+++ b/src/pages/ExportPage.tsx
@@ -362,7 +362,26 @@ function ExportPage() {
可在设置页面修改导出目录
+ diff --git a/src/pages/SettingsPage.tsx b/src/pages/SettingsPage.tsx index 418faaa..2f80c91 100644 --- a/src/pages/SettingsPage.tsx +++ b/src/pages/SettingsPage.tsx @@ -3,19 +3,18 @@ import { useAppStore } from '../stores/appStore' import { useThemeStore, themes } from '../stores/themeStore' import { dialog } from '../services/ipc' import * as configService from '../services/config' -import { +import { Eye, EyeOff, FolderSearch, FolderOpen, Search, Copy, RotateCcw, Trash2, Save, Plug, Check, Sun, Moon, Palette, Database, Download, HardDrive, Info, RefreshCw } from 'lucide-react' import './SettingsPage.scss' -type SettingsTab = 'appearance' | 'database' | 'export' | 'cache' | 'about' +type SettingsTab = 'appearance' | 'database' | 'cache' | 'about' const tabs: { id: SettingsTab; label: string; icon: React.ElementType }[] = [ { id: 'appearance', label: '外观', icon: Palette }, { id: 'database', label: '数据库连接', icon: Database }, - { id: 'export', label: '导出', icon: Download }, { id: 'cache', label: '缓存', icon: HardDrive }, { id: 'about', label: '关于', icon: Info } ] @@ -31,10 +30,8 @@ function SettingsPage() { const [dbPath, setDbPath] = useState('') const [wxid, setWxid] = useState('') const [cachePath, setCachePath] = useState('') - const [exportPath, setExportPath] = useState('') - const [defaultExportPath, setDefaultExportPath] = useState('') const [logEnabled, setLogEnabled] = useState(false) - + const [isLoading, setIsLoadingState] = useState(false) const [isTesting, setIsTesting] = useState(false) const [isDetectingPath, setIsDetectingPath] = useState(false) @@ -53,7 +50,6 @@ function SettingsPage() { useEffect(() => { loadConfig() - loadDefaultExportPath() loadAppVersion() }, []) @@ -80,12 +76,11 @@ function SettingsPage() { const savedLogEnabled = await configService.getLogEnabled() const savedImageXorKey = await configService.getImageXorKey() const savedImageAesKey = await configService.getImageAesKey() - + if (savedKey) setDecryptKey(savedKey) if (savedPath) setDbPath(savedPath) if (savedWxid) setWxid(savedWxid) if (savedCachePath) setCachePath(savedCachePath) - if (savedExportPath) setExportPath(savedExportPath) if (savedImageXorKey != null) { setImageXorKey(`0x${savedImageXorKey.toString(16).toUpperCase().padStart(2, '0')}`) } @@ -96,14 +91,7 @@ function SettingsPage() { } } - const loadDefaultExportPath = async () => { - try { - const downloadsPath = await window.electronAPI.app.getDownloadsPath() - setDefaultExportPath(downloadsPath) - } catch (e) { - console.error('获取默认导出路径失败:', e) - } - } + const loadAppVersion = async () => { try { @@ -166,7 +154,7 @@ function SettingsPage() { setDbPath(result.path) await configService.setDbPath(result.path) showMessage(`自动检测成功:${result.path}`, true) - + const wxids = await window.electronAPI.dbPath.scanWxids(result.path) if (wxids.length === 1) { setWxid(wxids[0].wxid) @@ -230,18 +218,7 @@ function SettingsPage() { } } - const handleSelectExportPath = async () => { - try { - const result = await dialog.openFile({ title: '选择导出目录', properties: ['openDirectory'] }) - if (!result.canceled && result.filePaths.length > 0) { - setExportPath(result.filePaths[0]) - await configService.setExportPath(result.filePaths[0]) - showMessage('已设置导出目录', true) - } - } catch (e) { - showMessage('选择目录失败', false) - } - } + const handleAutoGetDbKey = async () => { if (isFetchingDbKey) return @@ -303,16 +280,7 @@ function SettingsPage() { } } - const handleResetExportPath = async () => { - try { - const downloadsPath = await window.electronAPI.app.getDownloadsPath() - setExportPath(downloadsPath) - await configService.setExportPath(downloadsPath) - showMessage('已恢复为下载目录', true) - } catch (e) { - showMessage('恢复默认失败', false) - } - } + const handleTestConnection = async () => { if (!dbPath) { showMessage('请先选择数据库目录', false); return } @@ -396,7 +364,6 @@ function SettingsPage() { setDbPath('') setWxid('') setCachePath('') - setExportPath('') setLogEnabled(false) setDbConnected(false) await window.electronAPI.window.openOnboardingWindow() @@ -562,19 +529,7 @@ function SettingsPage() { ) - const renderExportTab = () => ( -WeFlow
v{appVersion || '...'}
- +