Bold questions
This commit is contained in:
+9
-4
@@ -1,8 +1,8 @@
|
||||
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 { inlineMarkdown, markdown } from "./markdown.js";
|
||||
import { findTask, onEach, state } from "./state.js";
|
||||
import { reportCard } from "./task.js";
|
||||
|
||||
type Scope = "all" | "project" | "task";
|
||||
type Mode = "pick" | "reply" | "snooze" | "dismiss";
|
||||
@@ -113,9 +113,14 @@ export function mountInbox(root: HTMLElement): () => void {
|
||||
};
|
||||
|
||||
const off = onEach(["inbox", "selection", "tasks"], render);
|
||||
replace(root, h("div", { class: "inbox-view" }, tabs, submitBar, list));
|
||||
const changes = h("section", { class: "inbox-changes" });
|
||||
replace(root, h("div", { class: "inbox-view" }, changes, tabs, submitBar, list));
|
||||
const offChanges = mountChanges(changes, true);
|
||||
render();
|
||||
return off;
|
||||
return () => {
|
||||
off();
|
||||
offChanges();
|
||||
};
|
||||
}
|
||||
|
||||
type Group = { taskId: string; projectId: string; blocked: boolean; items: InboxItem[] };
|
||||
@@ -214,7 +219,7 @@ function card(item: InboxItem, changed: () => void): HTMLElement {
|
||||
);
|
||||
break;
|
||||
case "report":
|
||||
replace(body, reportCard(p));
|
||||
replace(body, markdown(String(p["text"] ?? ""), "md summary"));
|
||||
break;
|
||||
case "session_error":
|
||||
replace(body, h("p", { class: "error-text" }, String(p["error"])));
|
||||
|
||||
Reference in New Issue
Block a user