setHover(n.path)} onMouseLeave={() => setHover(null)}
onClick={() => isRenaming ? null : (n.type === 'folder' ? toggle(n.path) : openDoc(n.path))}
@@ -115,7 +115,7 @@ export function FileTree() {
{isRenaming ? (
setRenameVal(e.target.value)}
onKeyDown={e => { if (e.key === 'Enter') { setRenaming(null); invoke(IPC.fileRename, { from: n.path, toName: renameVal }).then(r => { useTabs.getState().renamePath(n.path, r.path); syncCurrentPath(n.path, r.path); loadTree(); }); } if (e.key === 'Escape') setRenaming(null); }}
- onBlur={() => { if (renameVal.trim() && renameVal !== n.name) { setRenaming(null); invoke(IPC.fileRename, { from: n.path, toName: renameVal }).then(r2 => { useTabs.getState().renamePath(n.path, r2.path); syncCurrentPath(n.path, r2.path); loadTree(); }).catch(() => {}); } else setRenaming(null); }} style={{ flex: 1, background: 'var(--bg-secondary)', border: '1px solid #4a6a8a', color: 'var(--text-primary)', borderRadius: 3, padding: '1px 4px', fontSize: 13 }} />
+ onBlur={() => { if (renameVal.trim() && renameVal !== n.name) { setRenaming(null); invoke(IPC.fileRename, { from: n.path, toName: renameVal }).then(r2 => { useTabs.getState().renamePath(n.path, r2.path); syncCurrentPath(n.path, r2.path); loadTree(); }).catch(() => {}); } else setRenaming(null); }} style={{ flex: 1, background: 'var(--bg-secondary)', border: '1px solid var(--accent)', color: 'var(--text-primary)', borderRadius: 3, padding: '1px 4px', fontSize: 13 }} />
) : (
{n.name}
)}
diff --git a/apps/desktop/src/renderer/features/graph/GraphView.tsx b/apps/desktop/src/renderer/features/graph/GraphView.tsx
index 90cd19d..9e78bd4 100644
--- a/apps/desktop/src/renderer/features/graph/GraphView.tsx
+++ b/apps/desktop/src/renderer/features/graph/GraphView.tsx
@@ -101,9 +101,9 @@ function MindmapTree() {
.mm-name { font-weight: 500; }
.mm-root .mm-name { font-weight: 700; color: var(--accent-text); }
.mm-folder .mm-name { font-weight: 600; color: var(--accent-text); }
- .mm-doc .mm-name { color: #9aa0aa; font-weight: 400; }
+ .mm-doc .mm-name { color: var(--text-secondary); font-weight: 400; }
.mm-doc { cursor: pointer; }
- .mm-doc:hover .mm-name { color: #fff; text-decoration: underline; }
+ .mm-doc:hover .mm-name { color: var(--text-primary); text-decoration: underline; }
.mm-folder, .mm-root { cursor: pointer; }
`}
@@ -111,7 +111,7 @@ function MindmapTree() {
}
function tabBtn(active: boolean): React.CSSProperties {
- return { padding: '3px 10px', fontSize: 12, background: active ? 'var(--control-border)' : 'transparent', color: active ? '#fff' : 'var(--text-tertiary)', border: '1px solid var(--control-border)', borderRadius: 4, cursor: 'pointer' };
+ return { padding: '3px 10px', fontSize: 12, background: active ? 'var(--control-border)' : 'transparent', color: active ? 'var(--text-primary)' : 'var(--text-tertiary)', border: '1px solid var(--control-border)', borderRadius: 4, cursor: 'pointer' };
}
export function GraphView({ onSwitchToEditor }: { onSwitchToEditor?: () => void }) {
diff --git a/apps/desktop/src/renderer/features/search/TagFilter.tsx b/apps/desktop/src/renderer/features/search/TagFilter.tsx
index 610f1ca..cb6590d 100644
--- a/apps/desktop/src/renderer/features/search/TagFilter.tsx
+++ b/apps/desktop/src/renderer/features/search/TagFilter.tsx
@@ -23,7 +23,7 @@ export function TagFilter() {
{!collapsed && (
{tags.map(t => (
- toggle(t.tag)} style={{ cursor: 'pointer', padding: '1px 7px', borderRadius: 10, fontSize: 11, background: selected.includes(t.tag) ? 'var(--accent)' : 'var(--control-border)', color: selected.includes(t.tag) ? '#fff' : 'var(--text-secondary)' }}>{t.tag} {t.count}
+ toggle(t.tag)} style={{ cursor: 'pointer', padding: '1px 7px', borderRadius: 10, fontSize: 11, background: selected.includes(t.tag) ? 'var(--accent)' : 'var(--control-border)', color: selected.includes(t.tag) ? 'var(--accent-text)' : 'var(--text-secondary)' }}>{t.tag} {t.count}
))}
)}
diff --git a/apps/desktop/src/renderer/features/settings/SettingsPanel.tsx b/apps/desktop/src/renderer/features/settings/SettingsPanel.tsx
index 72b3d8b..a2a6a78 100644
--- a/apps/desktop/src/renderer/features/settings/SettingsPanel.tsx
+++ b/apps/desktop/src/renderer/features/settings/SettingsPanel.tsx
@@ -54,7 +54,7 @@ export function SettingsPanel({ onClose }: { onClose: () => void }) {
{(['editor','keymap','path','other'] as const).map(p => (
-
+
))}
{page === 'editor' && <>
@@ -99,7 +99,7 @@ export function SettingsPanel({ onClose }: { onClose: () => void }) {
}
const sel: React.CSSProperties = { background: 'var(--bg-secondary)', border: '1px solid var(--control-border)', color: 'var(--text-primary)', borderRadius: 4, padding: '4px 8px', fontSize: 13 };
-function dot(on: boolean): React.CSSProperties { return { position: 'absolute', top: 2, left: on ? 18 : 2, width: 16, height: 16, borderRadius: '50%', background: '#fff', transition: 'left 0.2s' }; }
+function dot(on: boolean): React.CSSProperties { return { position: 'absolute', top: 2, left: on ? 18 : 2, width: 16, height: 16, borderRadius: '50%', background: 'var(--text-primary)', transition: 'left 0.2s' }; }
// FR-V5: 默认库路径设置页——查看当前库、浏览选择、立即切换
function PathPage() {
diff --git a/apps/desktop/src/renderer/features/settings/settings-store.ts b/apps/desktop/src/renderer/features/settings/settings-store.ts
index 7ae9b74..76f7c9e 100644
--- a/apps/desktop/src/renderer/features/settings/settings-store.ts
+++ b/apps/desktop/src/renderer/features/settings/settings-store.ts
@@ -1,5 +1,4 @@
import { create } from 'zustand';
-import { applyTheme } from '../appearance/themes';
export interface Settings {
fontSize: number; // 12-20
diff --git a/apps/desktop/src/renderer/features/shell/TitleBar.tsx b/apps/desktop/src/renderer/features/shell/TitleBar.tsx
index a37ee2e..c752bb7 100644
--- a/apps/desktop/src/renderer/features/shell/TitleBar.tsx
+++ b/apps/desktop/src/renderer/features/shell/TitleBar.tsx
@@ -14,8 +14,8 @@ export function TitleBar({ onToggleView, view, onSettings, onAppearance, onToggl
狩夜人笔记
-
-
+
+
diff --git a/apps/desktop/src/renderer/styles.css b/apps/desktop/src/renderer/styles.css
index 87b9a73..4fdbe76 100644
--- a/apps/desktop/src/renderer/styles.css
+++ b/apps/desktop/src/renderer/styles.css
@@ -38,6 +38,16 @@ html, body, #root { margin: 0; height: 100%; }
.tiptap-wrap .ProseMirror .hljs-deletion { color: #e06c75; }
.tiptap-wrap .ProseMirror .hljs-emphasis { font-style: italic; }
.tiptap-wrap .ProseMirror .hljs-strong { font-weight: 700; }
+/* highlight.js 浅色主题——当 --bg-primary 为浅色时生效(latte/daylight/plain) */
+:root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs { color: #24292e; }
+:root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-comment, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-quote { color: #6a737d; }
+:root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-doctag, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-keyword, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-formula, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-name, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-section, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-selector-tag, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-tag { color: #d73a49; }
+:root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-addition, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-attribute, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-attr, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-string, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-template-tag, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-template-variable, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-value { color: #032f62; }
+:root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-built_in, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-class .hljs-title, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-title, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-title.class_, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-type { color: #6f42c1; }
+:root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-function .hljs-title, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-title.function_ { color: #005cc5; }
+:root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-literal, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-number, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-operator, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-variable, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-params { color: #005cc5; }
+:root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-bullet, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-link, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-meta, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-regexp, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-selector-attr, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-selector-class, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-selector-id, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-symbol, :root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-variable.constant_ { color: #005cc5; }
+:root[data-theme-group="light"] .tiptap-wrap .ProseMirror .hljs-deletion { color: #d73a49; }
/* FR-E11 查找高亮 */
.tiptap-wrap .ProseMirror .find-match { background: rgba(255, 213, 79, 0.35); border-radius: 2px; }
.tiptap-wrap .ProseMirror .find-match-active { background: rgba(255, 145, 0, 0.65); }