feat(ui): improve readability and fix workspace regressions

Separate interface typography from document text and enlarge controls across the workspace and public reader. Keep tree menus within the viewport and make constrained dialogs scrollable.

Preserve nested image references, escape moved link paths, synchronize note creation and daily-note opening, and hydrate shared headings. Add regression coverage for settings and workspace behavior.
This commit is contained in:
eezd committed 2026-10-23 10:55:53 +08:00
1 parent 4d1339851b
commit a716794e41
31 files changed
+556 -246

No files matched your search

+10 -3
View File
@@ -12,9 +12,16 @@ export async function createFromTemplate(path: string, template: string) {
return created
}
let openingDaily = false
export async function openDailyNote() {
const path = joinPath(settings.dailyFolder, localDate() + '.md')
if (ws.entries.some(entry => !entry.dir && entry.path === path)) { await openNote(path); return }
try { await createFromTemplate(path, settings.dailyTemplate) }
// 模板读取也属于打开日记的过程,此时尚未加入乐观目录。
if (openingDaily) return
openingDaily = true
try {
const path = joinPath(settings.dailyFolder, localDate() + '.md')
if (ws.entries.some(entry => !entry.dir && entry.path === path)) { await openNote(path); return }
await createFromTemplate(path, settings.dailyTemplate)
}
catch (error) { toast('创建日记失败:' + (error instanceof Error ? error.message : '网络错误')) }
finally { openingDaily = false }
}