diff --git a/app/__init__.py b/app/__init__.py index cdd861a..a211020 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -55,4 +55,4 @@ def create_app(): cleanup_thread.start() logger.info("Täglicher Log-Cleanup-Thread gestartet (24h Intervall)") - return app \ No newline at end of file + return app diff --git a/app/routes/main.py b/app/routes/main.py index 8f713bd..0483373 100644 --- a/app/routes/main.py +++ b/app/routes/main.py @@ -1,5 +1,5 @@ # app/routes/main.py -from flask import Blueprint, render_template, redirect, url_for, request, jsonify +from flask import Blueprint, render_template, redirect, url_for, request, jsonify, send_from_directory from app.utils.helpers import load_configs, load_default_sounds from app.state import current_config, reset_state @@ -18,8 +18,8 @@ def index(): return render_template('index.html', configs=load_configs()) """ -@main_bp.route('/configs/') +@main_bp.route('/configs/') def serve_config_file(filename): return send_from_directory(app.config['CONFIG_DIR'], filename) @@ -59,11 +59,7 @@ def control_page(): logger.info(f"Übergebe config an Template: {current_config}") print("DEBUG: config hat channels?", 'channels' in current_config, len(current_config.get('channels', []))) - return render_template( - 'control.html', - config=current_config, - global_sounds=global_sounds - ) + return render_template('control.html', config=current_config, global_sounds=global_sounds) @main_bp.route('/soundboard') diff --git a/app_old.py b/app_old.bkp similarity index 100% rename from app_old.py rename to app_old.bkp diff --git a/static/js/connection-check.js b/static/js/connection-check.js index 2f3cef7..01d7796 100644 --- a/static/js/connection-check.js +++ b/static/js/connection-check.js @@ -30,4 +30,10 @@ function startConnectionCheck() { }, 6000); } -window.startConnectionCheck = startConnectionCheck; \ No newline at end of file +window.startConnectionCheck = startConnectionCheck; + +function initConnectionCheck() { + startConnectionCheck(); // oder deine Prüf-Logik +} + +window.initConnectionCheck = initConnectionCheck; // Export \ No newline at end of file