2018-09-21 21:53:29 -04:00
|
|
|
{{ define "title"}}{{ t "page.sessions.title" }}{{ end }}
|
2017-11-20 00:10:04 -05:00
|
|
|
|
|
|
|
{{ define "content"}}
|
|
|
|
<section class="page-header">
|
2018-09-21 21:53:29 -04:00
|
|
|
<h1>{{ t "page.sessions.title" }}</h1>
|
2019-11-17 20:26:47 -05:00
|
|
|
{{ template "settings_menu" dict "user" .user }}
|
2017-11-20 00:10:04 -05:00
|
|
|
</section>
|
|
|
|
|
2017-11-21 17:44:47 -05:00
|
|
|
<table>
|
2017-11-20 00:10:04 -05:00
|
|
|
<tr>
|
2018-09-21 21:53:29 -04:00
|
|
|
<th>{{ t "page.sessions.table.date" }}</th>
|
|
|
|
<th>{{ t "page.sessions.table.ip" }}</th>
|
|
|
|
<th>{{ t "page.sessions.table.user_agent" }}</th>
|
|
|
|
<th>{{ t "page.sessions.table.actions" }}</th>
|
2017-11-20 00:10:04 -05:00
|
|
|
</tr>
|
|
|
|
{{ range .sessions }}
|
|
|
|
<tr {{ if eq .Token $.currentSessionToken }}class="row-highlighted"{{ end }}>
|
2018-02-04 17:37:42 -05:00
|
|
|
<td class="column-20" title="{{ isodate .CreatedAt }}">{{ elapsed $.user.Timezone .CreatedAt }}</td>
|
2017-11-20 00:10:04 -05:00
|
|
|
<td class="column-20" title="{{ .IP }}">{{ .IP }}</td>
|
|
|
|
<td title="{{ .UserAgent }}">{{ .UserAgent }}</td>
|
|
|
|
<td class="column-20">
|
|
|
|
{{ if eq .Token $.currentSessionToken }}
|
2018-09-21 21:53:29 -04:00
|
|
|
{{ t "page.sessions.table.current_session" }}
|
2017-11-20 00:10:04 -05:00
|
|
|
{{ else }}
|
2017-11-21 17:44:47 -05:00
|
|
|
<a href="#"
|
|
|
|
data-confirm="true"
|
2018-09-21 21:53:29 -04:00
|
|
|
data-label-question="{{ t "confirm.question" }}"
|
|
|
|
data-label-yes="{{ t "confirm.yes" }}"
|
|
|
|
data-label-no="{{ t "confirm.no" }}"
|
|
|
|
data-label-loading="{{ t "confirm.loading" }}"
|
2022-01-18 00:00:32 -05:00
|
|
|
data-url="{{ route "removeSession" "sessionID" .ID }}">{{ icon "delete" }}{{ t "action.remove" }}</a>
|
2017-11-20 00:10:04 -05:00
|
|
|
{{ end }}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
</table>
|
|
|
|
|
|
|
|
{{ end }}
|