From 667bf676c81a601ab396751f9104e8d63732833d Mon Sep 17 00:00:00 2001 From: Maaxxs <61059039+MaaxxsDev@users.noreply.github.com> Date: Mon, 21 Sep 2026 10:59:47 +0200 Subject: [PATCH] Dashboard: Lumipunkte as their own section The points move out of the stat cards into their own panel below the welcome panel. It shows the balance, your rank out of all members, your open or approved-but-not-delivered Lumishop orders, and buttons to the ranking and the shop. The stat card panel is hidden when there is nothing to show in it. Co-Authored-By: Claude Opus 5 --- assets/css/style.css | 21 +++++++++++++---- dashboard.php | 55 +++++++++++++++++++++++++++++++++----------- 2 files changed, 58 insertions(+), 18 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index a4eebfa..a6956af 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -2873,11 +2873,22 @@ input.shop-approve-quantity { width: 72px; padding: 0.3rem 0.45rem; font-size: 0 .shop-order-stock { color: var(--text-muted); } .shop-order-stock.is-short { color: var(--danger); } -/* Dashboard: eigene Lumipunkte */ -.stat-card-points { border-color: rgba(201, 162, 39, 0.45); background: linear-gradient(135deg, rgba(201, 162, 39, 0.14), var(--bg-panel) 70%); } -.stat-card-points img { flex-shrink: 0; filter: drop-shadow(0 3px 8px rgba(201, 162, 39, 0.35)); } -.stat-card-points h3 { color: var(--gold); font-size: 1.35rem; } -.stat-card-links { margin-top: 0.2rem !important; font-size: 0.8rem; } +/* Dashboard: eigener Bereich fuer die Lumipunkte */ +.dashboard-points { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 1rem 1.5rem; + border-color: rgba(201, 162, 39, 0.45); + background: linear-gradient(135deg, rgba(201, 162, 39, 0.14), rgba(35, 35, 35, 0.92) 60%); +} +.dashboard-points-coin { flex-shrink: 0; filter: drop-shadow(0 4px 10px rgba(201, 162, 39, 0.4)); } +.dashboard-points-main { min-width: 160px; } +.dashboard-points-main h2 { margin: 0; font-size: 1rem; color: var(--text-muted); font-weight: 600; } +.dashboard-points-value { font-size: 2.2rem; font-weight: 700; line-height: 1.15; color: var(--gold); font-variant-numeric: tabular-nums; } +.dashboard-points-main p { margin: 0.1rem 0 0; font-size: 0.85rem; } +.dashboard-points-shop { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; } +.dashboard-points-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-left: auto; } @media (max-width: 700px) { .shop-order-actions { flex-wrap: wrap; justify-content: flex-end; width: 100%; } } diff --git a/dashboard.php b/dashboard.php index 3452e74..247584b 100644 --- a/dashboard.php +++ b/dashboard.php @@ -59,6 +59,19 @@ if ($canViewContributions) { ); $rankStmt->execute([$myPoints]); $myRank = (int) $rankStmt->fetchColumn(); + $memberTotal = (int) db()->query("SELECT COUNT(*) FROM users WHERE status = 'active'")->fetchColumn(); +} + +// Eigene Lumishop-Antraege: offen bzw. bewilligt und noch nicht uebergeben. +$myShopOpen = 0; +$myShopReady = 0; +if ($canViewShop) { + $shopStmt = db()->prepare( + "SELECT COALESCE(SUM(status = 'pending'), 0), COALESCE(SUM(status = 'approved'), 0) + FROM shop_orders WHERE user_id = ?" + ); + $shopStmt->execute([(int) $user['id']]); + [$myShopOpen, $myShopReady] = array_map('intval', $shopStmt->fetch(PDO::FETCH_NUM)); } $memberCount = $canViewUsers ? (int) db()->query("SELECT COUNT(*) FROM users WHERE status = 'active'")->fetchColumn() : null; @@ -120,21 +133,36 @@ include __DIR__ . '/includes/header.php'; + +
+ +
+

Lumipunkte

+
+

Platz von in der Rangliste

+
+ 0 || $myShopReady > 0)): ?> +
+ 0): ?> + auf Bewilligung + + 0): ?> + bewilligt – Übergabe im Spiel ausstehend + +
+ + +
+ + +
- -
- -
-

-

Lumipunkte · Platz

- -
-
-
@@ -164,6 +192,7 @@ include __DIR__ . '/includes/header.php';
+