1
0
Fork 0
mirror of https://git.sr.ht/~roxwize/mipilin synced 2025-05-15 01:33:06 +00:00

mipilin r9... Fimally

Signed-off-by: roxwize <rae@roxwize.xyz>
This commit is contained in:
Rae 5e 2025-01-28 17:05:54 -05:00
parent 961d963677
commit fa8fae4638
Signed by: rae
GPG key ID: 5B1A0FAB9BAB81EE
9 changed files with 217 additions and 150 deletions

View file

@ -15,11 +15,23 @@ block page
button(type="submit") Edit
h1(style="margin-top:1em;") Mood history
ul#dashboard-mood-history
if moodHistory.length < 1
span [no updates]
for mood of moodHistory
li
strong= mood.mood
|
| #{mood.date}
h1(style="margin-top:1em;") Follows
table
tbody
for follow of followed
tr
td
a(href=`/users/${follow.uname}`)= follow.uname
td
form(action=`/users/${follow.uname}/follow`, method="post")
button Unfollow
block content
p
@ -42,7 +54,7 @@ block content
+feed(recentUpdates)
h1#invite-codes(style="margin-top:1em;") Invite codes
p Invite your friends to the mipilin beta! You can create up to five invite codes every month, and they all expire within a week.
p If you're a trusted user, you can invite your friends to the mipilin beta! You can create up to five invite codes every month, and they all expire within a week.
p
| Your current invite codes (
strong= codesUsed
@ -61,13 +73,15 @@ block content
.subtle You have no currently active invite codes.
br
form(action="/codes/create", method="post")
button(type="submit", disabled=codesUsed>=5) Generate
button(type="submit", disabled=codesUsed>=5 || !isTrusted) Generate
if codesUsed >= 5
p You've generated the maximum amount of codes this month.
if !isTrusted
p You need be manually marked as "trusted" to generate codes.
script(nonce=nonce).
function disable(form) {
form.preventDefault();
const btn = form.querySelector("button");
btn.preventDefault();
btn.setAttribute("disabled", true);
btn.setAttribute("disabled", "");
setTimeout(() => {
btn.removeAttribute("disabled");