feat: add user information to settings
This commit is contained in:
parent
7c4c0c7ceb
commit
39bd51a49e
2
main
2
main
|
@ -654,7 +654,7 @@ def settings():
|
||||||
userCookie = get_session(usersession)
|
userCookie = get_session(usersession)
|
||||||
user = get_user(userCookie["id"])
|
user = get_user(userCookie["id"])
|
||||||
|
|
||||||
return render_template("settings.html", userdata=user)
|
return render_template("settings.html", userdata=user, createddate=datetime.datetime.utcfromtimestamp(int(str(user["created"]).split(".")[0])).strftime("%Y-%m-%d %H:%m:%S"))
|
||||||
else:
|
else:
|
||||||
return redirect("/")
|
return redirect("/")
|
||||||
|
|
||||||
|
|
|
@ -26,15 +26,15 @@
|
||||||
|
|
||||||
<div class="postDiv">
|
<div class="postDiv">
|
||||||
<div class="post">
|
<div class="post">
|
||||||
{% if userdata.administrator == 1 %}
|
<h3>Account</h3>
|
||||||
Administrator<br><br>
|
<p>Account Type: {% if userdata.administrator == 1 %}Administrator{% else %}Normal{% endif %}<br>
|
||||||
{% endif %}
|
Username: {{ userdata.username }}<br>
|
||||||
Logged in as {{ userdata.username }}
|
User ID: {{ userdata.id }}<br>
|
||||||
<br><br>
|
Created on: {{ createddate }}</p>
|
||||||
|
<br>
|
||||||
<a href="/@{{ userdata.username }}">View my public profile</a><br>
|
<a href="/@{{ userdata.username }}">View my public profile</a><br>
|
||||||
<a href="/settings/logout">Log out</a>
|
<a href="/settings/logout">Log out</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
Reference in New Issue