From 7f7c6e6fdeda2cde6e19b8e7a1999b3154b92ff3 Mon Sep 17 00:00:00 2001 From: Till JS Date: Mon, 23 Mar 2026 22:09:24 +0100 Subject: [PATCH] fix(manacore): replace hardcoded localhost URLs with APP_URLS in all widgets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All 6 remaining widgets now use APP_URLS from shared-branding for dev/prod-aware URL resolution instead of hardcoded localhost ports: - CalendarEventsWidget → APP_URLS.calendar - ChatRecentWidget → APP_URLS.chat - ClockTimersWidget → APP_URLS.clock - ManadeckProgressWidget → APP_URLS.manadeck - PictureRecentWidget → APP_URLS.picture - StorageUsageWidget → APP_URLS.storage Co-Authored-By: Claude Opus 4.6 (1M context) --- .../dashboard/widgets/CalendarEventsWidget.svelte | 6 +++++- .../dashboard/widgets/ChatRecentWidget.svelte | 8 ++++++-- .../dashboard/widgets/ClockTimersWidget.svelte | 8 ++++++-- .../dashboard/widgets/ManadeckProgressWidget.svelte | 10 +++++++--- .../dashboard/widgets/PictureRecentWidget.svelte | 10 +++++++--- .../dashboard/widgets/StorageUsageWidget.svelte | 6 +++++- 6 files changed, 36 insertions(+), 12 deletions(-) diff --git a/apps/manacore/apps/web/src/lib/components/dashboard/widgets/CalendarEventsWidget.svelte b/apps/manacore/apps/web/src/lib/components/dashboard/widgets/CalendarEventsWidget.svelte index eabca8a58..778fb7237 100644 --- a/apps/manacore/apps/web/src/lib/components/dashboard/widgets/CalendarEventsWidget.svelte +++ b/apps/manacore/apps/web/src/lib/components/dashboard/widgets/CalendarEventsWidget.svelte @@ -8,6 +8,10 @@ import { calendarService, type CalendarEvent } from '$lib/api/services'; import WidgetSkeleton from '../WidgetSkeleton.svelte'; import WidgetError from '../WidgetError.svelte'; + import { APP_URLS } from '@manacore/shared-branding'; + + const isDev = typeof window !== 'undefined' && window.location.hostname === 'localhost'; + const calendarUrl = isDev ? APP_URLS.calendar.dev : APP_URLS.calendar.prod; let state = $state<'loading' | 'success' | 'error'>('loading'); let data = $state([]); @@ -119,7 +123,7 @@ {#if remainingCount > 0} ('loading'); let data = $state([]); @@ -80,7 +84,7 @@ {$_('dashboard.widgets.chat.empty')}

{#each data as conversation} ('loading'); let timers = $state([]); @@ -90,7 +94,7 @@ {$_('dashboard.widgets.clock.empty')}

('loading'); let progress = $state(null); @@ -80,7 +84,7 @@ {$_('dashboard.widgets.manadeck.empty')}

{#each decksWithDue as deck} 0}