diff --git a/backend/static/setup.css b/backend/static/setup.css new file mode 100644 index 0000000..b092776 --- /dev/null +++ b/backend/static/setup.css @@ -0,0 +1,60 @@ +body { + background-color: #121212; + color: #f5f5f5; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + display: flex; + align-items: center; + justify-content: center; + height: 100vh; + margin: 0; +} + +.setup-container { + background-color: #1e1e1e; + padding: 2rem; + border-radius: 8px; + width: 100%; + max-width: 400px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); +} + +.setup-container h2 { + text-align: center; + margin-bottom: 1.5rem; + color: #fff; +} + +.setup-form label { + display: block; + margin-bottom: 0.4rem; + color: #ccc; +} + +.setup-form input { + width: 100%; + padding: 0.6rem; + margin-bottom: 1rem; + border: none; + border-radius: 4px; + background-color: #2c2c2c; + color: #fff; +} + +.setup-form input:focus { + outline: 2px solid #007bff; +} + +.setup-form button { + width: 100%; + padding: 0.7rem; + background-color: #007bff; + color: white; + border: none; + border-radius: 4px; + cursor: pointer; + font-weight: bold; +} + +.setup-form button:hover { + background-color: #0056b3; +} diff --git a/backend/templates/setup.html b/backend/templates/setup.html index 614ab60..98e923f 100644 --- a/backend/templates/setup.html +++ b/backend/templates/setup.html @@ -1,17 +1,31 @@ - + - Ersteinrichtung + + Setup + -

Datenbank-Verbindung einrichten

-
-

-

-

-

-

- -
+
+

🛠️ Erste Einrichtung

+
+ + + + + + + + + + + + + + + + +
+
diff --git a/backend/util/setup_routes.py b/backend/util/setup_routes.py index 51c0c9c..64be420 100644 --- a/backend/util/setup_routes.py +++ b/backend/util/setup_routes.py @@ -1,11 +1,11 @@ import time import os -from flask import Blueprint, request, render_template, redirect, jsonify +from flask import Blueprint, request, render_template, redirect, jsonify, send_from_directory from util.db_config import load_config, save_config, test_connection, is_configured from auth.setup_admin import initialize_admin_user from util.logger import logger -setup_blueprint = Blueprint("setup", __name__, template_folder="../backend/templates") +setup_blueprint = Blueprint("setup", __name__, template_folder="../backend/templates", static_folder="../backend/static") MAX_WAIT = 30 WAIT_INTERVAL = 10