Refactor user permissions handling and enhance menu functionality with collapsible headers
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user