mirror of
https://github.com/Zproger/Aurum.git
synced 2026-10-14 03:26:40 +07:00
redesign: YearSelector as a compact dropdown next to MonthSelector
The pill-row year switcher from the previous commit added a whole extra row of buttons above the month pills, which read as cluttered. Replaced it with a single dropdown button (current year + chevron) placed to the right of MonthSelector on all three pages, matching how a lot of finance-app date pickers separate month (frequent) from year (occasional) navigation.
This commit is contained in:
@@ -54,9 +54,11 @@ export function BudgetPage() {
|
||||
<div className="space-y-5">
|
||||
<AlertBanner />
|
||||
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="min-w-0 flex-1">
|
||||
<MonthSelector month={month} onChange={setMonth} />
|
||||
</div>
|
||||
<YearSelector years={years ?? [now.getFullYear()]} year={year} onChange={setYear} />
|
||||
<MonthSelector month={month} onChange={setMonth} />
|
||||
</div>
|
||||
|
||||
<Card>
|
||||
|
||||
@@ -35,9 +35,11 @@ export function DashboardPage() {
|
||||
<div className="space-y-5">
|
||||
<AlertBanner excludeKeys={["risky_allocation_exceeded"]} />
|
||||
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-3">
|
||||
<div className="min-w-0 flex-1">
|
||||
<MonthSelector month={month} onChange={setMonth} />
|
||||
</div>
|
||||
<YearSelector years={years ?? [now.getFullYear()]} year={year} onChange={setYear} />
|
||||
<MonthSelector month={month} onChange={setMonth} />
|
||||
</div>
|
||||
|
||||
{isError && (
|
||||
|
||||
@@ -63,7 +63,16 @@ export function TransactionsPage() {
|
||||
return (
|
||||
<div className="space-y-5">
|
||||
<div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div className="space-y-2">
|
||||
<div className="flex min-w-0 flex-1 items-center gap-3">
|
||||
<div className="min-w-0 flex-1">
|
||||
<MonthSelector
|
||||
month={month}
|
||||
onChange={(value) => {
|
||||
setMonth(value);
|
||||
setPage(1);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<YearSelector
|
||||
years={years ?? [now.getFullYear()]}
|
||||
year={year}
|
||||
@@ -72,13 +81,6 @@ export function TransactionsPage() {
|
||||
setPage(1);
|
||||
}}
|
||||
/>
|
||||
<MonthSelector
|
||||
month={month}
|
||||
onChange={(value) => {
|
||||
setMonth(value);
|
||||
setPage(1);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<Button onClick={openCreateModal} className="w-full sm:w-auto">
|
||||
<Plus size={16} />
|
||||
|
||||
Reference in New Issue
Block a user