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

@ -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/<path:filename>')
@main_bp.route('/configs/<path:filename>')
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')

View File

@ -31,3 +31,9 @@ function startConnectionCheck() {
}
window.startConnectionCheck = startConnectionCheck;
function initConnectionCheck() {
startConnectionCheck(); // oder deine Prüf-Logik
}
window.initConnectionCheck = initConnectionCheck; // Export