From 82221d63ae7a2876b532eaf0a05ce127c99e4a2c Mon Sep 17 00:00:00 2001 From: Fabian Schieder Date: Sun, 1 Mar 2026 16:34:34 +0100 Subject: [PATCH] Update status messages to improve user feedback during loading states --- assets/js/main.js | 2 +- includes/lib/server_status.php | 2 +- includes/views/projects_section.php | 2 +- index.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/js/main.js b/assets/js/main.js index 34811be..6ff8bc9 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -154,6 +154,6 @@ document.querySelectorAll('.card').forEach(card => { apply(payload.byUrlNormalized); } catch (e) { - // keep "Unbekannt" + // keep "Lädt..." } })(); diff --git a/includes/lib/server_status.php b/includes/lib/server_status.php index 0a077ee..fbef493 100644 --- a/includes/lib/server_status.php +++ b/includes/lib/server_status.php @@ -194,7 +194,7 @@ function check_http_request(string $url, string $method, float $timeoutSeconds = } if ($code === null && $error === null) { - $error = 'Unbekannter Fehler'; + $error = 'Lädt...er Fehler'; } $res = ['ok' => $ok, 'code' => $code, 'ms' => $ms, 'error' => $error]; diff --git a/includes/views/projects_section.php b/includes/views/projects_section.php index c71f97a..f9e0a0f 100644 --- a/includes/views/projects_section.php +++ b/includes/views/projects_section.php @@ -96,7 +96,7 @@ foreach ($serverStatusByUrl as $__u => $__svc) { $badgeText = null; if (!$isNoStatusBadge && $category !== 'dienste') { - $badgeText = 'Unbekannt'; + $badgeText = 'Lädt...'; if ($state === 'up') $badgeText = 'Online'; elseif ($state === 'down') $badgeText = 'Offline'; } diff --git a/index.php b/index.php index 2bf4e91..1bf7545 100644 --- a/index.php +++ b/index.php @@ -15,7 +15,7 @@ require_once __DIR__ . '/includes/lib/server_status.php'; require_once __DIR__ . '/includes/lib/view_helpers.php'; // ── Serverstatus ───────────────────────────────────────────────────────── -// Performance: initial sofort rendern (=> Unbekannt). Badges werden clientseitig nachgeladen. +// Performance: initial sofort rendern (=> Lädt...). Badges werden clientseitig nachgeladen. $serverStatusByUrl = []; require __DIR__ . '/includes/views/layout_head.php';