desktop v0.1.20 + web: notify on download complete (was silent) (batch135)
Suppressing the save dialog made downloads completely silent — "nothing happened" even though the file saved to Downloads. Now on download 'done': (1) tell the web UI → branded toast "Saved X to your Downloads folder" when the window is focused; (2) native OS notification (click → reveal in Explorer) when the app is minimized/in the tray, so it's never double-noticed; (3) a failure notice. preload exposes onDownloadDone; home.html shows the toast. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1158,7 +1158,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<script src="/icons.js?v=6"></script>
|
||||
<script>window.__BUILD='2026-07-19-batch134';console.log('%cBiz Connect','color:#1F3B73;font-weight:bold','build '+window.__BUILD);
|
||||
<script>window.__BUILD='2026-07-19-batch135';console.log('%cBiz Connect','color:#1F3B73;font-weight:bold','build '+window.__BUILD);
|
||||
// Emoji are rendered with the OS's own (colour) emoji font — instant, zero network.
|
||||
//
|
||||
// We used to run Twemoji over every emoji, which swapped each one for an <img> pulled INDIVIDUALLY from
|
||||
@@ -3408,6 +3408,10 @@ function wireUpdateBanner(){
|
||||
else if(d.phase==='ready'){ ensure().innerHTML=ic('check',15)+' <span>Update ready</span> <button id="updRestart">Restart now</button>'; el.classList.add('show','ready'); const b=el.querySelector('#updRestart'); if(b) b.onclick=()=>{ try{ n.restartToUpdate&&n.restartToUpdate(); }catch(_){} }; }
|
||||
else if(d.phase==='current'||d.phase==='error'){ if(el){ el.classList.remove('show'); setTimeout(()=>{ if(el&&!el.classList.contains('show')) el.remove(); }, 400); } }
|
||||
});
|
||||
// Desktop: a download finished (saved straight to the Downloads folder, no dialog) → confirm with a toast
|
||||
// so it never feels like "nothing happened". The native app also shows a click-to-reveal OS notification
|
||||
// when its window isn't focused.
|
||||
if(n.onDownloadDone) n.onDownloadDone((d)=>{ if(!d) return; toast(d.ok ? ('Saved “'+(d.name||'file')+'” to your Downloads folder') : ('Couldn’t download '+(d.name||'the file'))); });
|
||||
}
|
||||
// ---- New-web-build detection ----------------------------------------------------------------
|
||||
// The desktop app closes to TRAY, so it can stay open for weeks and keep running the page it loaded on
|
||||
|
||||
Reference in New Issue
Block a user