Improve notice dialog

This commit is contained in:
Balakrishnan Balasubramanian 2024-08-12 13:12:49 -04:00
parent 4578e64597
commit 8299da3b27
3 changed files with 11 additions and 5 deletions

View File

@ -45,3 +45,10 @@
border: 5px solid;
border-color: red;
}
#notice_dialog button {
padding-left: 1rem;
padding-right: 1rem;
margin-left: 1rem;
margin-right: 1rem;
}

View File

@ -8,8 +8,7 @@
</head>
<body>
<dialog id="notice_dialog">
<p id="notice_p"></p>
<form><button type="submit" formmethod="dialog">X</button></form>
<form method="dialog"><span id="notice_span"></span><button>X</button></form>
</dialog>
<div class="container">
<div class="controls">

View File

@ -15,7 +15,7 @@ let makeCollageBtn
let albumSelect
/** @type {HTMLParagraphElement} */
let noticeP
let noticeSpan
/** @type {HTMLDialogElement} */
let noticeDialog
@ -34,7 +34,7 @@ function main() {
loadPhotosBtn = document.getElementById("load_photos_button")
makeCollageBtn = document.getElementById("make_collage_button")
albumSelect = document.getElementById("album_selector")
noticeP = document.getElementById("notice_p")
noticeSpan = document.getElementById("notice_span")
noticeDialog = document.getElementById("notice_dialog")
albumPhotosDiv = document.getElementById("album_photos")
selectedPhotosDiv = document.getElementById("selected_photos")
@ -92,7 +92,7 @@ function closeNotice() {
/** @param {string} notice */
function showNotice(notice) {
noticeP.textContent = notice
noticeSpan.textContent = notice
noticeDialog.show()
}