a mini social media app for small communities
at main 997 B view raw
1@include 'partial/header.html' 2 3@if !app.config.dev_mode && !ctx.is_logged_in() 4<p>error: not logged in</p> 5@else if !app.config.dev_mode && !user.admin 6<p>error: you are not an admin!</p> 7@else 8 9<h1>admin dashboard</h1> 10 11<p>logged in as:</p> 12<details> 13 <summary>show user details (<strong>SENSITIVE DATA IS CENSORED BUT FOR THE SAKE OF GOOD PRACTICE, DO NOT SHOW THIS DATA TO ANYONE</strong>)</summary> 14 <pre>@user.to_str_without_sensitive_data()</pre> 15</details> 16 17<div> 18 <h2>site settings:</h2> 19 <form action="/api/site/set_motd" method="post"> 20 <label for="motd">message of the day (motd): </label> 21 <input type="text" name="motd" id="motd" value="@app.get_motd()"> 22 <input type="submit" value="save"> 23 </form> 24</div> 25 26<div> 27 <h2>user list:</h2> 28 <ul> 29 @for u in app.get_users() 30 <li> 31 <a href="/user/@u.username">@u.get_name()</a> 32 (@@@u.username) [@u.id] 33 {muted=@u.muted, admin=@u.admin, created_at=@u.created_at} 34 </li> 35 @end 36 </ul> 37</div> 38 39@end 40 41@include 'partial/footer.html'