DISCLAIMER
@@ -1899,21 +1910,24 @@
const welcome = document.getElementById('welcomePage');
welcome.classList.add('fade-out');
- // After fade out, hide welcome and show disclaimer if needed
+ // After fade out, hide welcome and switch to mode
setTimeout(() => {
welcome.style.display = 'none';
- checkDisclaimer();
+ switchMode(mode);
}, 400);
}
- // Disclaimer handling
+ // Disclaimer handling - called on page load
function checkDisclaimer() {
const accepted = localStorage.getItem('disclaimerAccepted');
if (accepted === 'true') {
+ // Already accepted - ensure welcome page is shown, disclaimer hidden
+ document.documentElement.classList.remove('disclaimer-pending');
document.getElementById('disclaimerModal').style.display = 'none';
- // Switch to the selected mode
- switchMode(selectedStartMode);
+ document.getElementById('welcomePage').style.display = '';
} else {
+ // Not accepted - show disclaimer, hide welcome page
+ document.documentElement.classList.add('disclaimer-pending');
document.getElementById('disclaimerModal').style.display = 'flex';
}
}
@@ -1921,9 +1935,13 @@
function acceptDisclaimer() {
localStorage.setItem('disclaimerAccepted', 'true');
document.getElementById('disclaimerModal').classList.add('disclaimer-hidden');
- // Switch to the selected mode after accepting
+
+ // Remove pending class and show welcome page after disclaimer fades out
setTimeout(() => {
- switchMode(selectedStartMode);
+ document.documentElement.classList.remove('disclaimer-pending');
+ document.getElementById('disclaimerModal').style.display = 'none';
+ document.getElementById('welcomePage').style.display = '';
+ document.getElementById('welcomePage').classList.remove('fade-out');
}, 300);
}
@@ -1932,7 +1950,29 @@
document.getElementById('rejectionPage').classList.remove('disclaimer-hidden');
}
- // Don't auto-check disclaimer - wait for welcome page mode selection
+ // Check disclaimer on DOMContentLoaded
+ document.addEventListener('DOMContentLoaded', function() {
+ checkDisclaimer();
+
+ // Handle URL parameters for settings/help (from dashboard utility bar)
+ const urlParams = new URLSearchParams(window.location.search);
+ if (urlParams.get('settings') === 'open') {
+ // Wait for page to initialize, then open settings
+ setTimeout(function() {
+ if (typeof showSettings === 'function') showSettings();
+ }, 500);
+ // Clean up URL
+ history.replaceState({}, '', window.location.pathname);
+ }
+ if (urlParams.get('help') === 'open') {
+ // Wait for page to initialize, then open help
+ setTimeout(function() {
+ if (typeof showHelp === 'function') showHelp();
+ }, 500);
+ // Clean up URL
+ history.replaceState({}, '', window.location.pathname);
+ }
+ });
let eventSource = null;
let isRunning = false;
diff --git a/templates/partials/utility-bar.html b/templates/partials/utility-bar.html
new file mode 100644
index 0000000..a26da37
--- /dev/null
+++ b/templates/partials/utility-bar.html
@@ -0,0 +1,221 @@
+
+
+
+
+
+
diff --git a/templates/satellite_dashboard.html b/templates/satellite_dashboard.html
index 74d56a9..b16c5f2 100644
--- a/templates/satellite_dashboard.html
+++ b/templates/satellite_dashboard.html
@@ -22,6 +22,8 @@
+ {% include 'partials/utility-bar.html' %}
+