mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
feat(admin): surface confirmation link, badge, banner + dismiss
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -615,3 +615,22 @@ async function bulkDeleteSelectedEmails(): Promise<void> {
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
initEmailUI();
|
||||
});
|
||||
|
||||
// ── Confirmation banner dismiss ───────────────────────────────────────────────
|
||||
|
||||
const dismissBtn = document.getElementById("confirmation-dismiss");
|
||||
const banner = document.getElementById("confirmation-banner");
|
||||
if (dismissBtn && banner) {
|
||||
dismissBtn.addEventListener("click", () => {
|
||||
const feedId = banner.getAttribute("data-feed-id") ?? "";
|
||||
fetch(`/admin/feeds/${feedId}/confirmation/dismiss`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then((r) => r.json())
|
||||
.then((d) => {
|
||||
if ((d as { ok?: boolean }).ok) banner.remove();
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user