mirror of
https://github.com/Noratrieb/oh-oh.git
synced 2026-01-15 17:45:02 +01:00
stuff
This commit is contained in:
parent
c789f7ad15
commit
730cf9d176
5 changed files with 150 additions and 18 deletions
|
|
@ -22,6 +22,9 @@
|
|||
<a href="/users">List all users</a>
|
||||
</div>
|
||||
{% if let Some(username) = username %}
|
||||
<div>
|
||||
<a href="/sessions">List all active sessions your account</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/add-totp">Add a new 2FA device to your account</a>
|
||||
</div>
|
||||
|
|
|
|||
27
idp/templates/sessions.html
Normal file
27
idp/templates/sessions.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Sessions - IDP</title>
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>See all sessions your account</h1>
|
||||
<a href="/">home</a>
|
||||
|
||||
<ul>
|
||||
{% for session in sessions %}
|
||||
<li>
|
||||
{{session.user_agent}} (added
|
||||
{{jiff::Timestamp::from_millisecond(*session.created).unwrap()
|
||||
.strftime("%A, %d %B %Y at %I:%M %Q")}})
|
||||
<form method="post" action="/sessions/delete" class="fake-form">
|
||||
<input type="hidden" name="session_public_id" value="{{session.session_public_id}}" />
|
||||
<button type="submit">delete</button>
|
||||
</form>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue