Toggle plaintext display for v1 tokens

This commit is contained in:
Jeremy Stretch
2025-10-03 09:16:50 -04:00
parent adce67a7cf
commit f6290dd7af
2 changed files with 12 additions and 59 deletions

View File

@@ -20,7 +20,14 @@
{% if object.version == 1 %}
<tr>
<th scope="row">{% trans "Token" %}</th>
<td>{{ object.partial }}</td>
<td>
{% if settings.ALLOW_TOKEN_RETRIEVAL %}
<span id="secret" class="font-monospace" data-secret="{{ object.plaintext }}">{{ object.plaintext }}</span>
<button type="button" class="btn btn-primary toggle-secret float-end" data-bs-toggle="button">{% trans "Show Secret" %}</button>
{% else %}
{{ object.partial }}
{% endif %}
</td>
</tr>
{% else %}
<tr>