Add routes to serve manifest.json and service worker; update manifest link in base.html

This commit is contained in:
2026-04-19 20:06:11 +02:00
parent b47fcdf804
commit 91fc5cae21
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -10926,3 +10926,11 @@ def test_push_notification():
except Exception as e:
app.logger.error(f'Error sending test push: {e}')
return jsonify({'success': False, 'error': str(e)}), 500
@app.route('/manifest.json')
def serve_manifest():
return send_from_directory('static', 'manifest.json', mimetype='application/manifest+json')
@app.route('/sw.js')
def serve_sw():
return send_from_directory('static', 'sw.js', mimetype='application/javascript')
+1 -1
View File
@@ -14,7 +14,7 @@
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="manifest" href="{{ url_for('static', filename='manifest.json') }}">
<link rel="manifest" href="/manifest.json">
<meta name="csrf-token" content="{{ csrf_token }}">
<title>{% block title %}Inventarsystem{% endblock %}</title>
{% block head %}