Add token input, cookie storage, logout

This commit is contained in:
2026-07-23 11:38:10 +04:00
parent 51f4508c1d
commit 6a84257533
2 changed files with 57 additions and 13 deletions
+11 -2
View File
@@ -9,7 +9,16 @@
</head>
<body>
<div class="card" style="max-width: 780px; margin: 32px auto;">
<div class="card-header">Организация</div>
<div class="card-header" style="justify-content: space-between;">
<span>Организация</span>
<form method="post" style="display:flex;align-items:center;gap:6px;">
<input type="password" name="token" placeholder="env: {{ env_token_masked }}" value="{{ '' if not has_user_token else '••••••••' }}" style="height:28px;width:200px;font-size:12px;border:1px solid var(--brand-gray);border-radius:4px;padding:0 6px;" />
<button type="submit" name="action" value="save" class="btn" style="height:28px;font-size:12px;padding:0 8px;">OK</button>
{% if has_user_token %}
<button type="submit" name="action" value="clear" class="btn btn-danger" style="height:28px;font-size:12px;padding:0 8px;">Выйти</button>
{% endif %}
</form>
</div>
<div class="card-body">
{% if organization %}
<table>
@@ -31,7 +40,7 @@
</tbody>
</table>
{% else %}
<p style="color: var(--muted);">{% if error %}Ошибка: {{ error }}{% else %}Организация не найдена.{% endif %}</p>
<p style="color: var(--muted);">{% if error %}Ошибка: {{ error }}{% else %}Введите токен{% endif %}</p>
{% endif %}
</div>
</div>