Refactor user permissions handling and enhance menu functionality with collapsible headers

This commit is contained in:
“VeLiTi”
2026-01-21 12:48:46 +01:00
parent 18469fe958
commit aeda4e4cb9
14 changed files with 349 additions and 80 deletions

View File

@@ -179,7 +179,7 @@ async function connectDeviceForSoftware() {
progressBar("1", "", "");
// Check if DEBUG mode is enabled - use mock device data
if (typeof DEBUG !== 'undefined' && DEBUG) {
if (typeof DEBUG !== 'undefined' && DEBUG && typeof DEBUG_ID !== 'undefined' && DEBUG_ID) {
// TEST MODE: Use mock device data
deviceSerialNumber = "22110095";
deviceVersion = "03e615af";
@@ -549,7 +549,7 @@ async function fetchSoftwareOptions() {
progressBar("100", "Software options loaded", "#04AA6D");
// Show user info modal immediately (skip in debug mode)
if (typeof DEBUG === 'undefined' || !DEBUG) {
if (typeof DEBUG === 'undefined' || !DEBUG || typeof DEBUG_ID === 'undefined' || !DEBUG_ID) {
showUserInfoModal();
} else {
// In debug mode, reveal software options immediately
@@ -1619,7 +1619,7 @@ async function downloadAndInstallSoftware(option, customerData = null) {
window.upgraded_version = option.version || "";
// DEBUG MODE: Don't auto-trigger upload, let user manually test
if (typeof DEBUG !== 'undefined' && DEBUG) {
if (typeof DEBUG !== 'undefined' && DEBUG && typeof DEBUG_ID !== 'undefined' && DEBUG_ID) {
// Show upload section and button for manual testing
document.getElementById("uploadSection").style.display = "block";
const uploadBtn = document.getElementById("uploadSoftware");