From 7680f03560ba9855c559a1489cc9f0541f659b27 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Fri, 17 Apr 2026 23:31:29 -0400 Subject: [PATCH] refactor(dashboard): drop redundant PLATFORM_ORDER and misleading optional chain Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/views/Dashboard.vue | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue index 2a6abac..30c2774 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Dashboard.vue @@ -328,21 +328,15 @@ let refreshInterval = null const stats = computed(() => downloadsStore.stats) const recentActivity = computed(() => downloadsStore.recentActivity) -// Fixed display order for platform health bars -const PLATFORM_ORDER = [ - 'patreon', 'subscribestar', 'hentaifoundry', - 'discord', 'pixiv', 'deviantart', -] - // Read threshold from settings, default 5 if unset const failureThreshold = computed(() => - settingsStore.settings?.['dashboard.failure_threshold'] ?? 5 + settingsStore.settings['dashboard.failure_threshold'] ?? 5 ) // Per-platform health for platforms with ≥1 enabled source const platformHealth = computed(() => { const enabled = sourcesStore.sources.filter(s => s.enabled) - return PLATFORM_ORDER + return supportedPlatforms .map(platform => { const sources = enabled.filter(s => s.platform === platform) if (sources.length === 0) return null