neuer fix
This commit is contained in:
parent
02150e0e62
commit
54ec3d6e2d
@ -21,15 +21,6 @@ def create_app():
|
||||
template_folder='../templates', # ← Root/templates statt app/templates
|
||||
static_folder='../static') # ← Root/static
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
def timedelta_filter(value):
|
||||
if isinstance(value, timedelta):
|
||||
return value.total_seconds() # oder str(value)
|
||||
return value
|
||||
|
||||
app.jinja_env.filters['timedelta'] = timedelta_filter
|
||||
|
||||
# Config laden
|
||||
app.config.from_object('config.Config')
|
||||
|
||||
|
||||
@ -87,18 +87,22 @@
|
||||
crossorigin="anonymous"></script>
|
||||
|
||||
{% block scripts %}
|
||||
{% if config %}
|
||||
{% if config is defined and config is not none %}
|
||||
<script>
|
||||
// Config + globale Sounds nur setzen, wenn vorhanden
|
||||
window.mkConfig = {{ config | tojson | safe }};
|
||||
// Config + globale Sounds nur setzen, wenn config wirklich existiert
|
||||
window.mkConfig = {{ config | tojson | safe }};
|
||||
window.mkGlobalSounds = {{ global_sounds | tojson | safe }};
|
||||
|
||||
console.log("base.html → mkConfig gesetzt:", window.mkConfig);
|
||||
console.log("base.html → mkGlobalSounds:", window.mkGlobalSounds);
|
||||
</script>
|
||||
{% else %}
|
||||
<script>
|
||||
console.log("base.html → Keine config auf dieser Seite – mkConfig nicht gesetzt");
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<!-- Alle Module laden (immer) -->
|
||||
<!-- Alle JS-Module laden (immer) -->
|
||||
<script src="{{ url_for('static', filename='js/config.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/ui-status.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/ui-connect.js') }}"></script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user