Einfügen einer setup.css noch nicht run fähig, Design wird nicht angezeigt
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -1,17 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<title>Ersteinrichtung</title>
|
||||
<meta charset="UTF-8">
|
||||
<title>Setup</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='setup.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<h2>Datenbank-Verbindung einrichten</h2>
|
||||
<form method="post">
|
||||
<label>Host: <input name="host" required></label><br><br>
|
||||
<label>Port: <input name="port" value="3306" required></label><br><br>
|
||||
<label>Nutzername: <input name="user" required></label><br><br>
|
||||
<label>Passwort: <input name="password" type="password" required></label><br><br>
|
||||
<label>Datenbankname: <input name="database" required></label><br><br>
|
||||
<div class="setup-container">
|
||||
<h2>🛠️ Erste Einrichtung</h2>
|
||||
<form class="setup-form" method="POST">
|
||||
<label for="host">Host:</label>
|
||||
<input type="text" id="host" name="host" placeholder="z.B. 192.168.1.50" required>
|
||||
|
||||
<label for="port">Port:</label>
|
||||
<input type="number" id="port" name="port" value="3306" required>
|
||||
|
||||
<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>
|
||||
</html>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user