refactor(dashboard): drop redundant PLATFORM_ORDER and misleading optional chain

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-17 23:31:29 -04:00
parent 62713cfec0
commit 7680f03560
+2 -8
View File
@@ -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