diff --git a/apps/desktop/src/renderer/features/editor/EditorToolbar.tsx b/apps/desktop/src/renderer/features/editor/EditorToolbar.tsx index 5e041a9..5e8f420 100644 --- a/apps/desktop/src/renderer/features/editor/EditorToolbar.tsx +++ b/apps/desktop/src/renderer/features/editor/EditorToolbar.tsx @@ -11,10 +11,13 @@ function StarButton() { return ; } -const btn: React.CSSProperties = { minWidth: 30, height: 28, border: '1px solid var(--control-border)', background: 'transparent', color: 'var(--text-primary)', cursor: 'pointer', borderRadius: 4, fontSize: 13 }; +const btn: React.CSSProperties = { minWidth: 28, height: 26, border: 'none', background: 'transparent', color: 'var(--text-secondary)', cursor: 'pointer', borderRadius: 4, fontSize: 13 }; function T({ onClick, title, children, disabled }: { onClick: () => void; title: string; children: React.ReactNode; disabled?: boolean }) { - return ; + return ; } export function EditorToolbar() { diff --git a/apps/desktop/src/renderer/features/file-tree/FileTree.tsx b/apps/desktop/src/renderer/features/file-tree/FileTree.tsx index 0905540..ce5825b 100644 --- a/apps/desktop/src/renderer/features/file-tree/FileTree.tsx +++ b/apps/desktop/src/renderer/features/file-tree/FileTree.tsx @@ -111,7 +111,7 @@ export function FileTree() { onDragOver={e => { if (n.type === 'folder') { e.preventDefault(); setDragOver(n.path); } }} onDragLeave={() => setDragOver(null)} onDrop={e => n.type === 'folder' && onDrop(e, n.path)}> - {n.type === 'folder' ? (isCollapsed ? '▶' : '▼') : '📄'} + {n.type === 'folder' ? (isCollapsed ? '▶' : '▼') : '◉'} {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); }} diff --git a/apps/desktop/src/renderer/features/graph/LinkGraph.tsx b/apps/desktop/src/renderer/features/graph/LinkGraph.tsx index f8c56c6..548a0ef 100644 --- a/apps/desktop/src/renderer/features/graph/LinkGraph.tsx +++ b/apps/desktop/src/renderer/features/graph/LinkGraph.tsx @@ -72,7 +72,7 @@ export function LinkGraph({ onSwitchToEditor }: { onSwitchToEditor?: () => void .attr('fill', 'var(--bg-secondary)').attr('stroke', (d) => d.color || 'var(--control-border)').attr('stroke-width', 1.5); nodeSel.append('rect').attr('x', -CARD_W / 2).attr('y', -CARD_H / 2).attr('width', 4).attr('height', CARD_H).attr('fill', (d) => d.color || '#5db0ff'); // FR-G1:文档图标 - nodeSel.append('text').attr('x', -CARD_W / 2 + 12).attr('y', 0).attr('font-size', 12).attr('fill', 'var(--text-tertiary)').text('📄'); + nodeSel.append('text').attr('x', -CARD_W / 2 + 12).attr('y', 0).attr('font-size', 12).attr('fill', 'var(--text-tertiary)').text('◉'); // 标题 nodeSel.append('text').attr('x', -CARD_W / 2 + 28).attr('y', -2).attr('fill', 'var(--text-primary)').attr('font-size', 12).attr('font-family', 'sans-serif') .text((d) => truncate(d.title, 14)); diff --git a/apps/desktop/src/renderer/features/shell/Resizer.tsx b/apps/desktop/src/renderer/features/shell/Resizer.tsx index 2efd573..041ec92 100644 --- a/apps/desktop/src/renderer/features/shell/Resizer.tsx +++ b/apps/desktop/src/renderer/features/shell/Resizer.tsx @@ -12,5 +12,11 @@ export function Resizer({ onDrag, side }: { onDrag: (delta: number) => void; sid window.addEventListener('mousemove', move); window.addEventListener('mouseup', up); }; - return
(e.currentTarget.style.background = 'var(--accent)')} onMouseLeave={e => (e.currentTarget.style.background = 'transparent')} />; + return ( +
{ e.currentTarget.style.background = 'var(--control-border)'; const h = e.currentTarget.querySelector('div'); if (h) (h as HTMLElement).style.background = 'var(--accent)'; }} + onMouseLeave={e => { e.currentTarget.style.background = 'transparent'; const h = e.currentTarget.querySelector('div'); if (h) (h as HTMLElement).style.background = 'var(--text-tertiary)'; }}> +
+
+ ); } \ No newline at end of file diff --git a/apps/desktop/src/renderer/features/shell/TitleBar.tsx b/apps/desktop/src/renderer/features/shell/TitleBar.tsx index c752bb7..5ea378f 100644 --- a/apps/desktop/src/renderer/features/shell/TitleBar.tsx +++ b/apps/desktop/src/renderer/features/shell/TitleBar.tsx @@ -15,10 +15,10 @@ export function TitleBar({ onToggleView, view, onSettings, onAppearance, onToggl
狩夜人笔记
- +
- + @@ -31,4 +31,4 @@ export function TitleBar({ onToggleView, view, onSettings, onAppearance, onToggl ); } -const btn: React.CSSProperties = { width: 36, height: 28, border: 'none', background: 'transparent', color: 'var(--text-secondary)', cursor: 'pointer', fontSize: 12 }; +const btn: React.CSSProperties = { width: 34, height: 28, border: 'none', background: 'transparent', color: 'var(--text-secondary)', cursor: 'pointer', fontSize: 12, borderRadius: 4 }; diff --git a/apps/desktop/src/renderer/features/toolbar/Toolbar.tsx b/apps/desktop/src/renderer/features/toolbar/Toolbar.tsx index 1f1cffd..78d7786 100644 --- a/apps/desktop/src/renderer/features/toolbar/Toolbar.tsx +++ b/apps/desktop/src/renderer/features/toolbar/Toolbar.tsx @@ -50,8 +50,8 @@ export function Toolbar() { return (
- - + + {/* FR-V4:最近库下拉快速切换 */} {vault?.recents && vault.recents.length > 1 && ( @@ -74,4 +74,4 @@ export function Toolbar() {
); } -const btn: React.CSSProperties = { padding: '4px 10px', border: '1px solid var(--control-border)', background: 'transparent', color: 'var(--text-primary)', borderRadius: 4, cursor: 'pointer', fontSize: 12 }; \ No newline at end of file +const btn: React.CSSProperties = { padding: '4px 12px', border: 'none', background: 'transparent', color: 'var(--text-secondary)', borderRadius: 4, cursor: 'pointer', fontSize: 12, transition: 'all 0.15s' }; \ No newline at end of file diff --git a/apps/desktop/src/renderer/styles.css b/apps/desktop/src/renderer/styles.css index 4fdbe76..b8b1710 100644 --- a/apps/desktop/src/renderer/styles.css +++ b/apps/desktop/src/renderer/styles.css @@ -1,5 +1,12 @@ * { box-sizing: border-box; } html, body, #root { margin: 0; height: 100%; } + +/* 自定义滚动条——细+半透明+圆角 */ +::-webkit-scrollbar { width: 6px; height: 6px; } +::-webkit-scrollbar-track { background: transparent; } +::-webkit-scrollbar-thumb { background: var(--control-border); border-radius: 3px; } +::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); } +* { scrollbar-width: thin; scrollbar-color: var(--control-border) transparent; } /* Tiptap 编辑器正文 */ .tiptap-wrap .ProseMirror { font-size: var(--editor-font-size, 14px) !important; @@ -87,10 +94,12 @@ html, body, #root { margin: 0; height: 100%; } /* FR-X2:打印/另存为 PDF 干净排版 + 代码语法高亮 */ @media print { body * { visibility: hidden; } + ::-webkit-scrollbar { display: none !important; } + * { scrollbar-width: none !important; } .tiptap-wrap, .tiptap-wrap * { visibility: visible; } - .tiptap-wrap { position: absolute; left: 0; top: 0; width: 100%; padding: 20px; } - .tiptap-wrap .ProseMirror { font-size: 14px !important; color: #000 !important; } - .tiptap-wrap .ProseMirror pre { background: #f4f4f4 !important; color: #333 !important; border: 1px solid #ddd; padding: 8px; border-radius: 4px; overflow: visible; } + .tiptap-wrap { position: absolute; left: 0; top: 0; width: 100%; padding: 20px; overflow: visible !important; } + .tiptap-wrap .ProseMirror { font-size: 14px !important; color: #000 !important; overflow: visible !important; } + .tiptap-wrap .ProseMirror pre { background: #f4f4f4 !important; color: #333 !important; border: 1px solid #ddd; padding: 8px; border-radius: 4px; overflow: visible !important; } .tiptap-wrap .ProseMirror pre code { color: #333; } .tiptap-wrap .ProseMirror h1, .tiptap-wrap .ProseMirror h2, .tiptap-wrap .ProseMirror h3 { color: #000; } .tiptap-wrap .ProseMirror blockquote { border-color: #ccc; color: #555; }