Improve /tokens and /clients UI

Show client name and make owner more clear.
This commit is contained in:
Anders Pitman 2022-02-17 13:47:03 -07:00
parent 53aa3735a9
commit 2907814539
2 changed files with 6 additions and 2 deletions

View File

@ -4,7 +4,7 @@
{{range $clientName, $client := $user.Clients}}
<div class='list-item'>
<span class='client'>{{$clientName}} ({{$username}})</span>
<span class='client'>{{$clientName}} (Owner: {{$username}})</span>
<a href="/confirm-delete-client?owner={{$username}}&client-name={{$clientName}}">
<button class='button'>Delete</button>
</a>

View File

@ -3,7 +3,11 @@
{{range $token, $tokenData := .Tokens}}
<div class='list-item'>
<span class='token'>{{$token}} ({{$tokenData.Owner}})</span>
{{ if eq $tokenData.Client "" }}
<span class='token'>{{$token}} (Owner: {{$tokenData.Owner}}) (Client: Any)</span>
{{ else }}
<span class='token'>{{$token}} (Owner: {{$tokenData.Owner}}) (Client: {{$tokenData.Client}})</span>
{{ end }}
<a href='/login?access_token={{$token}}'>Login link</a>
<img class='qr-code' src='{{index $.QrCodes $token}}' width=100 height=100>
<a href="/confirm-delete-token?token={{$token}}">