This commit is contained in:
2025-12-26 17:55:00 -07:00
parent ae1fb10898
commit 0140c5b39b
35 changed files with 1160 additions and 513 deletions

View File

@@ -1,5 +1,7 @@
<template>
<Doughnut :data="chartData" :options="chartOptions" />
<div style="position: relative; height: 100%; width: 100%;">
<Doughnut :data="chartData" :options="chartOptions" />
</div>
</template>
<script setup lang="ts">

View File

@@ -1,5 +1,7 @@
<template>
<Bar :data="chartData" :options="chartOptions" />
<div style="position: relative; height: 100%; width: 100%;">
<Bar :data="chartData" :options="chartOptions" />
</div>
</template>
<script setup lang="ts">

View File

@@ -1,5 +1,7 @@
<template>
<Bar :data="chartData" :options="chartOptions" />
<div style="position: relative; height: 100%; width: 100%;">
<Bar :data="chartData" :options="chartOptions" />
</div>
</template>
<script setup lang="ts">

View File

@@ -18,10 +18,26 @@ const selectedTags = ref<string[]>([]);
let interval: ReturnType<typeof setInterval> | null = null;
function formatTime(ms: number) {
const totalSeconds = Math.floor(ms / 1000);
const hours = Math.floor(totalSeconds / 3600);
const minutes = Math.floor((totalSeconds % 3600) / 60);
const seconds = totalSeconds % 60;
const timeStr = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
// Calculate rounded version
const totalMinutes = Math.round(ms / 1000 / 60);
const minutes = totalMinutes % 60;
const hours = Math.floor(totalMinutes / 60);
return `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
const roundedHours = Math.floor(totalMinutes / 60);
const roundedMinutes = totalMinutes % 60;
let roundedStr = '';
if (roundedHours > 0) {
roundedStr = roundedMinutes > 0 ? `${roundedHours}h ${roundedMinutes}m` : `${roundedHours}h`;
} else {
roundedStr = `${roundedMinutes}m`;
}
return `${timeStr} (${roundedStr})`;
}
function toggleTag(tagId: string) {