Admin seite umgebaut mit PW
This commit is contained in:
@@ -138,8 +138,32 @@
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<div id="auth_overlay" class="auth_overlay">
|
||||
<div class="auth_box">
|
||||
<p class="eyebrow" style="margin:0;">Admin-Zugang</p>
|
||||
<h2 style="margin:0;">CUNO System</h2>
|
||||
<p style="margin:0; font-size:0.88rem; opacity:.6;">Passwort eingeben um fortzufahren</p>
|
||||
<input type="password" id="auth_input" class="auth_input" placeholder="••••••••" autocomplete="current-password">
|
||||
<p id="auth_error" class="auth_error"></p>
|
||||
<button class="button buttonX" onclick="submitPassword()">Entsperren</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var adminApiBase = window.location.protocol + '//' + window.location.hostname + ':8082';
|
||||
var AUTH_TOKEN = 'Y3Vubw==';
|
||||
|
||||
function submitPassword() {
|
||||
var input = document.getElementById('auth_input');
|
||||
var error = document.getElementById('auth_error');
|
||||
if (btoa(input.value) === AUTH_TOKEN) {
|
||||
document.getElementById('auth_overlay').remove();
|
||||
} else {
|
||||
error.textContent = 'Falsches Passwort';
|
||||
input.value = '';
|
||||
input.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function setAdminStatus(text) {
|
||||
var status = document.getElementById('admin_status');
|
||||
@@ -307,6 +331,12 @@
|
||||
}
|
||||
|
||||
window.addEventListener('load', function () {
|
||||
var input = document.getElementById('auth_input');
|
||||
input.focus();
|
||||
input.addEventListener('keydown', function(e) {
|
||||
if (e.key === 'Enter') submitPassword();
|
||||
});
|
||||
|
||||
fetchStatus();
|
||||
fetchDelay();
|
||||
window.setInterval(fetchStatus, 10000);
|
||||
|
||||
@@ -464,6 +464,54 @@ h2 {
|
||||
}
|
||||
}
|
||||
|
||||
.auth_overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: #05080F;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.auth_box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
padding: 2.5rem 2rem;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(255,255,255,0.08);
|
||||
background: rgba(255,255,255,0.04);
|
||||
width: 100%;
|
||||
max-width: 320px;
|
||||
color: #e8f0f3;
|
||||
}
|
||||
|
||||
.auth_input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 0.7rem 0.9rem;
|
||||
border-radius: 6px;
|
||||
border: 1px solid rgba(255,255,255,0.15);
|
||||
background: rgba(0,0,0,0.35);
|
||||
color: #e8f0f3;
|
||||
font-size: 1rem;
|
||||
letter-spacing: 0.1em;
|
||||
outline: none;
|
||||
transition: border-color 0.15s;
|
||||
}
|
||||
|
||||
.auth_input:focus {
|
||||
border-color: rgba(0,136,255,0.6);
|
||||
}
|
||||
|
||||
.auth_error {
|
||||
margin: 0;
|
||||
min-height: 1.1em;
|
||||
font-size: 0.82rem;
|
||||
color: #e05555;
|
||||
}
|
||||
|
||||
.admin-page {
|
||||
color: #1b2730;
|
||||
overflow-y: auto;
|
||||
|
||||
Reference in New Issue
Block a user