|
@@ -110,10 +110,10 @@
|
|
|
<div class="box">
|
|
<div class="box">
|
|
|
<h2>EKSRelay — panel operacyjny</h2>
|
|
<h2>EKSRelay — panel operacyjny</h2>
|
|
|
<p>Podgląd tylko do odczytu. Podaj <code>ADMIN_TOKEN</code>, żeby wczytać dane.</p>
|
|
<p>Podgląd tylko do odczytu. Podaj <code>ADMIN_TOKEN</code>, żeby wczytać dane.</p>
|
|
|
- <form id="gate-form" autocomplete="off">
|
|
|
|
|
|
|
+ <div id="gate-form" role="group" aria-label="Logowanie do panelu" autocomplete="off">
|
|
|
<input type="password" id="token-input" placeholder="ADMIN_TOKEN" autocomplete="off" spellcheck="false" required>
|
|
<input type="password" id="token-input" placeholder="ADMIN_TOKEN" autocomplete="off" spellcheck="false" required>
|
|
|
- <button type="submit" class="primary">Zaloguj</button>
|
|
|
|
|
- </form>
|
|
|
|
|
|
|
+ <button type="button" id="login-button" class="primary">Zaloguj</button>
|
|
|
|
|
+ </div>
|
|
|
<div class="err" id="gate-err"></div>
|
|
<div class="err" id="gate-err"></div>
|
|
|
<div class="hint">
|
|
<div class="hint">
|
|
|
Token trzymany jest wyłącznie w <code>sessionStorage</code> tej karty i wysyłany
|
|
Token trzymany jest wyłącznie w <code>sessionStorage</code> tej karty i wysyłany
|
|
@@ -178,7 +178,7 @@
|
|
|
</main>
|
|
</main>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
-<script>
|
|
|
|
|
|
|
+<script data-cfasync="false">
|
|
|
(function () {
|
|
(function () {
|
|
|
'use strict';
|
|
'use strict';
|
|
|
|
|
|
|
@@ -508,8 +508,7 @@
|
|
|
|
|
|
|
|
// ------------------------------------------------------------------- wiring
|
|
// ------------------------------------------------------------------- wiring
|
|
|
|
|
|
|
|
- $('gate-form').addEventListener('submit', function (e) {
|
|
|
|
|
- e.preventDefault();
|
|
|
|
|
|
|
+ function submitLogin() {
|
|
|
var value = $('token-input').value.trim();
|
|
var value = $('token-input').value.trim();
|
|
|
if (!value) return;
|
|
if (!value) return;
|
|
|
sessionStorage.setItem(KEY, value);
|
|
sessionStorage.setItem(KEY, value);
|
|
@@ -522,6 +521,11 @@
|
|
|
$('gate-err').style.display = 'block';
|
|
$('gate-err').style.display = 'block';
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $('login-button').addEventListener('click', submitLogin);
|
|
|
|
|
+ $('token-input').addEventListener('keydown', function (e) {
|
|
|
|
|
+ if (e.key === 'Enter') { e.preventDefault(); submitLogin(); }
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
$('tabs').addEventListener('click', function (e) {
|
|
$('tabs').addEventListener('click', function (e) {
|