fix: media gallery in apple internet explorer

This commit is contained in:
trisua 2025-08-11 12:32:37 -04:00
parent ba319130d2
commit 46b3e66cd4
2 changed files with 9 additions and 4 deletions

View file

@ -12,7 +12,9 @@
@media screen and (max-width: 900px) { @media screen and (max-width: 900px) {
.media_gallery { .media_gallery {
grid-auto-flow: row dense; /* grid-auto-flow: row dense; */ /* safari is the most shit browser ever dude, this property causes safari to make images overlap for lord knows why */
display: flex;
flex-direction: column;
} }
} }

View file

@ -1,7 +1,6 @@
(text "{% extends \"root.html\" %} {% block head %}") (text "{% extends \"root.html\" %} {% block head %}")
(title (title
(text "Community settings - {{ config.name }}")) (text "Community settings - {{ config.name }}"))
(text "{% endblock %} {% block body %} {{ macros::nav() }}") (text "{% endblock %} {% block body %} {{ macros::nav() }}")
(main (main
("class" "flex flex_col gap_2") ("class" "flex flex_col gap_2")
@ -447,7 +446,7 @@
(text "{{ text \"communities:label.upload\" }}"))) (text "{{ text \"communities:label.upload\" }}")))
(form (form
("class" "card flex flex_col gap_2") ("class" "card flex flex_col gap_2")
("onsubmit" "upload_emoji(event)") ("onsubmit" "create_emoji_from_form(event)")
(div (div
("class" "flex flex_col gap_1") ("class" "flex flex_col gap_1")
(label (label
@ -505,7 +504,7 @@
(text "{{ text \"stacks:label.remove\" }}"))))) (text "{{ text \"stacks:label.remove\" }}")))))
(text "{% endfor %}")) (text "{% endfor %}"))
(script (script
(text "globalThis.upload_emoji = (e) => { (text "globalThis.create_emoji_from_form = (e) => {
e.preventDefault(); e.preventDefault();
e.target.querySelector(\"button\").style.display = \"none\"; e.target.querySelector(\"button\").style.display = \"none\";
@ -524,6 +523,10 @@
]); ]);
e.target.querySelector(\"button\").removeAttribute(\"style\"); e.target.querySelector(\"button\").removeAttribute(\"style\");
if (res.ok) {
e.target.reset();
}
}); });
alert(\"Emoji upload in progress. Please wait!\"); alert(\"Emoji upload in progress. Please wait!\");