~gitpocket/gitpocket

1
7093e5fd3c1fa8199453c6347ebfe8bcda76e3ea
mainfeed-discovery
gitpocket/templates/settings.html -rw-r--r--1.5 KiB ViewLogBlameView rawPermalink 7093e5fd3c feat(basin): minimal git host with ssh and smart https 1 months ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{{define "content"}}
<h1>settings</h1>
<h2>ssh keys</h2>
{{if .Data.Keys}}<table class="keys">{{range .Data.Keys}}<tr><td>{{.Title}}</td><td><code>{{.Fingerprint}}</code></td><td class="when">{{ago .Created}}</td><td><form method="post" action="/settings/keys/{{.ID}}/delete"><button class="danger">remove</button></form></td></tr>{{end}}</table>{{end}}
<form method="post" action="/settings/keys" class="stack">
<label>title <input name="title" placeholder="laptop"></label>
<label>public key <textarea name="key" rows="3" required placeholder="ssh-ed25519 AAAA..."></textarea></label>
<button>add key</button>
</form>
<h2>access tokens</h2>
<p class="muted">use a token as the password when pushing over https.</p>
{{with .Data.NewToken}}<p class="notice">new token, shown once: <code>{{.}}</code></p>{{end}}
{{if .Data.Tokens}}<table class="keys">{{range .Data.Tokens}}<tr><td>{{.Title}}</td><td class="when">{{ago .Created}}</td><td><form method="post" action="/settings/tokens/{{.ID}}/delete"><button class="danger">revoke</button></form></td></tr>{{end}}</table>{{end}}
<form method="post" action="/settings/tokens" class="stack">
<label>title <input name="title" placeholder="ci"></label>
<button>create token</button>
</form>
<h2>password</h2>
<form method="post" action="/settings/password" class="stack">
<label>current <input name="current" type="password" required autocomplete="current-password"></label>
<label>new <input name="password" type="password" required minlength="8" autocomplete="new-password"></label>
<button>change password</button>
</form>
{{end}}