diff --git a/wled00/data/index.js b/wled00/data/index.js
index 44fe1b56..bdaf0d32 100644
--- a/wled00/data/index.js
+++ b/wled00/data/index.js
@@ -3708,10 +3708,8 @@ function checkVersionUpgrade(info) {
if (versionCheckDone) return;
versionCheckDone = true;
- // Skip version check in AP mode (no internet connectivity)
- if (info.wifi && info.wifi.ap) {
- return;
- }
+ // Suppress feature if in AP mode (no internet connection available)
+ if (info.wifi && info.wifi.ap) return;
// Fetch version-info.json using existing /edit endpoint
fetch('/edit?edit=/version-info.json', {
@@ -3739,8 +3737,14 @@ function checkVersionUpgrade(info) {
const storedVersion = versionInfo.version || '';
if (storedVersion && storedVersion !== currentVersion) {
- // Version has changed, show upgrade prompt
- showVersionUpgradePrompt(info, storedVersion, currentVersion);
+ // Version has changed
+ if (versionInfo.alwaysReport) {
+ // Automatically report if user opted in for always reporting
+ reportUpgradeEvent(info, storedVersion, true);
+ } else {
+ // Show upgrade prompt
+ showVersionUpgradePrompt(info, storedVersion, currentVersion);
+ }
} else if (!storedVersion) {
// Empty version in file, show install prompt
showVersionUpgradePrompt(info, null, currentVersion);
@@ -3748,76 +3752,92 @@ function checkVersionUpgrade(info) {
})
.catch(e => {
console.log('Failed to load version-info.json', e);
+ // On error, save current version for next time
+ if (info && info.ver) {
+ updateVersionInfo(info.ver, false, false);
+ }
});
}
function showVersionUpgradePrompt(info, oldVersion, newVersion) {
// Determine if this is an install or upgrade
const isInstall = !oldVersion;
-
+
// Create overlay and dialog
const overlay = d.createElement('div');
overlay.id = 'versionUpgradeOverlay';
overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);z-index:10000;display:flex;align-items:center;justify-content:center;';
-
+
const dialog = d.createElement('div');
dialog.style.cssText = 'background:var(--c-1);border-radius:10px;padding:25px;max-width:500px;margin:20px;box-shadow:0 4px 6px rgba(0,0,0,0.3);';
-
+
// Build contextual message based on install vs upgrade
- const title = isInstall
+ const title = isInstall
? '🎉 Thank you for installing WLED-MM!'
: '🎉 WLED-MM Upgrade Detected!';
const description = isInstall
- ? `You are now running WLED-MM ${newVersion}.`
- : `Your WLED-MM has been upgraded from ${oldVersion} to ${newVersion}.`;
-
- const question = 'Would you like to help the WLED development team by reporting your installation? This helps us understand what hardware and versions are being used.'
+ ? `You are now running WLED-MM ${newVersion}.`
+ : `Your WLED-MM has been upgraded from ${oldVersion} to ${newVersion}.`;
+
+ const question = 'Help make WLED better by sharing hardware details like chip type and LED count? This helps us understand how WLED is used and prioritize features — we never collect personal data or your activities.'
dialog.innerHTML = `