From 1098f76d636e534e2908d8c96453f0acb0af1a7d Mon Sep 17 00:00:00 2001 From: wukko Date: Sun, 4 Sep 2022 10:29:13 +0600 Subject: [PATCH] popup improvements - set max size of close button in popups to prevent stretching - image picker buttons are now distanced away from content - if an image in image picker couldn't load, it now disappears instead of displaying ":(" --- src/front/cobalt.css | 5 ++++- src/front/cobalt.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/front/cobalt.css b/src/front/cobalt.css index 6be59c3..e879e33 100644 --- a/src/front/cobalt.css +++ b/src/front/cobalt.css @@ -438,7 +438,7 @@ input[type="checkbox"] { overflow: auto; } #close-bottom { - width: 18%; + max-width: 3rem; margin-left: 1rem; background: var(--background); border: var(--border-15); @@ -493,6 +493,9 @@ input[type="checkbox"] { padding-top: 0!important; padding-bottom: 1rem; } +#popup-imagePicker #popup-buttons { + padding-top: 1rem; +} /* adapt the page according to screen size */ @media screen and (min-width: 2300px) { html { diff --git a/src/front/cobalt.js b/src/front/cobalt.js index 28ac2e4..2066767 100644 --- a/src/front/cobalt.js +++ b/src/front/cobalt.js @@ -137,7 +137,7 @@ function popup(type, action, text) { case 1: eid("imagepicker-download").href = text.url; for (let i in text.images) { - eid("imagepicker-holder").innerHTML += `
` + eid("imagepicker-holder").innerHTML += `
` } break; case 0: