add: better app data queries

This commit is contained in:
trisua 2025-07-18 00:14:52 -04:00
parent 9f61d9ce6a
commit 22aea48cc5
12 changed files with 175 additions and 60 deletions

View file

@ -19,7 +19,7 @@
(div
("class" "card flex flex-col gap-2")
(p ("class" "fade") (text "App data keys are not included in this metric, only stored values count towards your limit."))
(text "{% set percentage = (data_limit / app.data_used) * 100 %}")
(text "{% set percentage = (app.data_used / data_limit) * 100 %}")
(div ("class" "progress_bar") (div ("class" "poll_bar") ("style" "width: {{ percentage }}%")))
(div
("class" "w-full flex justify-between items-center")

View file

@ -47,13 +47,12 @@
("class" "flex flex-col gap-1")
(label
("for" "title")
(text "{{ text \"developer:label.redirect\" }}"))
(text "{{ text \"developer:label.redirect\" }} (optional)"))
(input
("type" "url")
("name" "redirect")
("id" "redirect")
("placeholder" "redirect URL")
("required" "")
("minlength" "2")
("maxlength" "32")))
(button
@ -125,7 +124,7 @@
body: JSON.stringify({
title: e.target.title.value,
homepage: e.target.homepage.value,
redirect: e.target.redirect.value,
redirect: e.target.redirect.value || \"\",
}),
})
.then((res) => res.json())

View file

@ -39,6 +39,13 @@
(str (text "dialog:action.cancel")))))))
(script
(text "setTimeout(() => {
// {% if app.redirect|length == 0 %}
alert(\"App has an invalid redirect. Please contact the owner for help.\");
window.close();
return;
// {% endif %}
// ...
globalThis.authorize = async (event) => {
if (
!(await trigger(\"atto::confirm\", [