add: products api
This commit is contained in:
parent
3c4ce1fae5
commit
df5eaf24f7
29 changed files with 1022 additions and 110 deletions
65
crates/app/src/public/html/economy/wallet.lisp
Normal file
65
crates/app/src/public/html/economy/wallet.lisp
Normal file
|
@ -0,0 +1,65 @@
|
|||
(text "{% extends \"root.html\" %} {% block head %}")
|
||||
(title
|
||||
(text "Wallet - {{ config.name }}"))
|
||||
(text "{% endblock %} {% block body %} {{ macros::nav(selected=\"wallet\") }}")
|
||||
(main
|
||||
("class" "flex flex_col gap_2")
|
||||
(div
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex items_center justify_between gap_2")
|
||||
(span
|
||||
("class" "flex items_center gap_2")
|
||||
(icon (text "piggy-bank"))
|
||||
(span (str (text "general:link.wallet")))))
|
||||
(div
|
||||
("class" "card lowered flex flex_col gap_4")
|
||||
(a
|
||||
("class" "card button raised")
|
||||
("href" "/wallet/buy")
|
||||
(b (text "Coin balance"))
|
||||
(h3
|
||||
("class" "flex gap_2 items_center")
|
||||
("style" "height: 24px")
|
||||
(icon (text "badge-cent"))
|
||||
(text "{{ user.coins }}")))))
|
||||
(div
|
||||
("class" "card_nest")
|
||||
(div
|
||||
("class" "card small flex items_center justify_between gap_2")
|
||||
(span
|
||||
("class" "flex items_center gap_2")
|
||||
(icon (text "clock"))
|
||||
(span (str (text "economy:label.recent_transfers")))))
|
||||
(div
|
||||
("class" "card lowered flex flex_col gap_4")
|
||||
(div
|
||||
("class" "w_full")
|
||||
("style" "overflow: auto")
|
||||
(table
|
||||
("class" "w_full")
|
||||
(thead
|
||||
(th (text "Created"))
|
||||
(th (text "Sender"))
|
||||
(th (text "Receiver"))
|
||||
(th (text "Amount"))
|
||||
(th (text "Product")))
|
||||
(tbody
|
||||
(text "{% for transfer in list -%}")
|
||||
(tr
|
||||
(td (span ("class" "date short") (text "{{ transfer[1] }}")))
|
||||
(td ("class" "w_content") (text "{{ components::full_username(user=transfer[3]) }}"))
|
||||
(td ("class" "w_content") (text "{{ components::full_username(user=transfer[4]) }}"))
|
||||
(td
|
||||
(text "{{ transfer[2] }}")
|
||||
(text "{% if transfer[6] -%}")
|
||||
(span ("title" "Pending") (icon (text "clock")))
|
||||
(text "{%- endif %}"))
|
||||
(td
|
||||
(text "{% if transfer[5] -%}")
|
||||
(a
|
||||
("href" "/product/{{ transfer[5].id }}")
|
||||
(icon (text "external-link")))
|
||||
(text "{%- endif %}")))
|
||||
(text "{%- endfor %}")))))))
|
||||
(text "{% endblock %}")
|
Loading…
Add table
Add a link
Reference in a new issue