diff --git a/src/App.vue b/src/App.vue index 2d556df..a816982 100644 --- a/src/App.vue +++ b/src/App.vue @@ -230,14 +230,17 @@ const appendLog = (msg: string) => { } const handleDeleteEmptyDirs = async () => { - checkLogs.value = []; + appendLog("---" + " 删除空目录操作 @ " + new Date().toLocaleString() + " ---"); appendLog("正在扫描并删除空目录..."); try { const deleted = await invoke('delete_empty_dirs', { path: currentDir.value }); if (deleted.length === 0) { appendLog("未发现空目录。"); } else { - deleted.forEach(path => appendLog(`已删除: ${path}`)); + for (const path of deleted) { + appendLog(`已删除: ${path}`); + await new Promise(resolve => setTimeout(resolve, 50)); // Small delay for buffering effect + } appendLog(`删除完毕,共删除 ${deleted.length} 个空目录。`); } } catch (e) { @@ -246,7 +249,7 @@ const handleDeleteEmptyDirs = async () => { } const handleCheckNaming = async () => { - checkLogs.value = []; + appendLog("---" + " 检查命名操作 @ " + new Date().toLocaleString() + " ---"); appendLog(`正在检查文件命名,前缀要求: ${videoNamePrefix.value} ...`); try { const mismatches = await invoke('check_file_naming', { @@ -347,7 +350,7 @@ const handleCopy = async () => { // Reactivity for Current Directory Prefix watch(currentDir, (newPath) => { if (!newPath) return; - const dirName = newPath.split(/[/\\]/).pop(); + const dirName = newPath.split(/[\/\\]/).pop(); if (!dirName) return; const regex = /^(\d{2})(\d{2})视频$/; @@ -523,7 +526,7 @@ watch(currentDir, (newPath) => { -
+

检查

{ style="margin-bottom: 20px" /> -
+
删除空目录 检查命名 @@ -687,7 +690,7 @@ body { background-color: var(--el-bg-color); display: flex; flex-direction: column; - height: 400px; + flex-grow: 1; /* Make it fill available height */ } .log-header { padding: 10px 15px; @@ -700,7 +703,7 @@ body { flex: 1; overflow-y: auto; padding: 10px; - font-family: monospace; + font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif; /* Matched body font */ font-size: 13px; white-space: pre-wrap; }