This commit is contained in:
oberon 2026-02-16 18:45:14 +01:00
parent 123b20f76c
commit c3590ba440
4 changed files with 11 additions and 9 deletions

View File

@ -55,4 +55,4 @@ def create_app():
cleanup_thread.start() cleanup_thread.start()
logger.info("Täglicher Log-Cleanup-Thread gestartet (24h Intervall)") logger.info("Täglicher Log-Cleanup-Thread gestartet (24h Intervall)")
return app return app

View File

@ -1,5 +1,5 @@
# app/routes/main.py # 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.utils.helpers import load_configs, load_default_sounds
from app.state import current_config, reset_state from app.state import current_config, reset_state
@ -18,8 +18,8 @@ def index():
return render_template('index.html', configs=load_configs()) return render_template('index.html', configs=load_configs())
""" """
@main_bp.route('/configs/<path:filename>')
@main_bp.route('/configs/<path:filename>')
def serve_config_file(filename): def serve_config_file(filename):
return send_from_directory(app.config['CONFIG_DIR'], 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}") logger.info(f"Übergebe config an Template: {current_config}")
print("DEBUG: config hat channels?", 'channels' in current_config, len(current_config.get('channels', []))) print("DEBUG: config hat channels?", 'channels' in current_config, len(current_config.get('channels', [])))
return render_template( return render_template('control.html', config=current_config, global_sounds=global_sounds)
'control.html',
config=current_config,
global_sounds=global_sounds
)
@main_bp.route('/soundboard') @main_bp.route('/soundboard')

View File

@ -30,4 +30,10 @@ function startConnectionCheck() {
}, 6000); }, 6000);
} }
window.startConnectionCheck = startConnectionCheck; window.startConnectionCheck = startConnectionCheck;
function initConnectionCheck() {
startConnectionCheck(); // oder deine Prüf-Logik
}
window.initConnectionCheck = initConnectionCheck; // Export