2 Commits

Author SHA1 Message Date
baa43f2b99 Mute terminal messages for WebSocket connection events
Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
2025-10-02 17:29:37 +09:00
274b70dbbe Update header layout and footer version info placement
Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
2025-10-02 17:27:58 +09:00
2 changed files with 13 additions and 11 deletions

View File

@@ -53,7 +53,10 @@
<span id="power-display" class="text-primary">--.-- W</span> <span id="power-display" class="text-primary">--.-- W</span>
</div> </div>
</div> </div>
<h1 class="text-primary text-center order-md-2 mx-auto">ODROID Power Mate</h1> <div class="text-center order-md-2 mx-auto">
<h1 class="text-primary mb-0">ODROID Power Mate</h1>
<small class="text-muted" id="version-info"></small>
</div>
<div class="d-flex align-items-center justify-content-end order-md-3 header-controls" style="flex: 1;"> <div class="d-flex align-items-center justify-content-end order-md-3 header-controls" style="flex: 1;">
<div class="form-check form-switch"> <div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="theme-toggle"> <input class="form-check-input" type="checkbox" role="switch" id="theme-toggle">
@@ -159,12 +162,9 @@
</div> </div>
</main> </main>
<footer class="bg-body-tertiary text-center p-3 position-relative"> <footer class="bg-body-tertiary text-center p-3">
<a href="https://www.hardkernel.com/" target="_blank" class="link-secondary text-decoration-none">Hardkernel</a> | <a href="https://www.hardkernel.com/" target="_blank" class="link-secondary text-decoration-none">Hardkernel</a> |
<a href="https://wiki.odroid.com/start" target="_blank" class="link-secondary text-decoration-none">Wiki</a> <a href="https://wiki.odroid.com/start" target="_blank" class="link-secondary text-decoration-none">Wiki</a>
<div class="position-absolute end-0 top-50 translate-middle-y pe-3">
<small class="text-muted" id="version-info"></small>
</div>
</footer> </footer>
<!-- Settings Modal --> <!-- Settings Modal -->

View File

@@ -55,16 +55,18 @@ const confirmPasswordInput = document.getElementById('confirm-password');
function onWsOpen() { function onWsOpen() {
updateWebsocketStatus(true); updateWebsocketStatus(true);
if (term) { // if (term) {
term.write('\x1b[32mConnected to WebSocket Server\x1b[0m\r\n'); // term.write('\x1b[32mConnected to WebSocket Server\x1b[0m\r\n');
} // }
console.log('Connected to WebSocket Server');
} }
function onWsClose() { function onWsClose() {
updateWebsocketStatus(false); updateWebsocketStatus(false);
if (term) { // if (term) {
term.write('\r\n\x1b[31mConnection closed. Reconnecting...\x1b[0m\r\n'); // term.write('\r\n\x1b[31mConnection closed. Reconnecting...\x1b[0m\r\n');
} // }
console.log('Connection closed. Reconnecting...');
setTimeout(connect, 2000); setTimeout(connect, 2000);
} }