Add login function

TODO ws request auth

Signed-off-by: YoungSoo Shin <shinys000114@gmail.com>
This commit is contained in:
2025-09-26 11:35:10 +09:00
parent 6606be456b
commit 6be0512146
11 changed files with 604 additions and 55 deletions

View File

@@ -8,7 +8,33 @@
</head>
<body>
<main class="container">
<div id="login-container" class="d-flex flex-column justify-content-center align-items-center vh-100" style="display: none;">
<div class="card p-4 shadow-lg" style="width: 100%; max-width: 400px;">
<div class="card-body">
<h2 class="card-title text-center mb-4">Login to ODROID Power Mate</h2>
<div id="login-alert" class="alert alert-danger d-none" role="alert"></div>
<form id="login-form">
<div class="mb-3">
<label for="username" class="form-label">Username</label>
<input type="text" class="form-control" id="username" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<input type="password" class="form-control" id="password" required>
</div>
<div class="d-grid">
<button type="submit" class="btn btn-primary">Login</button>
</div>
</form>
<div class="form-check form-switch d-flex justify-content-center mt-4">
<input class="form-check-input" type="checkbox" role="switch" id="theme-toggle-login">
<label class="form-check-label ms-2" for="theme-toggle-login"><i id="theme-icon-login" class="bi bi-moon-stars-fill"></i></label>
</div>
</div>
</div>
</div>
<main class="container" style="display: none;">
<header class="d-flex justify-content-between align-items-center mb-3 main-header">
<div class="order-md-1" style="flex: 1;">
<div class="d-flex align-items-center">
@@ -37,6 +63,9 @@
data-bs-target="#settingsModal">
<i class="bi bi-gear"></i>
</button>
<button class="btn btn-outline-secondary ms-3" id="logout-button">
<i class="bi bi-box-arrow-right"></i>
</button>
</div>
</header>