add: text and icon plugins (bberry)

This commit is contained in:
trisua 2025-05-31 13:07:34 -04:00
parent 350e47f4b7
commit 7de2c2e935
5 changed files with 78 additions and 38 deletions

View file

@ -67,12 +67,12 @@
("class" "card-nest")
(div
("class" "card small flex items-center gap-2 red")
(text "{{ icon \"frown\" }}")
(span (text "{{ text \"general:label.account_banned\" }}")))
(icon (text "frown"))
(str (text "general:label.account_banned")))
(div
("class" "card")
(span (text "{{ text \"general:label.account_banned_body\" }}"))))))
(str (text "general:label.account_banned_body"))))))
; if we aren't banned, just show the page body
(text "{% else %} {% block body %}{% endblock %} {%- endif %}")
@ -150,15 +150,15 @@
("rel" "noopener noreferrer")
("target" "_blank")
("onclick", "document.getElementById('link_filter').close()")
(text "{{ icon \"external-link\" }}")
(span (text "{{ text \"dialog:action.continue\" }}")))
(icon (text "external-link"))
(str (text "dialog:action.continue")))
(button
("class" "secondary")
("type" "button")
("onclick", "document.getElementById('link_filter').close()")
(text "{{ icon \"x\" }}" )
(span (text "{{ text \"dialog:action.cancel\" }}"))))))
(icon (text "x"))
(str (text "dialog:action.cancel"))))))
(dialog
("id" "web_api_prompt")
@ -179,15 +179,15 @@
("class" "primary bold circle")
("onclick", "globalThis.web_api_prompt_submit(document.getElementById('prompt').value); document.getElementById('prompt').value = ''")
("type" "button")
(text "{{ icon \"check\" }}")
(text "{{ text \"dialog:action.okay\" }}"))
(icon (text "check"))
(str (text "dialog:action.okay")))
(button
("class" "bold red camo")
("onclick", "globalThis.web_api_prompt_submit('')")
("type" "button")
(text "{{ icon \"x\" }}")
(text "{{ text \"dialog:action.cancel\" }}")))))))
(icon (text "x"))
(str (text "dialog:action.cancel"))))))))
(dialog
("id" "web_api_prompt_long")
@ -208,15 +208,15 @@
("class" "primary bold circle")
("onclick", "globalThis.web_api_prompt_long_submit(document.getElementById('prompt_long').value); document.getElementById('prompt_long').value = ''")
("type" "button")
(text "{{ icon \"check\" }}")
(text "{{ text \"dialog:action.okay\" }}"))
(icon (text "check"))
(str (text "dialog:action.okay")))
(button
("class" "bold red camo")
("onclick", "globalThis.web_api_prompt_long_submit('')")
("type" "button")
(text "{{ icon \"x\" }}")
(text "{{ text \"dialog:action.cancel\" }}")))))))
(icon (text "x"))
(str (text "dialog:action.cancel"))))))))
(dialog
("id" "web_api_confirm")
@ -236,15 +236,15 @@
("class" "primary bold circle")
("onclick", "globalThis.web_api_confirm_submit(true)")
("type" "button")
(text "{{ icon \"check\" }}")
(text "{{ text \"dialog:action.yes\" }}"))
(icon (text "check"))
(str (text "dialog:action.yes")))
(button
("class" "bold red camo")
("onclick", "globalThis.web_api_confirm_submit(false)")
("type" "button")
(text "{{ icon \"x\" }}")
(text "{{ text \"dialog:action.no\" }}")))))))
(icon (text "x"))
(str (text "dialog:action.no"))))))))
(div
("class" "lightbox hidden")
@ -252,7 +252,7 @@
(button
("class" "lightbox_exit small square quaternary red")
("onclick" "trigger('ui::lightbox_close')")
(text "{{ icon \"x\" }}"))
(icon (text "x")))
(a
("href" "")
@ -274,8 +274,8 @@
("href" "/auth/login")
("class" "button")
("data-turbo", "false")
(text "{{ icon \"plus\" }}")
(span (text "{{ text \"general:action.add_account\" }}")))
(icon (text "plus"))
(span (str (text "general:action.add_account"))))
(div
("class" "flex justify-between")
@ -287,7 +287,7 @@
("class" "quaternary")
("onclick" "document.getElementById('tokens_dialog').close()")
("type" "button")
(text "{{ icon \"check \" }}")
(icon (text "check "))
(span "{{ text \"dialog:action.okay\" }}")))))))
; user scripts