fix: poll expired ui

This commit is contained in:
trisua 2025-06-05 16:34:07 -04:00
parent 460e87e90e
commit 0f556bb7c8
3 changed files with 8 additions and 2 deletions

View file

@ -155,6 +155,10 @@
const poll_data = get_poll_data(); const poll_data = get_poll_data();
if (!poll_data[0]) { if (!poll_data[0]) {
e.target
.querySelector(\"button.primary\")
.classList.remove(\"hidden\");
return alert(poll_data[1]); return alert(poll_data[1]);
} }

View file

@ -1500,11 +1500,13 @@
(div (div
("class" "flex w-full flex-wrap gap-2") ("class" "flex w-full flex-wrap gap-2")
(span ("class" "notification chip") (text "{{ total }} votes")) (span ("class" "notification chip") (text "{{ total }} votes"))
(text "{% if not poll[2] -%}")
(span (span
("class" "notification chip") ("class" "notification chip")
(text "Expires in ") (text "Expires in ")
(span (span
("class" "poll_date") ("class" "poll_date")
("data-created" "{{ poll[0].created }}") ("data-created" "{{ poll[0].created }}")
("data-expires" "{{ poll[0].expires }}"))))) ("data-expires" "{{ poll[0].expires }}")))
(text "{%- endif %}")))
(text "{%- endmacro %}") (text "{%- endmacro %}")

View file

@ -82,7 +82,7 @@
("class" "dropdown") ("class" "dropdown")
(button (button
("class" "title") ("class" "title")
("onclick" "trigger('atto:hooks::dropdown', [evnet])") ("onclick" "trigger('atto::hooks::dropdown', [event])")
("exclude" "dropdown") ("exclude" "dropdown")
(icon_class (text "chevron-down") (text "dropdown-arrow"))) (icon_class (text "chevron-down") (text "dropdown-arrow")))