global: opreturn part 4

This commit is contained in:
nym21
2026-07-19 09:34:03 +02:00
parent 5161ae2012
commit 0fc61d7932
19 changed files with 510 additions and 108 deletions
+4 -2
View File
@@ -76,6 +76,7 @@ function createReceiptBrand() {
/** @param {Block} block */
function openReceiptDialog(block) {
const dialog = document.createElement("dialog");
const content = document.createElement("main");
const paper = document.createElement("article");
const controls = document.createElement("footer");
const print = document.createElement("button");
@@ -104,14 +105,15 @@ function openReceiptDialog(block) {
createReceiptQr(block, url),
createReceiptBrand(),
);
dialog.append(paper, controls);
content.append(paper);
dialog.append(content, controls);
print.addEventListener("click", () => {
window.print();
});
openDialog(dialog, document.body);
dialog.focus({ preventScroll: true });
dialog.scrollTop = 0;
content.scrollTop = 0;
}
export function createBlockReceipt() {