fix issues with icon coloring in chrome by switching to img tags

This commit is contained in:
2025-10-28 18:34:42 +00:00
parent 7db0bea35c
commit 2877f7709a
11 changed files with 115 additions and 108 deletions

View File

@@ -103,7 +103,7 @@ class ErrorDialog extends HTMLElement {
</dialog>
`;
this.dialog = this.shadowRoot.querySelector("dialog");
this.errors = this.shadowRoot.querySelector("#errors")
this.errors = this.shadowRoot.querySelector("#errors");
for (const control of this.shadowRoot.querySelector("#controls").childNodes) {
control.addEventListener("click", async (e) => {
@@ -111,15 +111,15 @@ class ErrorDialog extends HTMLElement {
this.dialog.close(e.target.value);
});
}
this.dialog.addEventListener("close", () => {
if (this.dialog.returnValue == "ok") {}
else if (this.dialog.returnValue == "copy") {
let errors = ""
if (this.dialog.returnValue === "ok") {}
else if (this.dialog.returnValue === "copy") {
let errors = "";
for (const error of this.errors.childNodes) {
errors += `${error.innerText}\n`
errors += `${error.innerText}\n`;
}
navigator.clipboard.writeText(errors)
navigator.clipboard.writeText(errors);
}
this.parentElement.removeChild(this);
});