| 1 |
{% if let Some(token) = new_token %} |
| 2 |
<div class="git-token-new"> |
| 3 |
<p class="git-token-new-label">Copy this token now — it will not be shown again:</p> |
| 4 |
<code class="git-token-value">{{ token }}</code> |
| 5 |
<p class="hint">Use it as the password (or in the URL) for |
| 6 |
<code>git clone https://{{ token }}@makenot.work/owner/repo.git</code></p> |
| 7 |
</div> |
| 8 |
{% endif %} |
| 9 |
{% if tokens.is_empty() %} |
| 10 |
<p class="ssh-keys-empty">No access tokens.</p> |
| 11 |
{% else %} |
| 12 |
<table class="ssh-keys-table"> |
| 13 |
<thead> |
| 14 |
<tr> |
| 15 |
<th>Name</th> |
| 16 |
<th>Scope</th> |
| 17 |
<th>Expires</th> |
| 18 |
<th>Last used</th> |
| 19 |
<th class="ssh-keys-th-actions"></th> |
| 20 |
</tr> |
| 21 |
</thead> |
| 22 |
<tbody> |
| 23 |
{% for t in tokens %} |
| 24 |
<tr> |
| 25 |
<td>{{ t.name }}</td> |
| 26 |
<td>{{ t.scope }}</td> |
| 27 |
<td>{{ t.expires }}</td> |
| 28 |
<td class="ssh-keys-added">{{ t.last_used }}</td> |
| 29 |
<td class="ssh-keys-actions"> |
| 30 |
<button class="btn-danger small" |
| 31 |
hx-delete="/api/users/me/git-tokens/{{ t.id }}" |
| 32 |
hx-target="#git-tokens-list" |
| 33 |
hx-swap="innerHTML" |
| 34 |
hx-confirm="Revoke this token?">Revoke</button> |
| 35 |
</td> |
| 36 |
</tr> |
| 37 |
{% endfor %} |
| 38 |
</tbody> |
| 39 |
</table> |
| 40 |
{% endif %} |
| 41 |
|