diff --git a/.env b/.env old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/api/setup/setup.php b/api/setup/setup.php old mode 100644 new mode 100755 index aa1a4c1..a9cba35 --- a/api/setup/setup.php +++ b/api/setup/setup.php @@ -54,9 +54,9 @@ mkdir($config["PATH"] . "/tmp/user_sessions", 0700, true); file_put_contents($config["PATH"] . "/tmp/user_sessions/" . $admin_user . ".json", json_encode($json)); -setcookie("session_id", $session); -setcookie("device_id", $device_id); -setcookie("username", $admin_user); +setcookie("session_id", $session["session_id"], time() + 3600, "/"); +setcookie("device_id", $device_id, time() + 3600, "/"); +setcookie("username", $admin_user, time() + 3600, "/"); header("Location: /"); exit; diff --git a/front/css/setup.png b/front/css/background.png old mode 100644 new mode 100755 similarity index 100% rename from front/css/setup.png rename to front/css/background.png diff --git a/front/css/login.css b/front/css/login.css new file mode 100644 index 0000000..83866a2 --- /dev/null +++ b/front/css/login.css @@ -0,0 +1,86 @@ +body { + font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; + display: grid; + place-items: center; + height: 100vh; + overflow: hidden; + background-image: url("/css/background.png"); +} + +.page-content { + padding: 10px; + width: 350px; + height: 625px; + text-align: center; + box-shadow: 0 2px 100px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1); + border-radius: 30pt; + background: rgba(255, 255, 255, 0.3); + backdrop-filter: rgba(255, 255, 255, 0.3); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); + display: grid; + place-items: center; + transition: all 0.3s ease-in-out; +} + +.page { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + gap: 10px; + transition: all 0.3s ease-in-out; +} + +.header { + position: relative; + top: 10px; + bottom: 10px; +} + +h1 { + font-size: 30pt; +} + +h2 { + font-size: 20pt; +} + +input { + border: 1px solid #e0e0e0; + width: 200px; + height: 30px; + border-radius: 10pt; + padding: 5px; + background: rgba(255, 255, 255, 0.3); + backdrop-filter: blur(5px); + -webkit-backdrop-filter: blur(5px); +} + +input:focus { + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10pxr); + outline: none; +} + +button { + margin-bottom: 10px; + width: 100px; + height: 30px; + background-color: #000000; + color: #ffffff; + display: grid; + place-items: center; + text-align: center; + border: none; + border-radius: 20pt; + transition: all 0.3s ease-in-out; +} + +button:hover { + transform: scale(1.1); +} + +button:active { + transform: scale(0.8); +} \ No newline at end of file diff --git a/front/css/setup.css b/front/css/setup.css old mode 100644 new mode 100755 index 3733901..a4fb003 --- a/front/css/setup.css +++ b/front/css/setup.css @@ -4,7 +4,7 @@ body { place-items: center; height: 100vh; overflow: hidden; - background-image: url("/css/setup.png"); + background-image: url("/css/background.png"); } .page-content { @@ -15,7 +15,7 @@ body { box-shadow: 0 2px 100px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1); border-radius: 30pt; background: rgba(255, 255, 255, 0.3); - backdrop-filtbackground: rgba(255, 255, 255, 0.3); + backdrop-filter: rgba(255, 255, 255, 0.3); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: grid; diff --git a/front/index.php b/front/index.php old mode 100644 new mode 100755 index 8417fa8..bb5d209 --- a/front/index.php +++ b/front/index.php @@ -20,8 +20,9 @@ if (!$mcServ->checkConf()) { } if (!$mcServ->checkLogin()) { - header("Location: /admin"); - exit; + /*header("Location: /login.php"); + exit;*/ }else{ - echo "true"; -} \ No newline at end of file + echo "angemeldet"; +} +?> \ No newline at end of file diff --git a/front/login.php b/front/login.php old mode 100644 new mode 100755 index e69de29..49a5ca2 --- a/front/login.php +++ b/front/login.php @@ -0,0 +1,29 @@ + + +
+ + +