From 3d2f87c967e31948b0e8fc8ed2efcc8b270c6c96 Mon Sep 17 00:00:00 2001 From: agent Date: Fri, 6 Nov 2026 23:59:44 +0000 Subject: [PATCH] Pull up to add, swipe between tabs; shorter group settings Gestures (GroupGestures.svelte replaces PullToAdd.svelte): - Pull-to-add moves to the bottom: pulling up past the end of the Expenses or Balances tab raises a pill from behind the tab bar. The top is left to the browser's pull-to-refresh. - Swiping left/right switches between Expenses, Balances, Stats and Activity; the list follows the finger and the new tab slides in. Touches within 24px of the screen edge (OS back gesture), in form controls or in sideways-scrolling elements are ignored. Group settings, same features in less space: - Share: one row (Copy link, Share icon, QR); shorter intro. - Group: currency and default category side by side; Save appears only when something changed; hints trimmed. - Members: "You are" picker merged in; rename/archive as icon buttons; add member is the last row. - Notifications: a single switch. Repeating expenses: hidden when none. - Danger zone: two rows; the delete confirmation opens on tap. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HA82gVKYyo9BHLHPW4qr4x --- SPEC.md | 22 +- apps/web/src/components/GroupGestures.svelte | 215 +++++++++++++++++++ apps/web/src/components/GroupPage.svelte | 26 ++- apps/web/src/components/GroupSettings.svelte | 197 ++++++++++------- apps/web/src/components/Icon.svelte | 2 + apps/web/src/components/PullToAdd.svelte | 123 ----------- apps/web/src/lib/locales/cs.ts | 16 +- apps/web/src/lib/locales/en.ts | 16 +- 8 files changed, 390 insertions(+), 227 deletions(-) create mode 100644 apps/web/src/components/GroupGestures.svelte delete mode 100644 apps/web/src/components/PullToAdd.svelte diff --git a/SPEC.md b/SPEC.md index 1c5d7b7..2fc6d56 100644 --- a/SPEC.md +++ b/SPEC.md @@ -283,10 +283,13 @@ the minimum in practice, and is easy to reason about. 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. -- Pull to add: on a touch screen, dragging the Expenses or Balances tab down - from the very top shows a "Pull to add expense" pill under the header; - releasing once it reads "Release to add" opens the add sheet. It replaces - the browser's pull-to-refresh there (sync is live anyway). +- 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. @@ -455,10 +458,17 @@ 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. + scrolled off screen. Touch gestures: pull up at the end of the page to + add, swipe sideways to change tab (see 7.2). 3. **Expense editor** (sheet on mobile, dialog on desktop). 4. **Expense detail**: photo, split breakdown, comments, history. -5. **Group settings**. +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). 6. **App settings**: language, theme, notifications. ### 10.3 Language diff --git a/apps/web/src/components/GroupGestures.svelte b/apps/web/src/components/GroupGestures.svelte new file mode 100644 index 0000000..57ebce3 --- /dev/null +++ b/apps/web/src/components/GroupGestures.svelte @@ -0,0 +1,215 @@ + + + + + diff --git a/apps/web/src/components/GroupPage.svelte b/apps/web/src/components/GroupPage.svelte index 91c8450..7170c2d 100644 --- a/apps/web/src/components/GroupPage.svelte +++ b/apps/web/src/components/GroupPage.svelte @@ -1,5 +1,5 @@ - - - - diff --git a/apps/web/src/lib/locales/cs.ts b/apps/web/src/lib/locales/cs.ts index d9dd88d..8a9e0b1 100644 --- a/apps/web/src/lib/locales/cs.ts +++ b/apps/web/src/lib/locales/cs.ts @@ -43,7 +43,7 @@ const cs: Messages = { creating: 'Vytvářím…', share_group: 'Sdílet skupinu', - share_intro: 'Kdokoli s tímto odkazem může skupinu vidět i upravovat. Posílejte ho jen členům.', + share_intro: 'Kdo má odkaz, může skupinu vidět i upravovat.', save_link_warning: 'Uložte si tento odkaz na bezpečné místo. Pokud se ztratí všechny kopie, skupinu nepůjde obnovit.', copy_link: 'Kopírovat odkaz', copied: 'Zkopírováno', @@ -62,7 +62,7 @@ const cs: Messages = { stats: 'Statistiky', activity: 'Aktivita', add_expense: 'Přidat výdaj', - pull_to_add: 'Táhněte dolů pro nový výdaj', + pull_to_add: 'Táhněte nahoru pro nový výdaj', release_to_add: 'Pusťte a přidejte', no_expenses: 'Zatím žádné výdaje. Klepněte na + a přidejte první.', total_spent: 'Celkem utraceno', @@ -109,7 +109,6 @@ const cs: Messages = { title_ph: 'Večeře', category: 'Kategorie', default_category: 'Výchozí kategorie', - default_category_hint: 'Nové výdaje začnou v této kategorii.', date: 'Datum', currency: 'Měna', rate: 'Směnný kurz', @@ -214,7 +213,7 @@ const cs: Messages = { not_set: 'Nenastaveno', change: 'Změnit', notifications: 'Oznámení', - notifications_hint: 'Dostanete oznámení, když skupinu změní někdo jiný.', + notifications_hint: 'Upozornit mě, když skupinu změní ostatní', notifications_ios: 'Na iPhonu a iPadu nejdřív přidejte OweMe na plochu (Sdílet → Přidat na plochu).', notifications_denied: 'Oznámení jsou pro tento web zablokovaná v nastavení prohlížeče.', notifications_unavailable: 'Oznámení nejsou na tomto serveru nebo v tomto prohlížeči k dispozici.', @@ -226,11 +225,14 @@ const cs: Messages = { export_expenses: 'Výdaje (CSV)', export_balances: 'Zůstatky (CSV)', backup: 'Soubor se zálohou', - backup_hint: 'Obsahuje klíč skupiny: kdokoli se souborem skupinu otevře. Uložte ho bezpečně.', + backup_hint: 'Záloha obsahuje klíč skupiny. Uložte ji bezpečně.', danger_zone: 'Nebezpečná zóna', - remove_from_device_hint: 'Skupina zůstane na serveru i v ostatních zařízeních.', + remove_from_device_hint: 'Zůstane na serveru i v ostatních zařízeních.', delete_group: 'Smazat skupinu pro všechny', - delete_group_hint: 'Smaže ze serveru všechny výdaje a fotky. Pro potvrzení napište název skupiny.', + delete_group_hint: 'Všem smaže všechny výdaje a fotky.', + type_name_to_confirm: 'Pro potvrzení napište název skupiny', + qr_code: 'QR kód', + group: 'Skupina', confirm: 'Potvrdit', saved: 'Uloženo', diff --git a/apps/web/src/lib/locales/en.ts b/apps/web/src/lib/locales/en.ts index ffe52a8..b9f559c 100644 --- a/apps/web/src/lib/locales/en.ts +++ b/apps/web/src/lib/locales/en.ts @@ -47,7 +47,7 @@ const en = { // share share_group: 'Share group', - share_intro: 'Anyone with this link can see and edit the group. Send it only to group members.', + share_intro: 'Anyone with the link can view and edit this group.', save_link_warning: 'Save this link somewhere safe. If every copy is lost, the group can’t be recovered.', copy_link: 'Copy link', copied: 'Copied', @@ -68,7 +68,7 @@ const en = { stats: 'Stats', activity: 'Activity', add_expense: 'Add expense', - pull_to_add: 'Pull to add expense', + pull_to_add: 'Pull up to add expense', release_to_add: 'Release to add', no_expenses: 'No expenses yet. Tap + to add the first one.', total_spent: 'Total spent', @@ -117,7 +117,6 @@ const en = { title_ph: 'Dinner', category: 'Category', default_category: 'Default category', - default_category_hint: 'New expenses start in this category.', date: 'Date', currency: 'Currency', rate: 'Exchange rate', @@ -226,7 +225,7 @@ const en = { not_set: 'Not set', change: 'Change', notifications: 'Notifications', - notifications_hint: 'Get a notification when someone else changes this group.', + notifications_hint: 'Notify me when others change the group', notifications_ios: 'On iPhone and iPad, add OweMe to your home screen first (Share → Add to Home Screen).', notifications_denied: 'Notifications are blocked for this site in your browser settings.', notifications_unavailable: 'Notifications aren’t available on this server or in this browser.', @@ -238,11 +237,14 @@ const en = { export_expenses: 'Expenses (CSV)', export_balances: 'Balances (CSV)', backup: 'Backup file', - backup_hint: 'Contains the group key: anyone with the file can open the group. Store it safely.', + backup_hint: 'The backup file contains the group key. Store it safely.', danger_zone: 'Danger zone', - remove_from_device_hint: 'The group stays on the server and on other devices.', + remove_from_device_hint: 'Stays on the server and other devices.', delete_group: 'Delete group for everyone', - delete_group_hint: 'Deletes all expenses and photos from the server. Type the group name to confirm.', + delete_group_hint: 'Removes all expenses and photos for everyone.', + type_name_to_confirm: 'Type the group name to confirm', + qr_code: 'QR code', + group: 'Group', confirm: 'Confirm', saved: 'Saved',