version 1. Работают все функции на веб-панели, исправлено поведение при создании пользователей, теперь всё создаётся правильно

This commit is contained in:
2026-06-19 22:46:43 +03:00
parent 5469a967a2
commit 39c1fcf438
5 changed files with 215 additions and 19 deletions
+6 -7
View File
@@ -150,7 +150,6 @@
</div>
</div>
{% endblock %}
<!-- SECURITY / FAIL2BAN -->
<div class="page" id="page-security">
<h1>Безопасность</h1>
@@ -182,7 +181,7 @@
</div>
<div class="form-group" style="max-width:220px">
<label>Время блокировки</label>
<select id="f2b-bantime" onchange="toggleCustomBantime()">
<select id="f2b-bantime" onchange="toggleCustomBantime(this.value)">
<option value="300">5 минут</option>
<option value="900">15 минут</option>
<option value="1800">30 минут</option>
@@ -210,7 +209,7 @@
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
@@ -697,10 +696,10 @@ function fmtSeconds(s) {
return s + ' сек.';
}
document.getElementById('f2b-bantime').addEventListener('change', function() {
function toggleCustomBantime(val) {
document.getElementById('custom-bantime-group').style.display =
this.value === '0' ? '' : 'none';
});
val === '0' ? '' : 'none';
}
function applyPreset(maxRetry, banTime) {
document.getElementById('f2b-maxretry').value = maxRetry;
@@ -744,7 +743,7 @@ function codeBlock(json){
const txt=JSON.stringify(json,null,2);
const id='cb'+Math.random().toString(36).slice(2);
return `<div class="code-block" id="${id}">${escH(txt)}</div>
<button class="btn btn-secondary btn-sm" style="margin-top:8px" onclick="navigator.clipboard.writeText(document.getElementById('${id}').textContent).then(()=>showToast('Скопировано ✓'))">Копировать</button>`;
<button class="btn btn-secondary btn-sm" style="margin-top:8px" onclick="copyText(document.getElementById('${id}').textContent)">Копировать</button>`;
}
</script>
{% endblock %}