Add routes to serve manifest.json and service worker; update manifest link in base.html
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user