Added stats page
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user