Skip to content

Commit 4a81dce

Browse files
committed
monitor: show login status
1 parent 3f447a4 commit 4a81dce

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

plugins/protocol_lws_dht_dnssec_monitor/assets/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<title>DNSSEC Monitor</title>
77
<!-- Strict CSP prevents inline styles, and using external font CDNs without explicit whitelist, so we use system fonts -->
88
<link rel="stylesheet" href="monitor.css">
9+
<script src="lws-login.js"></script>
910
</head>
1011
<body>
1112
<div class="app-container">
@@ -15,6 +16,7 @@ <h1>DNSSEC Monitor</h1>
1516
<p>Manage authoritative DNSSEC zones and ACME TLS subdomains</p>
1617
</div>
1718
<div class="header-status">
19+
<div id="user-info" class="user-info"></div>
1820
<span id="ws-status" class="status-badge connecting">Connecting...</span>
1921
</div>
2022
</header>

plugins/protocol_lws_dht_dnssec_monitor/assets/monitor.css

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,3 +398,33 @@ input:focus, textarea:focus {
398398
.ext-mt { margin-top: 1rem; }
399399
.ext-grid-select { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; margin-top: 1rem; }
400400
.ext-select { width: 100%; padding: 0.75rem; background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.08); color: #fff; border-radius: 6px; }
401+
402+
.header-status {
403+
display: flex;
404+
align-items: center;
405+
gap: 1.5rem;
406+
}
407+
408+
.user-info {
409+
display: flex;
410+
align-items: center;
411+
gap: 0.5rem;
412+
font-size: 0.875rem;
413+
color: var(--text-secondary);
414+
}
415+
416+
.user-info b {
417+
color: var(--text-primary);
418+
font-weight: 500;
419+
}
420+
421+
.user-info a {
422+
color: var(--danger-color);
423+
font-weight: 500;
424+
margin-left: 0.5rem;
425+
}
426+
427+
.user-info a:hover {
428+
color: var(--danger-hover);
429+
text-decoration: underline;
430+
}

plugins/protocol_lws_dht_dnssec_monitor/assets/monitor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,9 @@ function openEditor(id) {
455455
}
456456

457457
document.addEventListener('DOMContentLoaded', () => {
458+
if (typeof window.renderLwsLoginStatus === 'function') {
459+
window.renderLwsLoginStatus('user-info');
460+
}
458461
connect();
459462

460463
document.getElementById('btn-add-domain').onclick = () => {

0 commit comments

Comments
 (0)