From 9703faa1fa9fb6ddd3797c46ad74fc2ab2d3afcb Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Fri, 28 Apr 2023 23:53:38 +0000 Subject: [PATCH] improve styling for login box and alert box, delete modal dialog alert box on close Signed-off-by: Arthur Lu --- login.html | 5 +---- scripts/dialog.js | 6 +++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/login.html b/login.html index 0688e85..5f0dd2c 100644 --- a/login.html +++ b/login.html @@ -22,7 +22,7 @@
-
+

Proxmox VE Login

@@ -36,9 +36,6 @@
-
- -
\ No newline at end of file diff --git a/scripts/dialog.js b/scripts/dialog.js index a10a00e..250b440 100644 --- a/scripts/dialog.js +++ b/scripts/dialog.js @@ -52,12 +52,16 @@ export function alert (message) { `; let dialog = document.createElement("dialog"); - dialog.classList.add("w3-card-4"); + dialog.classList.add("w3-card"); dialog.classList.add("w3-container"); dialog.append(form); document.body.append(dialog); dialog.showModal(); + + dialog.addEventListener("close", () => { + dialog.parentElement.removeChild(dialog); + }) } customElements.define("dialog-form", Dialog); \ No newline at end of file