remove: PacketType::Javascript

This commit is contained in:
trisua 2025-06-25 23:40:12 -04:00
parent 6e0f2985b9
commit 59581f69c9
3 changed files with 0 additions and 59 deletions

View file

@ -216,52 +216,6 @@
("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