574bc91c2e459aa8afd9f4c77698b3417ce47883 / internal/web/templates/settings.html · 1685 bytes · raw
{{define "title"}}settings · simplegit{{end}}
{{define "content"}}
<h1>settings</h1>
<h2>password</h2>
{{if .PasswordError}}<p class="error">{{.PasswordError}}</p>{{end}}
{{if .PasswordOK}}<p class="ok">password changed.</p>{{end}}
<form method="post" action="/settings/password" class="panel">
<p><label for="current_password">current password</label><br>
<input id="current_password" name="current_password" type="password" required></p>
<p><label for="new_password">new password</label><br>
<input id="new_password" name="new_password" type="password" required></p>
<p><label for="confirm_password">confirm new password</label><br>
<input id="confirm_password" name="confirm_password" type="password" required></p>
<p><button type="submit">change password</button></p>
</form>
{{if .NewToken}}
<div class="card">
<p>token created — copy it now, it will not be shown again:</p>
<p><code class="token">{{.NewToken}}</code></p>
</div>
{{end}}
<h2>git tokens</h2>
{{if .Tokens}}
<table>
<tr><th>name</th><th>prefix</th><th>created</th><th></th></tr>
{{range .Tokens}}
<tr>
<td>{{.Name}}</td>
<td><code>{{.Hint}}…</code></td>
<td>{{.Created}}</td>
<td><form method="post" action="/settings/tokens/{{.ID}}/revoke"><button class="linklike" type="submit">revoke</button></form></td>
</tr>
{{end}}
</table>
{{else}}
<p class="muted">No tokens yet. Tokens work as the password in HTTPS git auth.</p>
{{end}}
<form method="post" action="/settings/tokens" class="panel">
<p><label for="name">label</label> <input id="name" name="name" placeholder="laptop"></p>
<p><button type="submit">create token</button></p>
</form>
{{end}}