From 265bfac74a3a2611128072936557847a32bdd448 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Thu, 10 Apr 2025 22:48:13 +0200 Subject: [PATCH] Handle package data fetch errors and improve UI feedback. Added error handling for package data fetches with visual cues to indicate failures (e.g., red pulsating circle). Updated UI text to prompt retries on failures and refactored timers for better synchronization. Improved code readability by removing redundant URL formatting. --- frontend/src/components/CurrentlyBuilding.vue | 106 +++++++++++++----- 1 file changed, 78 insertions(+), 28 deletions(-) diff --git a/frontend/src/components/CurrentlyBuilding.vue b/frontend/src/components/CurrentlyBuilding.vue index 0aed13d..9398773 100644 --- a/frontend/src/components/CurrentlyBuilding.vue +++ b/frontend/src/components/CurrentlyBuilding.vue @@ -11,11 +11,21 @@
- {{ packageCount.building > 0 ? 'Building' : 'Idle' }} + {{ + updateFailed + ? 'Could not fetch data.' + : packageCount.building > 0 + ? 'Building' + : 'Idle' + }} @@ -33,19 +43,23 @@ class="text-grey v-col-12 v-col-lg-2 mb-3" cols="auto" style="font-size: 13px"> - Last updated - {{ - lastUpdatedSeconds > 59 - ? rtf.format(-Math.floor(lastUpdatedSeconds / 60), 'minutes') - : rtf.format(-lastUpdatedSeconds, 'seconds') - }} + + + - + Building