/reports opens the year: per currency spent so far, a typical month and this month against typical by today, one lane of category columns per currency with a dotted typical line and income as dots, what grew next to the month under the cursor, an honest by-currency table and net worth lanes weighted by size. Arrows move the month, Enter opens its transactions, [ ] change the year, m shows the old tables, ?view=month pins a month with the money flow. Old report URLs still work. Shared pieces for other pages: Lanes, ledgerQuery for twelve months, typical-month helpers.
27 lines
644 B
Svelte
27 lines
644 B
Svelte
<script lang="ts">
|
|
import {
|
|
modeLabel,
|
|
navigate,
|
|
useReport,
|
|
} from "#lib/reports/report.svelte.js";
|
|
|
|
const report = useReport();
|
|
</script>
|
|
|
|
{#if report.available.length > 1}
|
|
<div class="flex items-center gap-3 text-[12px]">
|
|
{#each report.available as mode (mode)}
|
|
<button
|
|
aria-pressed={report.mode === mode}
|
|
class={report.mode === mode
|
|
? "font-semibold text-cladd-fg"
|
|
: "text-brand hover:underline dark:text-[var(--ff-series-1)]"}
|
|
onclick={() => navigate({ cur: mode })}
|
|
type="button"
|
|
>
|
|
{modeLabel(mode)}
|
|
</button>
|
|
{/each}
|
|
</div>
|
|
{/if}
|