Compare commits
1 Commits
v1.0.2
...
403db1c141
| Author | SHA1 | Date | |
|---|---|---|---|
| 403db1c141 |
@@ -53,10 +53,7 @@
|
||||
<span id="power-display" class="text-primary">--.-- W</span>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<h1 class="text-primary text-center order-md-2 mx-auto">ODROID Power Mate</h1>
|
||||
<div class="d-flex align-items-center justify-content-end order-md-3 header-controls" style="flex: 1;">
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="theme-toggle">
|
||||
@@ -162,9 +159,12 @@
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer class="bg-body-tertiary text-center p-3">
|
||||
<footer class="bg-body-tertiary text-center p-3 position-relative">
|
||||
<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>
|
||||
<div class="position-absolute end-0 top-50 translate-middle-y pe-3">
|
||||
<small class="text-muted" id="version-info"></small>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Settings Modal -->
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
import * as dom from './dom.js';
|
||||
import * as api from './api.js';
|
||||
import {getAuthHeaders, handleResponse} from './api.js'; // Import auth functions
|
||||
import * as ui from './ui.js';
|
||||
import {clearTerminal, downloadTerminalOutput, fitTerminal} from './terminal.js';
|
||||
import {debounce, isMobile} from './utils.js';
|
||||
import {getAuthHeaders, handleResponse} from './api.js'; // Import auth functions
|
||||
|
||||
// A flag to track if charts have been initialized
|
||||
let chartsInitialized = false;
|
||||
@@ -60,6 +60,7 @@ export function setupEventListeners() {
|
||||
console.log("Event listeners already attached. Skipping.");
|
||||
return;
|
||||
}
|
||||
console.log("Attaching event listeners...");
|
||||
|
||||
// --- Terminal Controls ---
|
||||
dom.clearButton.addEventListener('click', clearTerminal);
|
||||
@@ -188,4 +189,5 @@ export function setupEventListeners() {
|
||||
window.addEventListener('resize', debounce(ui.handleResize, 150));
|
||||
|
||||
listenersAttached = true;
|
||||
console.log("Event listeners attached successfully.");
|
||||
}
|
||||
|
||||
@@ -55,12 +55,16 @@ const confirmPasswordInput = document.getElementById('confirm-password');
|
||||
|
||||
function onWsOpen() {
|
||||
updateWebsocketStatus(true);
|
||||
console.log('Connected to WebSocket Server');
|
||||
if (term) {
|
||||
term.write('\x1b[32mConnected to WebSocket Server\x1b[0m\r\n');
|
||||
}
|
||||
}
|
||||
|
||||
function onWsClose() {
|
||||
updateWebsocketStatus(false);
|
||||
console.warn('Connection closed. Reconnecting...');
|
||||
if (term) {
|
||||
term.write('\r\n\x1b[31mConnection closed. Reconnecting...\x1b[0m\r\n');
|
||||
}
|
||||
setTimeout(connect, 2000);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user