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 ":("
This commit is contained in:
wukko 2022-09-04 10:29:13 +06:00
parent 4cd6461c4e
commit 1098f76d63
2 changed files with 5 additions and 2 deletions

View file

@ -438,7 +438,7 @@ input[type="checkbox"] {
overflow: auto; overflow: auto;
} }
#close-bottom { #close-bottom {
width: 18%; max-width: 3rem;
margin-left: 1rem; margin-left: 1rem;
background: var(--background); background: var(--background);
border: var(--border-15); border: var(--border-15);
@ -493,6 +493,9 @@ input[type="checkbox"] {
padding-top: 0!important; padding-top: 0!important;
padding-bottom: 1rem; padding-bottom: 1rem;
} }
#popup-imagePicker #popup-buttons {
padding-top: 1rem;
}
/* adapt the page according to screen size */ /* adapt the page according to screen size */
@media screen and (min-width: 2300px) { @media screen and (min-width: 2300px) {
html { html {

View file

@ -137,7 +137,7 @@ function popup(type, action, text) {
case 1: case 1:
eid("imagepicker-download").href = text.url; eid("imagepicker-download").href = text.url;
for (let i in text.images) { for (let i in text.images) {
eid("imagepicker-holder").innerHTML += `<div class="imagepicker-image-container"><img class="imagepicker-image" src="${text.images[i]}" onerror="this.style.display='none';this.parentNode.innerHTML=':('"></img></div>` eid("imagepicker-holder").innerHTML += `<div class="imagepicker-image-container"><img class="imagepicker-image" src="${text.images[i]}" onerror="this.parentNode.style.display='none'"></img></div>`
} }
break; break;
case 0: case 0: