From d1ee677591bd5e6e8b1726b2281621adf6131332 Mon Sep 17 00:00:00 2001 From: haoyuren <13851610112@163.com> Date: Sun, 15 Mar 2026 04:27:43 -0500 Subject: v0.3.0: Fix sync exclusions, add editor zoom, cached PDF loading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Exclude CLAUDE.md from sync (move to .claude/ dotfile dir, clean up root copy) - Add Ctrl+wheel font zoom for editor (capture phase, disable Electron built-in zoom) - Load cached PDF on project connect (avoid recompile to see last PDF) - Add synctex debug logging for PDF↔source navigation troubleshooting - Fix .claude/ dir creation order (mkdir before write) Co-Authored-By: Claude Opus 4.6 --- src/preload/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/preload/index.ts') diff --git a/src/preload/index.ts b/src/preload/index.ts index b2984b5..649c3aa 100644 --- a/src/preload/index.ts +++ b/src/preload/index.ts @@ -1,9 +1,15 @@ // Copyright (c) 2026 Yuren Hao // Licensed under AGPL-3.0 - see LICENSE file -import { contextBridge, ipcRenderer, webUtils } from 'electron' +import { contextBridge, ipcRenderer, webUtils, webFrame } from 'electron' import { createHash } from 'crypto' +// Prevent Electron's built-in Ctrl+wheel zoom so editor can handle font scaling +webFrame.setVisualZoomLevelLimits(1, 1) +window.addEventListener('wheel', (e) => { + if (e.ctrlKey || e.metaKey) e.preventDefault() +}, { passive: false }) + const api = { // File system readFile: (path: string) => ipcRenderer.invoke('fs:readFile', path), @@ -66,6 +72,8 @@ const api = { pathDocMap?: Record fileRefs?: Array<{ id: string; path: string }> rootFolderId?: string + syncDir?: string + cachedPdfPath?: string message?: string }>, otDisconnect: () => ipcRenderer.invoke('ot:disconnect'), -- cgit v1.2.3