Added stats page

This commit is contained in:
2026-09-20 13:40:27 +02:00
parent 6f64475050
commit daa4bbd028
9 changed files with 547 additions and 15 deletions

View File

@@ -6,6 +6,7 @@
import Resume from './routes/Resume.svelte';
import Settings from './routes/Settings.svelte';
import Today from './routes/Today.svelte';
import Stats from './routes/Stats.svelte';
let ready = $state(false);
@@ -54,11 +55,13 @@
<Settings />
{:else if view === 'today'}
<Today />
{:else if view === 'stats'}
<Stats />
{:else}
<Resume />
{/if}
<nav>
<nav class:with-stats={view === 'stats'}>
<button
type="button"
class:sel={view === 'resume'}
@@ -80,6 +83,9 @@
aria-current={view === 'settings'}
onclick={() => go('settings')}>Réglages</button
>
{#if view === 'stats'}
<button type="button" class="sel" disabled={dayState.importing} aria-current="page" onclick={() => go('stats')}>Stats</button>
{/if}
</nav>
{/if}
@@ -135,4 +141,6 @@
background: var(--accent);
color: var(--accent-fg);
}
nav.with-stats { grid-template-columns: repeat(4, 1fr); }
nav.with-stats button { padding: 0 4px; font-size: 0.75rem; min-width: 0; }
</style>