Fix: Add safe localStorage wrapper and QZ Tray toggle feature

- Created storage-utils.js with safeStorage wrapper to prevent tracking prevention errors
- Updated script.js to use safeStorage for theme persistence
- Added conditional QZ Tray connection based on 'Enable Scan to Boxes' toggle
- Fixed 404 error by removing non-existent /api/backup/path endpoint call
- Enhanced fg_scan.html to disable QZ Tray and socket connections when toggle is off
- Prevents console errors when browser tracking prevention blocks localStorage access
This commit is contained in:
Quality App System
2026-01-15 19:26:42 +02:00
parent 13d93d8a14
commit 95383e36f2
4 changed files with 75 additions and 23 deletions

View File

@@ -65,6 +65,8 @@
<div class="main-content">
{% block content %}{% endblock %}
</div>
<!-- Safe localStorage utility (must load first) -->
<script src="{{ url_for('static', filename='js/storage-utils.js') }}"></script>
{% if request.endpoint != 'main.fg_quality' %}
<script src="{{ url_for('static', filename='script.js') }}"></script>
{% endif %}