From 5dc17162d237914441b3b73114999d433d578fab Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Sat, 7 Nov 2020 16:31:10 +0000 Subject: [PATCH] Confirm on mark as read --- views/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/views/index.html b/views/index.html index 82f827f..cbcc44d 100644 --- a/views/index.html +++ b/views/index.html @@ -184,8 +184,9 @@ }); }, markAllRead() { - this.setBusy(true); let ids = this.shownItems.filter(item => !item.Read).map(item => item.ID); + if (confirm(`Are you sure you want to mark ${ids.length} items as read?`)) { + this.setBusy(true); fetch( `/api/read`, {method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(ids)} @@ -199,6 +200,7 @@ console.error(err); this.setBusy(false); }); + } }, addSite(url) { this.setBusy(true);