From 4d131703e7367eb64d2b779865f3548de9975798 Mon Sep 17 00:00:00 2001 From: pa Date: Fri, 13 Mar 2026 15:14:34 +0900 Subject: [PATCH] improve dashboard wideget --- .../Dashboard/components/DashboardPanel.vue | 38 +++++++++- src/views/Dashboard/widgets/FeedWidget.vue | 71 +++++++++++------ src/views/Dashboard/widgets/GameLogWidget.vue | 76 ++++++++++++------- .../Dashboard/widgets/InstanceWidget.vue | 37 ++++++--- 4 files changed, 157 insertions(+), 65 deletions(-) diff --git a/src/views/Dashboard/components/DashboardPanel.vue b/src/views/Dashboard/components/DashboardPanel.vue index 5e83197b..01788ad5 100644 --- a/src/views/Dashboard/components/DashboardPanel.vue +++ b/src/views/Dashboard/components/DashboardPanel.vue @@ -32,6 +32,24 @@ {{ filterType }} +
+ + +
@@ -89,7 +107,15 @@ import { panelComponentMap } from './panelRegistry'; const FEED_TYPES = ['GPS', 'Online', 'Offline', 'Status', 'Avatar', 'Bio']; - const GAMELOG_TYPES = ['Location', 'OnPlayerJoined', 'OnPlayerLeft', 'VideoPlay', 'PortalSpawn', 'Event', 'External']; + const GAMELOG_TYPES = [ + 'Location', + 'OnPlayerJoined', + 'OnPlayerLeft', + 'VideoPlay', + 'PortalSpawn', + 'Event', + 'External' + ]; const INSTANCE_COLUMNS = ['icon', 'displayName', 'rank', 'timer', 'platform', 'language', 'status']; const props = defineProps({ @@ -189,19 +215,19 @@ emitConfigUpdate({ ...panelConfig.value, filters }); } - const availableColumns = computed(() => INSTANCE_COLUMNS); + const availableColumns = computed(() => INSTANCE_COLUMNS); function isColumnActive(col) { const columns = panelConfig.value.columns; if (!columns || !Array.isArray(columns) || columns.length === 0) { - return ['icon', 'displayName', 'rank', 'timer'].includes(col); + return ['icon', 'displayName', 'timer'].includes(col); } return columns.includes(col); } function toggleColumn(col) { if (col === 'displayName') return; // Always visible - const currentColumns = panelConfig.value.columns || ['icon', 'displayName', 'rank', 'timer']; + const currentColumns = panelConfig.value.columns || ['icon', 'displayName', 'timer']; let columns; if (currentColumns.includes(col)) { columns = currentColumns.filter((c) => c !== col); @@ -211,6 +237,10 @@ emitConfigUpdate({ ...panelConfig.value, columns }); } + function toggleBooleanConfig(key) { + emitConfigUpdate({ ...panelConfig.value, [key]: !panelConfig.value[key] }); + } + function emitConfigUpdate(newConfig) { emit('select', { key: panelKey.value, config: newConfig }); } diff --git a/src/views/Dashboard/widgets/FeedWidget.vue b/src/views/Dashboard/widgets/FeedWidget.vue index 32df03ed..e50c4b79 100644 --- a/src/views/Dashboard/widgets/FeedWidget.vue +++ b/src/views/Dashboard/widgets/FeedWidget.vue @@ -1,9 +1,6 @@