tidy up project structure and normalize formatting
This commit is contained in:
@@ -36,28 +36,27 @@
|
||||
<!-- Calendar Grid -->
|
||||
<Transition name="fade" mode="out-in">
|
||||
<div :key="weekStart.getTime()" class="flex-1 bg-bg-surface rounded-lg border border-border-subtle overflow-hidden flex flex-col min-h-0">
|
||||
<!-- Day column headers -->
|
||||
<div class="grid shrink-0 border-b border-border-subtle" :style="gridStyle">
|
||||
<!-- Top-left corner (hour gutter) -->
|
||||
<div class="w-14 shrink-0 border-r border-border-subtle" />
|
||||
<!-- Day headers -->
|
||||
<div
|
||||
v-for="(day, index) in weekDays"
|
||||
:key="index"
|
||||
class="px-2 py-2.5 text-center border-r border-border-subtle last:border-r-0"
|
||||
:class="isToday(day) ? 'bg-accent/5' : ''"
|
||||
>
|
||||
<span
|
||||
class="text-[0.6875rem] uppercase tracking-[0.08em] font-medium"
|
||||
:class="isToday(day) ? 'text-accent-text' : 'text-text-tertiary'"
|
||||
>
|
||||
{{ formatDayHeader(day) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Scrollable hour rows -->
|
||||
<div ref="scrollContainer" class="flex-1 overflow-y-auto min-h-0">
|
||||
<!-- Day column headers (sticky) -->
|
||||
<div class="grid shrink-0 border-b border-border-subtle sticky top-0 z-10 bg-bg-surface" :style="gridStyle">
|
||||
<!-- Top-left corner (hour gutter) -->
|
||||
<div class="w-14 shrink-0 border-r border-border-subtle" />
|
||||
<!-- Day headers -->
|
||||
<div
|
||||
v-for="(day, index) in weekDays"
|
||||
:key="index"
|
||||
class="px-2 py-2.5 text-center border-r border-border-subtle last:border-r-0"
|
||||
:class="isToday(day) ? 'bg-accent/5' : ''"
|
||||
>
|
||||
<span
|
||||
class="text-[0.6875rem] uppercase tracking-[0.08em] font-medium"
|
||||
:class="isToday(day) ? 'text-accent-text' : 'text-text-tertiary'"
|
||||
>
|
||||
{{ formatDayHeader(day) }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid relative" :style="gridStyle">
|
||||
<!-- Hour labels column -->
|
||||
<div class="w-14 shrink-0 border-r border-border-subtle">
|
||||
@@ -138,8 +137,8 @@ const scrollContainer = ref<HTMLElement | null>(null)
|
||||
// The start-of-week date (Monday)
|
||||
const weekStart = ref(getMonday(new Date()))
|
||||
|
||||
// Hours displayed: 6am through 11pm (6..23)
|
||||
const HOUR_START = 6
|
||||
// Hours displayed: full 24h (0..23)
|
||||
const HOUR_START = 0
|
||||
const HOUR_END = 23
|
||||
const hours = Array.from({ length: HOUR_END - HOUR_START + 1 }, (_, i) => HOUR_START + i)
|
||||
const HOUR_HEIGHT = 48 // h-12 = 3rem = 48px
|
||||
@@ -251,7 +250,7 @@ function getEntryTooltip(entry: TimeEntry): string {
|
||||
const duration = formatDuration(entry.duration)
|
||||
const start = new Date(entry.start_time)
|
||||
const time = start.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit' })
|
||||
const desc = entry.description ? ` — ${entry.description}` : ''
|
||||
const desc = entry.description ? ` - ${entry.description}` : ''
|
||||
return `${project} (${duration}) at ${time}${desc}`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user