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 @@
-
+
@@ -13,15 +10,22 @@
:key="`${item.type}-${item.created_at}-${index}`"
class="cursor-default"
:class="{ 'border-l-2 border-l-chart-4': item.isFavorite }">
-
+
- {{ timeAgo(item.created_at) }}
+ {{ formatTime(item.created_at) }}
+
+ {{ item.type }}
+
- {{ item.displayName }}
+ {{ item.displayName }}
→
- {{ item.displayName }}
+ {{ item.displayName }}
→
- {{ item.displayName }}
+ {{ item.displayName }}
- {{ item.displayName }}
+ {{ item.displayName }}
{{ item.statusDescription }}
- {{ item.displayName }}
+ {{ item.displayName }}
→ {{ item.avatarName }}
- {{ item.displayName }}
+ {{ item.displayName }}
{{ t('dashboard.widget.feed_bio') }}
- {{ item.displayName }}
+ {{ item.displayName }}
{{ item.type }}
@@ -83,7 +111,7 @@
import { Box, MapPin, Pencil } from 'lucide-vue-next';
import { statusClass } from '@/shared/utils/user';
- import { timeToText, formatDateFilter } from '@/shared/utils';
+ import { formatDateFilter } from '@/shared/utils';
import { showUserDialog } from '@/coordinators/userCoordinator';
import { useFeedStore } from '@/stores';
@@ -112,20 +140,17 @@
return FEED_TYPES;
});
+ const showType = computed(() => {
+ return props.config.showType || false;
+ });
+
const filteredData = computed(() => {
const filters = activeFilters.value;
return feedStore.feedTableData.filter((item) => filters.includes(item.type)).slice(0, 100);
});
- function timeAgo(dateStr) {
- if (!dateStr) return '';
- let diff = Date.now() - new Date(dateStr).getTime();
- if (diff < 0) return 'now';
- // Over 1 hour: drop minutes
- if (diff >= 3600000) {
- diff = Math.floor(diff / 3600000) * 3600000;
- }
- return t('dashboard.widget.time_ago', { time: timeToText(diff) });
+ function formatTime(dateStr) {
+ return formatDateFilter(dateStr, 'short');
}
function formatExactTime(dateStr) {
diff --git a/src/views/Dashboard/widgets/GameLogWidget.vue b/src/views/Dashboard/widgets/GameLogWidget.vue
index 46653930..bd13a1d4 100644
--- a/src/views/Dashboard/widgets/GameLogWidget.vue
+++ b/src/views/Dashboard/widgets/GameLogWidget.vue
@@ -1,9 +1,6 @@
-
+
@@ -13,14 +10,14 @@
:key="`${item.type}-${item.created_at}-${index}`"
class="cursor-default"
:class="{ 'border-l-2 border-l-chart-4': item.isFavorite }">
-
+
- {{ timeAgo(item.created_at) }}
+ {{ formatTime(item.created_at) }}
-
+
-
+
{{ item.displayName }}
+ @click="openUser(item.userId)"
+ >{{ item.displayName }}
-
+
{{ item.displayName }}
+ @click="openUser(item.userId)"
+ >{{ item.displayName }}
@@ -47,7 +48,11 @@
- {{ item.displayName }}
+ {{ item.displayName }}
→
{{ item.worldName || '' }}
- {{ item.displayName }}
- {{ item.type }}
+
+
+ {{ item.displayName }}
+ {{ item.type }}
+
+
+
+ {{ item.displayName }}
+ {{ item.type }}
+ — {{ item.data || item.message }}
+
@@ -75,12 +94,12 @@