mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-10 04:22:13 +10:00
fix(playtime): remove WIP date tracking from displaying
This commit is contained in:
@ -17,7 +17,6 @@
|
|||||||
<div v-if="stats.sessionCount > 0">
|
<div v-if="stats.sessionCount > 0">
|
||||||
Avg: {{ formatPlaytime(stats.averageSessionLength) }} per session
|
Avg: {{ formatPlaytime(stats.averageSessionLength) }} per session
|
||||||
</div>
|
</div>
|
||||||
<div>Last played {{ formatRelativeTime(stats.lastPlayed) }}</div>
|
|
||||||
<div v-if="stats.currentSessionDuration">
|
<div v-if="stats.currentSessionDuration">
|
||||||
Current session: {{ formatPlaytime(stats.currentSessionDuration) }}
|
Current session: {{ formatPlaytime(stats.currentSessionDuration) }}
|
||||||
</div>
|
</div>
|
||||||
@ -50,5 +49,5 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
showActiveIndicator: true,
|
showActiveIndicator: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
const { formatPlaytime, formatRelativeTime } = usePlaytime();
|
const { formatPlaytime } = usePlaytime();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -33,34 +33,6 @@
|
|||||||
Avg: {{ formatPlaytime(stats.averageSessionLength) }}
|
Avg: {{ formatPlaytime(stats.averageSessionLength) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- First Played -->
|
|
||||||
<div class="bg-zinc-700/50 rounded-lg p-3">
|
|
||||||
<div class="flex items-center gap-2 mb-2">
|
|
||||||
<CalendarIcon class="w-4 h-4 text-purple-400" />
|
|
||||||
<span class="text-sm font-medium text-zinc-300">First Played</span>
|
|
||||||
</div>
|
|
||||||
<div class="text-lg font-semibold text-zinc-100">
|
|
||||||
{{ formatDate(stats.firstPlayed) }}
|
|
||||||
</div>
|
|
||||||
<div class="text-xs text-zinc-400 mt-1">
|
|
||||||
{{ formatRelativeTime(stats.firstPlayed) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Last Played -->
|
|
||||||
<div class="bg-zinc-700/50 rounded-lg p-3">
|
|
||||||
<div class="flex items-center gap-2 mb-2">
|
|
||||||
<ClockIcon class="w-4 h-4 text-orange-400" />
|
|
||||||
<span class="text-sm font-medium text-zinc-300">Last Played</span>
|
|
||||||
</div>
|
|
||||||
<div class="text-lg font-semibold text-zinc-100">
|
|
||||||
{{ formatDate(stats.lastPlayed) }}
|
|
||||||
</div>
|
|
||||||
<div class="text-xs text-zinc-400 mt-1">
|
|
||||||
{{ formatRelativeTime(stats.lastPlayed) }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- No stats available -->
|
<!-- No stats available -->
|
||||||
@ -87,8 +59,7 @@
|
|||||||
import {
|
import {
|
||||||
ChartBarIcon,
|
ChartBarIcon,
|
||||||
ClockIcon,
|
ClockIcon,
|
||||||
PlayIcon,
|
PlayIcon
|
||||||
CalendarIcon
|
|
||||||
} from "@heroicons/vue/20/solid";
|
} from "@heroicons/vue/20/solid";
|
||||||
import type { GamePlaytimeStats } from "~/types";
|
import type { GamePlaytimeStats } from "~/types";
|
||||||
|
|
||||||
@ -101,14 +72,5 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
isActive: false,
|
isActive: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const { formatPlaytime, formatDetailedPlaytime, formatRelativeTime } = usePlaytime();
|
const { formatPlaytime, formatDetailedPlaytime } = usePlaytime();
|
||||||
|
|
||||||
const formatDate = (timestamp: string): string => {
|
|
||||||
const date = new Date(timestamp);
|
|
||||||
return date.toLocaleDateString(undefined, {
|
|
||||||
year: 'numeric',
|
|
||||||
month: 'short',
|
|
||||||
day: 'numeric'
|
|
||||||
});
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user