From 38e6d28248a6752d687da6f68ce91b12caa93390 Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Sat, 21 Feb 2026 16:04:34 -0500 Subject: [PATCH] fix: Wire automation toggles, browse uMod, and error feedback across admin views - ServerView: automation toggles (crash recovery, auto-update, force wipe eligible) now call updateConfig() on click with toast success/error; all catch blocks get toast feedback instead of silent swallow - PluginsView: Browse uMod tab wired to /plugins/search backend endpoint with debounced search, results table, and Install button that calls installPlugin(); shows install state and marks already-installed plugins - WipesView: dry-run results now displayed in a collapsible panel (would_delete / would_preserve lists + estimated duration); schedule enable/disable toggle wired to PUT /wipes/schedules/:id with loading state and toast feedback - AnalyticsView: catch blocks now show toast errors instead of console.log; Player Retention placeholder replaced with intentional placeholder cards - TeamView, ChatLogView, PlayersView, NotificationsView, MapsView: all empty catch blocks and '// API not wired yet' comments replaced with toast.error() calls; Notifications save now shows success toast Co-Authored-By: Claude Opus 4.6 --- frontend/src/views/admin/AnalyticsView.vue | 36 ++++-- frontend/src/views/admin/ChatLogView.vue | 6 +- frontend/src/views/admin/MapsView.vue | 2 +- .../src/views/admin/NotificationsView.vue | 7 +- frontend/src/views/admin/PlayersView.vue | 10 +- frontend/src/views/admin/PluginsView.vue | 116 ++++++++++++++++-- frontend/src/views/admin/ServerView.vue | 45 +++++-- frontend/src/views/admin/TeamView.vue | 10 +- frontend/src/views/admin/WipesView.vue | 106 ++++++++++++++-- 9 files changed, 290 insertions(+), 48 deletions(-) diff --git a/frontend/src/views/admin/AnalyticsView.vue b/frontend/src/views/admin/AnalyticsView.vue index e7481b8..5033608 100644 --- a/frontend/src/views/admin/AnalyticsView.vue +++ b/frontend/src/views/admin/AnalyticsView.vue @@ -5,11 +5,13 @@ import * as echarts from 'echarts' import type { ECharts } from 'echarts' import { useApi } from '@/composables/useApi' import { useAuthStore } from '@/stores/auth' +import { useToastStore } from '@/stores/toast' import type { AnalyticsSummary, TimeseriesData } from '@/types' import { safeFixed } from '@/utils/formatters' const api = useApi() const authStore = useAuthStore() +const toast = useToastStore() const timeRange = ref<'24h' | '7d' | '30d'>('7d') const loading = ref(true) @@ -45,8 +47,8 @@ const loadAnalytics = async () => { await nextTick() renderCharts() - } catch (error) { - console.error('Failed to load analytics:', error) + } catch { + toast.error('Failed to load analytics data') } finally { loading.value = false } @@ -206,8 +208,8 @@ const downloadCSV = async () => { a.download = `server_stats_${timeRange.value}.csv` a.click() window.URL.revokeObjectURL(url) - } catch (error) { - console.error('Failed to download CSV:', error) + } catch { + toast.error('Failed to download analytics export') } } @@ -304,12 +306,30 @@ onMounted(() => { - +
-

Player Retention

-
-

Available in Phase 2.2 — New vs returning players, session duration

+
+

Player Retention

+ Phase 2
+
+
+

New Players

+

\u2014

+

First-time visitors

+
+
+

Returning Players

+

\u2014

+

Seen more than once

+
+
+

Avg Session Duration

+

\u2014

+

Per visit

+
+
+

Player retention analytics will be available in Phase 2

diff --git a/frontend/src/views/admin/ChatLogView.vue b/frontend/src/views/admin/ChatLogView.vue index d746d3e..d2914fd 100644 --- a/frontend/src/views/admin/ChatLogView.vue +++ b/frontend/src/views/admin/ChatLogView.vue @@ -1,10 +1,12 @@