Replace browser popups with in-page dialogs; focus new-task prompt
This commit is contained in:
Vendored
+3
-3
@@ -1,6 +1,6 @@
|
||||
import { post } 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";
|
||||
const drafts = new Map();
|
||||
@@ -50,7 +50,7 @@ export function mountInbox(root) {
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
alert(errorText(err));
|
||||
void showAlert(errorText(err));
|
||||
}
|
||||
button.disabled = false;
|
||||
render();
|
||||
@@ -142,7 +142,7 @@ function card(item, changed) {
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user