feat: add web login, logout and runtime logging improvements

This commit is contained in:
Mario Fetka
2026-05-21 21:56:28 +02:00
parent 49ff80ecbc
commit 1394b3ba6c
6 changed files with 478 additions and 57 deletions

View File

@@ -19,7 +19,7 @@ body{padding:18px}
a{color:inherit} code,tt{font-family:"DejaVu Sans Mono",monospace}
.shell{max-width:1250px;margin:0 auto}
.hero{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(135deg,#a80f18,#c44731 60%,#d79a54);color:#fff;box-shadow:0 12px 30px rgba(64,36,12,.08)}
.hero img{height:42px;width:auto;display:block;background:#fff;border-radius:10px;padding:5px;box-shadow:0 8px 20px rgba(0,0,0,.12)}
.hero-actions{display:flex;align-items:center;gap:12px}.hero img{height:42px;width:auto;display:block;background:#fff;border-radius:10px;padding:5px;box-shadow:0 8px 20px rgba(0,0,0,.12)}.logout-button{display:inline-block;text-decoration:none;border:1px solid rgba(255,255,255,.6);border-radius:10px;padding:8px 13px;background:rgba(255,255,255,.14);color:#fff;font-weight:bold;box-shadow:0 8px 18px rgba(0,0,0,.10)}.logout-button:hover{background:rgba(255,255,255,.22)}
.hero h1{margin:0;font-size:28px;line-height:1.1}
.hero p{margin:6px 0 0;font-size:15px;opacity:.95}
.workspace{margin-top:18px;display:grid;grid-template-columns:180px minmax(0,1fr);gap:18px;align-items:start}
@@ -83,18 +83,18 @@ a{color:inherit} code,tt{font-family:"DejaVu Sans Mono",monospace}
<h1>Main menu</h1>
<p>Choose a section from the icon list. The explanation opens here on the left, and the editor opens on the right.</p>
</div>
<img src="/static/smart_icon.jpg" alt="SMArT logo">
<div class="hero-actions"><a class="logout-button" href="/logout" target="_top">Logout</a><img src="/static/smart_icon.jpg" alt="SMArT logo"></div>
</div>
<div class="workspace">
<aside class="nav-shell">
<div class="nav-title">Sections</div>
<div class="nav-list">
<button class="nav-item active" type="button" data-target="setup-first" data-href="/settings/smart" aria-pressed="true" title="Setup first">
<button class="nav-item active" type="button" data-target="setup-first" data-href="/settings/smart" aria-pressed="false" title="Setup first">
<span class="nav-icon icon-start"><img src="/static/icon-start.svg" alt="" aria-hidden="true"></span>
<span class="nav-label">Setup first</span>
</button>
<button class="nav-item" type="button" data-target="mars-nwe-service" data-href="/static/start.html" aria-pressed="false" title="MARS_NWE service">
<button class="nav-item active" type="button" data-target="mars-nwe-service" data-href="/static/start.html" aria-pressed="true" title="MARS_NWE service">
<span class="nav-icon icon-service"><img src="/static/icon-service.svg" alt="" aria-hidden="true"></span>
<span class="nav-label">MARS_NWE service</span>
</button>
@@ -626,5 +626,26 @@ default directory.
}
})();
</script>
<script>
(function smartDefaultSection(){
function openDefault(){
if (window.location.hash) return;
var btn = document.querySelector('[data-target="mars-nwe-service"]');
if (btn && typeof btn.click === 'function') {
btn.click();
return;
}
var frame = parent && parent.frames ? parent.frames['OPTS'] : null;
if (frame) frame.location = '/static/start.html';
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', openDefault);
} else {
openDefault();
}
})();
</script>
</body>
</html>