Ask in the page's own dialog, not confirm(), which the iOS app answered Cancel (#462)

Deleting a downloaded file from the iOS app did nothing: no DELETE reached ipx-web or ipx.
WKWebView answers confirm() Cancel without showing it unless the app implements the panel,
which 614f270 does (#453), but only once the app is rebuilt. ask() is a <dialog> of the
page's own, in the top layer, so it opens over a dialog already up (the file menu, Settings)
and leaves it as it was, and Escape answers it alone. Every confirm() in the page and the
admin page goes through it; the tests answer it rather than the browser's dialog, and the
warning before sharing a feed with its key in the address, untested before, now is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 23:32:15 +00:00
parent d1ba83bb7a
commit eda77e87c7
9 changed files with 77 additions and 36 deletions

View File

@@ -187,7 +187,7 @@ async function allAction(a: string){
const n=S.feeds.reduce((k,x)=>k+(x.unread||0),0);
if(!n){ toast('Nothing unread'); return; }
// One click across every feed is a lot to take back, so this one asks first.
if(!confirm(`Mark all ${n} unread item${n===1?'':'s'} read, in every feed you subscribe to?`)) return;
if(!await ask(`Mark all ${n} unread item${n===1?'':'s'} read, in every feed you subscribe to?`, 'Mark all read')) return;
try{
const r=await api('/api/read-all',{method:'POST'});
haptic('done'); toast(`Marked ${r.marked} read`); await loadFeeds(true); renderFeed(); loadEntries();