Replace browser popups with in-page dialogs; focus new-task prompt

This commit is contained in:
Ian Gulliver
2026-10-14 22:42:46 -07:00
parent 1dc09c77e0
commit 4ffdc1e517
32 changed files with 270 additions and 195 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import { post, type Attachment, type InboxItem, type InboxResponseCreate } from "./api.js";
import { mountChanges } from "./changes.js";
import { ago, errorText, h, replace } from "./dom.js";
import { ago, errorText, h, replace, showAlert } from "./dom.js";
import { inlineMarkdown, markdown } from "./markdown.js";
import { findTask, onEach, state } from "./state.js";
@@ -57,7 +57,7 @@ export function mountInbox(root: HTMLElement): () => void {
modes.delete(d.item_id);
}
} catch (err) {
alert(errorText(err));
void showAlert(errorText(err));
}
button.disabled = false;
render();
@@ -180,7 +180,7 @@ function card(item: InboxItem, changed: () => void): HTMLElement {
try {
await post("/api/inbox/responses", { body: { responses: [{ item_id: item.id, type: "dismiss" }] } });
} catch (err) {
alert(errorText(err));
void showAlert(errorText(err));
ok.disabled = false;
}
};