mirror of
https://git.sr.ht/~roxwize/mipilin
synced 2025-05-07 22:13:07 +00:00
Some iprovements idfk
Signed-off-by: roxwize <rae@roxwize.xyz>
This commit is contained in:
parent
a3e6df6ce8
commit
961d963677
13 changed files with 160 additions and 102 deletions
8
views/_util.pug
Normal file
8
views/_util.pug
Normal file
|
@ -0,0 +1,8 @@
|
|||
mixin invite_code_expiration(code)
|
||||
- const timestamp = code.expires.getTime()
|
||||
if timestamp === 0
|
||||
td.subtle never
|
||||
else if Date.now() >= timestamp
|
||||
td.error EXPIRED
|
||||
else
|
||||
td= code.expiresString
|
|
@ -1,7 +1,22 @@
|
|||
extends site.pug
|
||||
include _util.pug
|
||||
|
||||
block content
|
||||
h1 Admin Panel
|
||||
p Don't Be Evil
|
||||
h2 Users
|
||||
table
|
||||
tbody
|
||||
tr
|
||||
th UID
|
||||
th Name
|
||||
th Status
|
||||
for user of userTable
|
||||
tr
|
||||
td!= user.id.toString()
|
||||
td
|
||||
a(href=`/users/${user.uname}`)= user.uname
|
||||
td= user.status.toString(2).padStart(4, "0")
|
||||
h2 Invite codes
|
||||
form(action="/codes/delete", method="post")
|
||||
table
|
||||
|
@ -14,12 +29,7 @@ block content
|
|||
- const timestamp = code.expires.getTime()
|
||||
tr
|
||||
td= code.token
|
||||
if timestamp === 0
|
||||
td.subtle never
|
||||
else if Date.now() >= timestamp
|
||||
td.error EXPIRED
|
||||
else
|
||||
td= code.expiresString
|
||||
+invite_code_expiration(code)
|
||||
td
|
||||
a(href=`/users/${code.uname}`)= code.uname
|
||||
td
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
extends site.pug
|
||||
include _util.pug
|
||||
|
||||
block head
|
||||
link(rel="stylesheet", href="/css/dashboard.css")
|
||||
|
@ -25,6 +26,8 @@ block content
|
|||
a(href="#feed") Feed
|
||||
| /
|
||||
a(href="#invite-codes") Invite codes
|
||||
p This is where you "MIPILIN"! That is all you need to know!!!
|
||||
p If onlookers notice your actions and inquire about what you are doing, you MUST tell them that you are mipilining all over the place, and then PROMPTLY SCROLL DOWN AND GENERATE AN INVITE CODE SO THAT THEY CAN MIPILIN TOO. If you do not do this I will cry.
|
||||
form#dashboard-update-form(action="/update/mood", method="post", onsubmit="disable(this);")
|
||||
select(name="mood", required)
|
||||
//- Maybe put the index of the mood in the value of the option element
|
||||
|
@ -53,7 +56,7 @@ block content
|
|||
for code of codes
|
||||
tr
|
||||
td= code.token
|
||||
td= code.expires
|
||||
+invite_code_expiration(code)
|
||||
else
|
||||
.subtle You have no currently active invite codes.
|
||||
br
|
||||
|
@ -61,7 +64,9 @@ block content
|
|||
button(type="submit", disabled=codesUsed>=5) Generate
|
||||
script(nonce=nonce).
|
||||
function disable(form) {
|
||||
form.preventDefault();
|
||||
const btn = form.querySelector("button");
|
||||
btn.preventDefault();
|
||||
btn.setAttribute("disabled", true);
|
||||
|
||||
setTimeout(() => {
|
||||
|
|
|
@ -33,7 +33,13 @@ block page
|
|||
|
||||
block content
|
||||
p
|
||||
| Hi, this is mipilin! It lets you tell your friends how you're feeling, as well as keep a journal of your current mood and their trends over time! Due respect goes to imood, from which I borrowed many ideas and basically all of the moods.
|
||||
| Hi, this is mipilin (pronounced /mipilin/)! It lets you tell your friends how you're feeling, as well as keep a journal of your current mood and their trends over time! Due respect goes to
|
||||
a(href="https://www.imood.com/") imood
|
||||
|, from which I borrowed many ideas and basically all of the moods.
|
||||
p
|
||||
| mipilin is free and open source forevur. If you want to CHECK OUT TEH CODE or FILE AN ISSUE then you may do so at the respective links provided on the
|
||||
a(href="https://sr.ht/~roxwize/mipilin") project page
|
||||
| .
|
||||
h1 Global Feed
|
||||
p Look at how all these people are doing!!!
|
||||
include _feed.pug
|
||||
|
|
|
@ -7,6 +7,7 @@ block head
|
|||
block content
|
||||
h1 Your Journal
|
||||
p This is where you can log your overall mood every day, and get a glimpse at how your life is going so far!
|
||||
p In the near future there will be a magnificient graph that will let you visualize your past entries and your mood trends. You must tay stuned.
|
||||
form#journal-update(action="/update/journal", method="post")
|
||||
.input
|
||||
span Overall mood change (how do you feel compared to yesterday?)
|
||||
|
|
5
views/journal_edit.pug
Normal file
5
views/journal_edit.pug
Normal file
|
@ -0,0 +1,5 @@
|
|||
extends site.pug
|
||||
|
||||
block content
|
||||
p God i fucking hate myself
|
||||
textarea(name="description", id="description", placeholder="max 4096 chars", maxlength="4096", cols="60", rows="12")
|
Loading…
Add table
Add a link
Reference in a new issue