mirror of
https://github.com/boringproxy/boringproxy.git
synced 2025-02-25 18:55:29 -06:00
The UI was originally written using fancy HTML checkbox toggle hacks in order to make the UI very fast. It's cool but complicated and difficult to change. In order to make updates to the UI more quickly, I'm changing it to use traditional HTML with full page reloads for navigation. It's not as fast but much simpler.
28 lines
857 B
Cheetah
28 lines
857 B
Cheetah
{{ template "header.tmpl" . }}
|
|
<div class='list'>
|
|
{{range $token, $tokenData := .Tokens}}
|
|
|
|
<div class='list-item'>
|
|
<span class='token'>{{$token}} ({{$tokenData.Owner}})</span>
|
|
<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}}">
|
|
<button class='button'>Delete</button>
|
|
</a>
|
|
</div>
|
|
{{end}}
|
|
</div>
|
|
|
|
<div class='token-adder'>
|
|
<form action="/tokens" method="POST">
|
|
<label for="token-owner">Owner:</label>
|
|
<select id="token-owner" name="owner">
|
|
{{range $username, $user := .Users}}
|
|
<option value="{{$username}}">{{$username}}</option>
|
|
{{end}}
|
|
</select>
|
|
<button class='button' type="submit">Add Token</button>
|
|
</form>
|
|
</div>
|
|
{{ template "footer.tmpl" . }}
|