WIPL tokens
This commit is contained in:
parent
c09c729157
commit
161e08fe1f
25 changed files with 716 additions and 63 deletions
56
internal/dis/component/auth/panel/templates/tokens.html
Normal file
56
internal/dis/component/auth/panel/templates/tokens.html
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<div class="pure-u-1">
|
||||
<p>
|
||||
This page allows you to add, view and remove tokens from your distillery account.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="pure-u-1">
|
||||
<h2>My Tokens</h2>
|
||||
<p>
|
||||
This table shows tokens currently associated with your account.
|
||||
Tokens can be used to access the API programatically.
|
||||
</p>
|
||||
<div class="padding">
|
||||
<div class="overflow">
|
||||
|
||||
<table class="pure-table pure-table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Token
|
||||
</th>
|
||||
<th>
|
||||
Description
|
||||
</th>
|
||||
<th>
|
||||
Actions
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ $csrf := .CSRF }}
|
||||
{{ range .Tokens }}
|
||||
<tr>
|
||||
<td>
|
||||
<code class="copy">{{ .Token }}</code>
|
||||
</td>
|
||||
<td>
|
||||
{{ .Description }}
|
||||
</td>
|
||||
<td>
|
||||
<div class="pure-button-group" role="group">
|
||||
<form action="/user/tokens/delete" method="POST" class="pure-form-group">
|
||||
<input type="hidden" name="token" value="{{ .Token }}">
|
||||
<input type="submit" class="pure-button pure-button-danger" value="Delete">
|
||||
{{ $csrf }}
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{{ template "form.html" . }}
|
||||
{{ define "form/button" }}Add{{ end }}
|
||||
{{ define "form/inside" }}
|
||||
<div>
|
||||
<p>
|
||||
Use this form to add a new <em>Token</em> to your account.
|
||||
</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue