feat(admin): native-feed detail group + dismissable notice
Wire the NativeFeeds chip group into the per-feed emails page, add a dismissable banner that nudges users to subscribe directly, the dismiss POST route mirroring the confirmation-dismiss idiom, and the client-side handler in emails-page.ts. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
1 parent
35262d5d0b
commit
fe5728de59
3 files changed
+140
No files matched your search
@@ -634,3 +634,22 @@ if (dismissBtn && banner) {
|
||||
.catch(() => {});
|
||||
});
|
||||
}
|
||||
|
||||
// ── Native-feed banner dismiss ────────────────────────────────────────────────
|
||||
|
||||
const nativeDismissBtn = document.getElementById("native-feed-dismiss");
|
||||
const nativeBanner = document.getElementById("native-feed-banner");
|
||||
if (nativeDismissBtn && nativeBanner) {
|
||||
nativeDismissBtn.addEventListener("click", () => {
|
||||
const feedId = nativeBanner.getAttribute("data-feed-id") ?? "";
|
||||
fetch(`/admin/feeds/${feedId}/native-feed/dismiss`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
})
|
||||
.then((r) => r.json())
|
||||
.then((d) => {
|
||||
if ((d as { ok?: boolean }).ok) nativeBanner.remove();
|
||||
})
|
||||
.catch(() => {});
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user