chore: remove PWA debug overlay and pwa_display cookie
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions

PWA detection confirmed working. Cleaned up temporary debug code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Maciej Pienczyn 2026-03-18 11:18:54 +01:00
parent 59eb1799ee
commit 6b021b876e

View File

@ -2371,7 +2371,7 @@
}
}
// PWA detection — send display mode info to server via cookie
// PWA detection — set cookie for backend analytics
(function() {
var modes = ['standalone', 'minimal-ui', 'fullscreen', 'browser'];
var detected = 'unknown';
@ -2382,17 +2382,9 @@
}
}
if (window.navigator.standalone === true) detected = 'ios-standalone';
document.cookie = 'pwa_display=' + detected + '; path=/; max-age=86400; SameSite=Lax';
if (detected !== 'browser' && detected !== 'unknown') {
document.cookie = 'pwa_mode=1; path=/; max-age=86400; SameSite=Lax';
}
{% if current_user.is_authenticated and current_user.has_role(SystemRole.ADMIN) %}
// Debug: show detected mode for admin (temporary)
var d = document.createElement('div');
d.style.cssText = 'position:fixed;bottom:0;left:0;background:rgba(0,0,0,0.8);color:#0f0;font-size:11px;padding:4px 8px;z-index:99999;font-family:monospace;';
d.textContent = 'display-mode: ' + detected + ' | standalone: ' + window.navigator.standalone + ' | cookies: ' + document.cookie.split(';').filter(function(c){return c.trim().startsWith('pwa')}).join(', ');
document.body.appendChild(d);
{% endif %}
})();
// PWA Smart Banner logic