Under construction page and dynamic profile loading
This commit is contained in:
24
frontend/assets/css/under-construction.css
Normal file
24
frontend/assets/css/under-construction.css
Normal file
@@ -0,0 +1,24 @@
|
||||
.construction-icon-wrapper {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
background: rgba(59, 130, 246, 0.1); /* Nutzt die var(--accent) Transparenz */
|
||||
border: 1px solid rgba(59, 130, 246, 0.2);
|
||||
border-radius: 50%;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.gear-icon {
|
||||
animation: gearRotate 8s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes gearRotate {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,8 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
if (document.getElementById('items-table-body')) loadItems();
|
||||
if (document.getElementById('locations-table-body')) loadLocations();
|
||||
if (document.getElementById('projects-table-body')) loadProjects();
|
||||
|
||||
loadProfile();
|
||||
});
|
||||
|
||||
function closeModal(id) {
|
||||
@@ -464,4 +466,19 @@ async function openDashboardModal(url, title, dataKey) {
|
||||
} catch (e) {
|
||||
tbody.innerHTML = '<tr><td colspan="2" style="color:var(--error); text-align:center; padding:1.5rem;">Failed to load data.</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
// ---- PROFILE ----
|
||||
async function loadProfile() {
|
||||
const avatar = document.getElementById("avatar");
|
||||
const username = document.getElementById('username');
|
||||
|
||||
try {
|
||||
const data = await apiRequest('/api/profile');
|
||||
|
||||
avatar.innerText = data.username[0].toLocaleUpperCase();
|
||||
username.innerText = data.username;
|
||||
} catch (e) {
|
||||
username.innerHTML = '<tr><td colspan="2" style="color:var(--error); text-align:center; padding:1.5rem;">Failed to load data.</td></tr>';
|
||||
}
|
||||
}
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
<div class="profile-dropdown">
|
||||
<button class="profile-trigger" id="profile-btn">
|
||||
<div class="avatar">M</div>
|
||||
<span class="username">Admin</span>
|
||||
<div id="avatar" class="avatar">M</div>
|
||||
<span id="username" class="username">Loading...</span>
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>
|
||||
</button>
|
||||
<div class="dropdown-menu" id="dropdown-menu">
|
||||
|
||||
39
frontend/htmx/under-construction.html
Normal file
39
frontend/htmx/under-construction.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Feature Under Development | MiauInv</title>
|
||||
<link rel="stylesheet" href="/assets/css/theme.css">
|
||||
<link rel="stylesheet" href="/assets/css/under-construction.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="card">
|
||||
<div class="construction-icon-wrapper">
|
||||
<svg class="gear-icon" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="var(--accent)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<circle cx="12" cy="12" r="3"></circle>
|
||||
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<h1>Coming Soon</h1>
|
||||
<div class="subtitle">Feature Under Development</div>
|
||||
|
||||
<div class="message success" style="display: block; margin-bottom: 2rem;">
|
||||
<strong>Development in progress!</strong><br>
|
||||
Our team is actively working on this feature to bring you the best experience possible.
|
||||
</div>
|
||||
|
||||
<a href="/dashboard" class="btn btn-secondary">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-right: 8px;"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>
|
||||
Back to Dashboard
|
||||
</a>
|
||||
|
||||
<div class="footer-text">
|
||||
Need urgent assistance? <a href="mailto:maurice@miaurizius.de">Contact Developer</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user