From a7f954ae44cd539076d8d42aa12cd0a78ddd6f17 Mon Sep 17 00:00:00 2001 From: sravan Date: Sun, 19 Jul 2026 10:38:36 +0530 Subject: [PATCH] mobile: Enter=newline on mobile, hide preview zoom buttons; desktop: downloads to Downloads folder (batch133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Mobile: the Return key now inserts a newline instead of sending (send via the button, like every native chat app). Desktop keeps Enter=send / Shift+Enter=newline. - Image preview: hide the on-screen +/- zoom buttons on mobile (pinch-to-zoom covers it). - Desktop (Electron): a will-download handler saves straight to the OS Downloads folder with no "where to save?" dialog, de-duping the name if it exists. NOTE: desktop code only — NOT published to the update feed (needs an explicit desktop rebuild/publish). Co-Authored-By: Claude Opus 4.8 --- desktop/main.js | 13 +++++++++++++ server/public/home.html | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/desktop/main.js b/desktop/main.js index 4565b43..cee42d5 100644 --- a/desktop/main.js +++ b/desktop/main.js @@ -437,6 +437,19 @@ function configureSession() { if (sys && sys !== 'en-US' && (!avail.length || avail.includes(sys))) langs.push(sys); ses.setSpellCheckerLanguages(langs); } catch (_) {} + // Downloads go STRAIGHT to the OS Downloads folder — no "where do you want to save?" dialog. If a file of + // the same name already exists, suffix " (n)" so nothing is overwritten. (item.setSavePath suppresses the + // save dialog entirely.) + ses.on('will-download', (_e, item) => { + try { + const dir = app.getPath('downloads'); + const name = item.getFilename() || 'download'; + const ext = path.extname(name), base = path.basename(name, ext); + let target = path.join(dir, name), n = 1; + while (fs.existsSync(target)) target = path.join(dir, `${base} (${n++})${ext}`); + item.setSavePath(target); + } catch (_) {} + }); } // Single-instance: a tray app must not spawn a second copy. If another launch happens, focus the diff --git a/server/public/home.html b/server/public/home.html index 4bcfad5..89d317e 100644 --- a/server/public/home.html +++ b/server/public/home.html @@ -1100,6 +1100,7 @@ Making every focusable text field exactly 16px is the only reliable prevention — and it's belt-and- suspenders for the native app too. autoGrow's empty-guard keeps the composer at one line despite this. */ .composer-row input, .composer-row textarea, input[type="text"], input[type="search"], input[type="email"], input[type="tel"], input[type="url"], input[type="password"], input[type="number"], input:not([type]), textarea, select{font-size:16px;} + .lightbox .lb-zoom{display:none;} /* mobile: pinch-to-zoom the image directly — the on-screen +/- buttons are redundant clutter */ /* Native-style push/pop: the conversation slides in from the right when opened and slides back out when you go back, so navigation has a clear direction (like Teams/WhatsApp). */ /* Native-style push/pop (like iOS/Teams): the conversation (.content) slides in from the right while @@ -1151,7 +1152,7 @@ -