This commit is contained in:
Ian Gulliver
2026-10-15 22:21:20 -07:00
parent 84de97cec9
commit a1a4b83f39
22 changed files with 171 additions and 204 deletions
+3 -4
View File
@@ -1,8 +1,8 @@
import { get, put, subscribe } from "./api.js";
import { errorText, h, replace, showAlert } from "./dom.js";
import { mountNavbar } from "./navbar.js";
import { leadPane, taskPane } from "./panes.js";
import { handleEvent, loadFocus, loadInbox, loadLeadSessions, loadMe, loadProjects, notify, on, selectTask, setFocus, startLeadStream, state, tabs } from "./state.js";
import { bindShortcuts } from "./switcher.js";
function identityBanner(root) {
const render = () => {
const me = state.me;
@@ -48,7 +48,6 @@ function route() {
}
}
async function main() {
const navbar = h("header", { class: "navbar" });
const banner = h("div", { class: "banner", hidden: true });
const status = await get("/api/admin/status");
await Promise.all([loadMe(), loadProjects(), loadInbox(), loadLeadSessions()]);
@@ -58,8 +57,8 @@ async function main() {
location.hash = linked;
}
startLeadStream();
replace(document.body, navbar, banner, h("div", { class: "panes" }, leadPane(), taskPane()));
mountNavbar(navbar);
replace(document.body, banner, h("div", { class: "panes" }, leadPane(), taskPane()));
bindShortcuts();
identityBanner(banner);
addEventListener("keydown", (e) => {
if (e.key !== "Escape") {