Einfügen einer setup.css noch nicht run fähig, Design wird nicht angezeigt

This commit is contained in:
Nirodan
2025-07-07 12:24:57 +02:00
parent cf838ee9b1
commit 73d487255a
3 changed files with 87 additions and 13 deletions
+60
View File
@@ -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;
}
+25 -11
View File
@@ -1,17 +1,31 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="de">
<head> <head>
<title>Ersteinrichtung</title> <meta charset="UTF-8">
<title>Setup</title>
<link rel="stylesheet" href="{{ url_for('static', filename='setup.css') }}">
</head> </head>
<body> <body>
<h2>Datenbank-Verbindung einrichten</h2> <div class="setup-container">
<form method="post"> <h2>🛠️ Erste Einrichtung</h2>
<label>Host: <input name="host" required></label><br><br> <form class="setup-form" method="POST">
<label>Port: <input name="port" value="3306" required></label><br><br> <label for="host">Host:</label>
<label>Nutzername: <input name="user" required></label><br><br> <input type="text" id="host" name="host" placeholder="z.B. 192.168.1.50" required>
<label>Passwort: <input name="password" type="password" required></label><br><br>
<label>Datenbankname: <input name="database" required></label><br><br> <label for="port">Port:</label>
<button type="submit">Speichern & Verbinden</button> <input type="number" id="port" name="port" value="3306" required>
</form>
<label for="user">Benutzer:</label>
<input type="text" id="user" name="user" value="admin" required>
<label for="password">Passwort:</label>
<input type="password" id="password" name="password">
<label for="database">Datenbank:</label>
<input type="text" id="database" name="database" placeholder="toolsdb" required>
<button type="submit">Speichern & Verbinden</button>
</form>
</div>
</body> </body>
</html> </html>
+2 -2
View File
@@ -1,11 +1,11 @@
import time import time
import os 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 util.db_config import load_config, save_config, test_connection, is_configured
from auth.setup_admin import initialize_admin_user from auth.setup_admin import initialize_admin_user
from util.logger import logger 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 MAX_WAIT = 30
WAIT_INTERVAL = 10 WAIT_INTERVAL = 10