ggdgsdbsdbbb / templates / api_tokens.html
46 lines · 41 sloc · 1.07 KB · f5e6951a04fdbbd0436fbfe2e6b421fb3696f872
Raw
1<!DOCTYPE html>
2<html>
3 <head>
4 @include 'layout/head.html'
5 </head>
6 <body>
7 @include 'layout/header.html'
8
9 <div class="content">
10 <h1>%api_tokens</h1>
11
12 @if new_token != ''
13 <div class="api-token-show">
14 <p>%api_token_show_once</p>
15 <pre><code>@new_token</code></pre>
16 </div>
17 @end
18
19 <form method='post' action='/@username/settings/api-tokens' class="form">
20 <div class="field">
21 <input type='text' name='name' placeholder='%api_token_name' required>
22 </div>
23 <div class="field">
24 <button type='submit' class='settings-form__submit'>%api_token_create</button>
25 </div>
26 </form>
27
28 @if tokens.len == 0
29 <p>%api_token_none</p>
30 @else
31 <ul class="api-token-list">
32 @for t in tokens
33 <li class="api-token-row">
34 <strong>@t.name</strong>
35 <form method='post' action='/@username/settings/api-tokens/@t.id/delete' class="inline-form">
36 <button type='submit' class='link-button'>%api_token_revoke</button>
37 </form>
38 </li>
39 @end
40 </ul>
41 @end
42 </div>
43
44 @include 'layout/footer.html'
45 </body>
46</html>
47