summaryrefslogtreecommitdiffstats
path: root/templates/base.rs.html
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2023-12-11 13:57:51 +0000
committerLibravatar cel 🌸 <cel@blos.sm>2023-12-11 13:57:51 +0000
commit5dc4774ed3380762b4d7aadc86193af6073c456a (patch)
treecc8af98d94a0566ec19e4ca2f3cfd3800a7c5423 /templates/base.rs.html
parent159b239aa2964f6c07438638b967746354376b2e (diff)
downloadpinussy-5dc4774ed3380762b4d7aadc86193af6073c456a.tar.gz
pinussy-5dc4774ed3380762b4d7aadc86193af6073c456a.tar.bz2
pinussy-5dc4774ed3380762b4d7aadc86193af6073c456a.zip
implement log-out
Diffstat (limited to 'templates/base.rs.html')
-rw-r--r--templates/base.rs.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/base.rs.html b/templates/base.rs.html
index 64a8d4e..0bf70eb 100644
--- a/templates/base.rs.html
+++ b/templates/base.rs.html
@@ -1,7 +1,7 @@
@use super::statics::*;
@use crate::Notification;
-@(authenticated: bool, notification: Option<Notification>, body: Content)
+@(user: Option<String>, notification: Option<Notification>, body: Content)
<!DOCTYPE html>
<html>
@@ -15,9 +15,9 @@
<body>
<nav>
- @if authenticated {
+ @if let Some(username) = user {
<form action="/logout" method="post">
- <button type="submit">logout</button>
+ <button type="submit">logout @username</button>
</form>
} else {
<a href="/login">log in</a>
@@ -29,4 +29,4 @@
@:body()
</body>
-</html> \ No newline at end of file
+</html>