Header popup no longer pops up when downloading the archive
This commit is contained in:
@@ -182,40 +182,40 @@ async function run_new_unsafe(allow_header_copy = false) {
|
||||
.style("gap", "8px")
|
||||
.if(allow_header_copy, el => el.append(
|
||||
$n("button.wide").text(template_finished_loc.copy_header)
|
||||
.on_click(async () => {
|
||||
let header = generate_template_header(steps);
|
||||
|
||||
try {
|
||||
navigator.clipboard.writeText(header);
|
||||
} catch(e) {}
|
||||
|
||||
let back_button = $n("button")
|
||||
.text(buttons.close)
|
||||
.finish();
|
||||
|
||||
let button_list = $n("div.horizontal-list").append(back_button);
|
||||
|
||||
let popup = new Popup($n("div").append_all([
|
||||
$n("div").html(template_finished_loc.copy_header_title),
|
||||
$n("div.vertical-spacer"),
|
||||
$n("textarea")
|
||||
.style("width", "550px")
|
||||
.style("height", "300px")
|
||||
.value(header),
|
||||
$n("div.vertical-spacer"),
|
||||
button_list
|
||||
])
|
||||
);
|
||||
|
||||
await popup.show();
|
||||
|
||||
await new Promise((r) => {
|
||||
back_button.onclick = () => { r(); }
|
||||
});
|
||||
|
||||
await popup.destroy();
|
||||
})
|
||||
))
|
||||
.on_click(async () => {
|
||||
let header = generate_template_header(steps);
|
||||
|
||||
try {
|
||||
navigator.clipboard.writeText(header);
|
||||
} catch(e) {}
|
||||
|
||||
let back_button = $n("button")
|
||||
.text(buttons.close)
|
||||
.finish();
|
||||
|
||||
let button_list = $n("div.horizontal-list").append(back_button);
|
||||
|
||||
let popup = new Popup($n("div").append_all([
|
||||
$n("div").html(template_finished_loc.copy_header_title),
|
||||
$n("div.vertical-spacer"),
|
||||
$n("textarea")
|
||||
.style("width", "550px")
|
||||
.style("height", "300px")
|
||||
.value(header),
|
||||
$n("div.vertical-spacer"),
|
||||
button_list
|
||||
])
|
||||
);
|
||||
|
||||
await popup.show();
|
||||
|
||||
await new Promise((r) => {
|
||||
back_button.onclick = () => { r(); }
|
||||
});
|
||||
|
||||
await popup.destroy();
|
||||
})
|
||||
.append(
|
||||
$n("a.button.accent.wide")
|
||||
.href(URL.createObjectURL(new Blob([out_buffer])))
|
||||
|
||||
Reference in New Issue
Block a user