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,5 +1,5 @@
import { post } from "./api.js";
import { errorText, h, replace } from "./dom.js";
import { errorText, h, replace, showAlert } from "./dom.js";
import { openTranscript } from "./panes.js";
import { currentSession, onEach, state } from "./state.js";
export function mountTasks(root) {
@@ -26,7 +26,7 @@ function newTaskForm(projectId) {
location.hash = `#/task/${task.id}`;
}
catch (err) {
alert(errorText(err));
void showAlert(errorText(err));
}
};
return form;
@@ -42,7 +42,7 @@ function newProjectForm() {
form.reset();
}
catch (err) {
alert(errorText(err));
void showAlert(errorText(err));
}
};
return h("details", { class: "add-project", open: state.projects.length === 0 }, h("summary", {}, "Add project"), form);