mobile: Enter=newline on mobile, hide preview zoom buttons; desktop: downloads to Downloads folder (batch133)
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user