Offer "After review" in the Merge dialog while a review runs

This commit is contained in:
Ian Gulliver
2026-10-16 22:34:14 -07:00
parent c2d0ff77d7
commit b28968a0bc
25 changed files with 835 additions and 292 deletions
+4 -1
View File
@@ -62,7 +62,7 @@ export function errorText(err) {
return err instanceof Error ? err.message : String(err);
}
function modal(content, buttons, anchor = null) {
const actions = buttons.map((b) => h("button", { type: "submit", value: b.value, class: b.class ?? "", formNoValidate: b.value === "cancel" }, b.label));
const actions = buttons.map((b) => h("button", { type: "submit", value: b.value, class: b.class ?? "", title: b.title ?? "", formNoValidate: b.value === "cancel" }, b.label));
const body = typeof content === "string" ? [h("p", { class: "modal-text" }, content)] : content;
const dialog = h("dialog", { class: "modal" }, h("form", { method: "dialog" }, ...body, h("div", { class: "modal-actions" }, ...actions)));
for (const input of dialog.querySelectorAll("input")) {
@@ -105,4 +105,7 @@ export async function showConfirm(content, action, danger = false, anchor = null
], anchor);
return value === "ok";
}
export async function showChoice(content, choices, anchor = null) {
return modal(content, [{ label: "Cancel", value: "cancel" }, ...choices], anchor);
}
//# sourceMappingURL=dom.js.map