diff --git a/SPEC.md b/SPEC.md index e9767ae..1851532 100644 --- a/SPEC.md +++ b/SPEC.md @@ -180,11 +180,8 @@ Split `value` meaning per mode: | `exact` | amount in minor units | sum == amount | | `percent` | basis points (100 % = 10000) | sum == 10000 | -Multiple payers are supported (`payers` list) — e.g. several people chipping -in for a car. The editor shows a single payer by default; choosing "Several -people" in *Paid by* lists every member with an amount box. Empty boxes show -the unassigned remainder as a placeholder, a live line reads "Remaining" / -"Over by" / "Adds up to the total", and the expense list shows "N payers". +Multiple payers are supported (`payers` list); the default UI shows a single +payer with an "add payer" option. --- @@ -281,18 +278,6 @@ the minimum in practice, and is easy to reason about. the daily rate for the expense date and is editable. - Split editor: equal / shares / exact / percent tabs; tap to exclude people; live "remaining to assign" indicator for exact and percent modes. -- The add sheet fits one phone screen (390×844, three members): currency as a - pill beside the amount; categories as 12 equal icon tiles (6 × 2 on phones, - one row of 12 when wider) with the chosen name beside the label; date and - payer side by side ("Several people" is the last payer option); photo, note - and repeat stay folded behind small buttons; Save is pinned to the bottom. -- Touch gestures on the group page (shortcuts; every action also has a - button): pull up past the end of the Expenses or Balances tab to add an - expense (a "Pull up to add expense" pill rises from behind the tab bar and - reads "Release to add" once far enough; at the bottom so the browser's - pull-to-refresh still works), and swipe left/right to move between the - Expenses, Balances, Stats and Activity tabs. Swipes starting within 24px - of the screen edge are left to the OS back gesture. - **One photo per expense** (receipt), see 9. - Category, date, note. - Comments thread on each expense. @@ -461,17 +446,10 @@ which group ids exist. "who am I" isn't set), the group's total spent, and round quick actions: Add · Payment · Settle up · Share. Tabs: Expenses · Balances (settle up) · Stats · Activity. A floating "+" appears only once the quick actions have - scrolled off screen. Touch gestures: pull up at the end of the page to - add, swipe sideways to change tab (see 7.2). + scrolled off screen. 3. **Expense editor** (sheet on mobile, dialog on desktop). 4. **Expense detail**: photo, split breakdown, comments, history. -5. **Group settings**, kept short: Share (copy link, native share, QR), - Group (icon, name, main currency and default category side by side; Save - appears only when something changed), Members ("You are" picker on top; - rename/archive as icon buttons; add member as the last row), - Notifications (one switch; hidden where push isn't available), Repeating - expenses (only when there are any), Export, Danger zone (delete asks for - the group name only after it is tapped). +5. **Group settings**. 6. **App settings**: language, theme, notifications. ### 10.3 Language diff --git a/apps/web/src/app.css b/apps/web/src/app.css index 16f2eb7..b3484a8 100644 --- a/apps/web/src/app.css +++ b/apps/web/src/app.css @@ -232,10 +232,6 @@ dialog.sheet { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; } dialog.sheet:focus { outline: none; } -/* Sheets scroll under an opaque header (and, in the editor, a pinned Save bar): - keep focused fields clear of both. */ -dialog.sheet { scroll-padding: 72px 0 96px; } -dialog.sheet .topbar { background: var(--bg); } dialog.sheet::backdrop { background: rgb(0 0 0 / 0.5); } @media (min-width: 760px) { dialog.sheet { diff --git a/apps/web/src/components/ExpenseEditor.svelte b/apps/web/src/components/ExpenseEditor.svelte index b0b1cbb..0a7ea30 100644 --- a/apps/web/src/components/ExpenseEditor.svelte +++ b/apps/web/src/components/ExpenseEditor.svelte @@ -1,12 +1,12 @@ -
+ {#if !existing} -
+
{/if} - -
-
- - - - - - - +
+ + +
+ +
{#if currency !== base} -
- - - (rateSource = 'manual')} /> - {base} - - - - {#if rateMissing && rateSource !== 'manual'}{t('rate_unavailable')} - {:else if rateSource.startsWith('ecb:')}{t('rate_source_ecb', { date: fmtDate(rateSource.slice(4)) })} - {:else if rateSource.startsWith('xr:')}{t('rate_source_xr', { date: fmtDate(rateSource.slice(3)) })} - {:else}{t('rate_source_manual')}{/if} - {#if amount && isValidRate(rateText.trim().replace(',', '.'))} · ≈ {money(Math.round(amount * Number(rateText.replace(',', '.')) * 10 ** (exponent(base) - exp)), base)}{/if} - +
+ + (rateSource = 'manual')} /> + {base}
+ +

+ {#if rateMissing && rateSource !== 'manual'}{t('rate_unavailable')} + {:else if rateSource.startsWith('ecb:')}{t('rate_source_ecb', { date: fmtDate(rateSource.slice(4)) })} + {:else if rateSource.startsWith('xr:')}{t('rate_source_xr', { date: fmtDate(rateSource.slice(3)) })} + {:else}{t('rate_source_manual')}{/if} + {#if amount && isValidRate(rateText.trim().replace(',', '.'))} · ≈ {money(Math.round(amount * Number(rateText.replace(',', '.')) * 10 ** (exponent(base) - exp)), base)}{/if} +

{/if}
{#if kind === 'expense'} - - - - +
- {t('category')} · {t(`cat_${category}` as MsgKey)} -
+ {t('category')} +
{#each CATEGORIES as c} - {/each}
{/if} + + + {#if kind === 'transfer'} -
-