f0ckv2/views/settings.html
2022-01-02 06:52:52 +01:00

49 lines
1.3 KiB
HTML

@include(snippets/header)
<h1>Settings</h1>
@if(session.avatar)<img src="/t/{{ session.avatar }}.png" />@endif
<h2>Account</h2>
<table class="table">
<tbody>
<tr>
<td>UserID</td>
<td>{{ session.id }}</td>
</tr>
<tr>
<td>level</td>
<td>{{ session.level }}/100</td>
</tr>
<tr>
<td>username</td>
<td>{!! session.user !!}</td>
</tr>
<tr>
<td>avatar</td>
<td><input type="number" class="input" value="{{ session.avatar }}" /><input type="submit" value="save" /></td>
</tr>
</tbody>
</table>
<h2>Sessions</h2>
<table class="table">
<thead>
<tr>
<th>id</th>
<th>created_at</th>
<th>last_used</th>
<th>last_action</th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
@each(sessions as sess)
<tr@if(sess.id === session.sess_id) style="background-color: rgb(0, 89, 0)"@endif>
<td tooltip="{{ sess.browser }}" flow="right">{{ sess.id }}</td>
<td>{{ new Date(sess.created_at * 1e3).toLocaleString("de-DE") }}</td>
<td>{{ new Date(sess.last_used * 1e3).toLocaleString("de-DE") }}</td>
<td><a href="{{ sess.last_action }}" target="_blank">{{ sess.last_action }}</a></td>
<td>logout</td>
</tr>
@endeach
</tbody>
</table>
@include(snippets/footer)