fix: user avatar mime change from gif to avif

This commit is contained in:
trisua 2025-06-25 23:15:24 -04:00
parent ffdb767518
commit 6e0f2985b9
20 changed files with 219 additions and 104 deletions

View file

@ -68,8 +68,8 @@
(text "Unban"))
(text "{%- endif %}")))
(script
(text "setTimeout(() => {
const ui = ns(\"ui\");
(text "setTimeout(async () => {
const ui = await ns(\"ui\");
const element = document.getElementById(\"mod_options\");
async function profile_request(do_confirm, path, body) {
@ -216,6 +216,52 @@
("class" "card lowered flex flex-wrap gap-2")
(text "{{ components::user_plate(user=invite[0], show_menu=false) }}")))
(text "{%- endif %}")
(div
("class" "card-nest w-full")
(div
("class" "card small flex items-center justify-between gap-2")
(div
("class" "flex items-center gap-2")
(text "{{ icon \"square-function\" }}")
(span
(text "{{ text \"mod_panel:label.send_debug_payload\" }}"))))
(form
("class" "card flex flex-col gap-2")
("onsubmit" "send_debug_payload(event)")
(div
("class" "flex flex-col gap-1")
(label
("for" "title")
(text "{{ text \"communities:label.content\" }}"))
(textarea
("type" "text")
("name" "content")
("id" "content")
("placeholder" "javascript content")
("required" "")
("minlength" "2")))
(button
("class" "primary")
(text "{{ text \"mod_panel:action.send\" }}"))))
(script
(text "globalThis.send_debug_payload = async (e) => {
e.preventDefault();
if (
!(await trigger(\"atto::confirm\", [
\"Are you sure you would like to do this? This will only work if the user is online.\",
]))
) {
return;
}
const res = await trigger(
\"streams::send_packet_to\",
[\"{{ profile.id }}\", \"notifs\", { Forward: \"Javascript\" }, { js: e.target.content.value }]
);
trigger(\"atto::toast\", [res.ok ? \"success\" : \"error\", res.message]);
}"))
(div
("class" "card-nest w-full")
(div
@ -235,8 +281,8 @@
("class" "card lowered flex flex-col gap-2")
("id" "permission_builder")))
(script
(text "setTimeout(() => {
const get_permissions_html = trigger(
(text "setTimeout(async () => {
const get_permissions_html = await trigger(
\"ui::generate_permissions_ui\",
[
{