Offer "After review" in the Merge dialog while a review runs
This commit is contained in:
Vendored
+4
-1
@@ -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
|
||||
Reference in New Issue
Block a user