feat(costs): rework Budget into Costs — Splitwise-style, multi-currency, mobile (#1106)

* fix(journey): authorize reads of the journey share link

GET /api/journeys/:id/share-link now requires journey access (canAccessJourney),
matching the create/delete share-link routes and the get_journey_share_link MCP
tool. Returns no link when the caller lacks access to the journey.

* feat(costs): rework Budget into Costs — Splitwise-style, multi-currency, mobile

Renames the Budget addon to "Costs" (UI only) and reworks it into a Tricount/
Splitwise-style cost tracker: multiple payers per expense, equal split across
chosen members, settle-up with persisted history + undo, 12 fixed categories,
per-expense currency with live FX conversion to a user-set display currency
(Settings -> Display), and locale-correct money formatting. Adds a desktop and a
dedicated mobile layout. A migration backfills existing budget items (single
payer, split members, currency). Closes #551 (per-expense currency).

Also switches the app font to self-hosted Poppins (Geist for secondary subtext),
replacing the Google Fonts CDN dependency.

* fix(costs): neutral dashboard dark palette + liquid glass, full page width, entry-count badge

- Dark mode used a warm oklch palette that read brownish; switch to the
  neutral zinc tokens used by the dashboard (#121215 bg, #f4f4f5 ink) and add a
  subtle backdrop-blur glass on cards.
- Costs now uses the full available page width on desktop instead of a 1280px cap.
- Render the expense count next to the Expenses title as a badge.
- Adapt budget/journey unit tests to the new payer-based settlement model and the
  Costs rename (category default 'other', Costs tab/CostsPanel).

* fix(costs): drop the entry-count badge, always show row edit/delete actions

Removes the count badge next to the Expenses title and makes the per-row
edit/delete actions permanently visible (no longer hover-only) on desktop too.

* feat(costs): currency-native money formatting, custom select/date, rename addon to Costs

- Format every amount in its own currency convention (symbol position, grouping
  and decimal separators) regardless of app language, via a currency->locale map
  (EUR -> '12,00 €', USD -> '$12.00', JPY -> '¥12', ...). Previously Intl used the
  app locale, so EUR showed the symbol in front under an English UI.
- Use TREK's CustomSelect (searchable, with symbols) and CustomDatePicker in the
  add/edit expense modal instead of the native <select>/<input type=date>.
- Rename the 'Budget Planner' add-on to 'Costs' in the admin list (display only;
  id/tables/permissions/MCP stay 'budget') via seed + a migration for existing DBs.

* feat(auth): configurable session duration via SESSION_DURATION

Adds a SESSION_DURATION env var (ms-style strings: 1h, 7d, 30d, ...) controlling
how long a session stays valid before re-login. It drives both the trek_session
JWT exp claim and the cookie maxAge from one source, so they never drift. Invalid
values warn at startup and fall back to the default (24h — unchanged). The MFA
challenge token and MCP OAuth tokens keep their own TTL.

Implements the request from discussion #946. Documented in the env-var wiki page,
.env.example and docker-compose.yml.
This commit is contained in:
Maurice
2026-06-05 01:38:25 +02:00
committed by GitHub
parent 6ef3c7ae6b
commit 247433fb2a
159 changed files with 3354 additions and 156 deletions
+73
View File
@@ -40,5 +40,78 @@ const budget: TranslationStrings = {
'Klicke auf ein Mitglied-Bild bei einem Eintrag, um es grün zu markieren — das bedeutet, diese Person hat bezahlt. Der Ausgleich zeigt dann, wer wem wie viel schuldet.',
'budget.netBalances': 'Netto-Salden',
'budget.categoriesLabel': 'Kategorien',
"costs.you": "Du",
"costs.youShort": "Du",
"costs.youLower": "dir",
"costs.youOwe": "Du schuldest",
"costs.youOweSub": "Du solltest anderen zahlen",
"costs.youreOwed": "Dir wird geschuldet",
"costs.youreOwedSub": "Andere sollten dir zahlen",
"costs.totalSpend": "Gesamtausgaben",
"costs.totalSpendSub": "Über alle Reisenden",
"costs.to": "An",
"costs.from": "Von",
"costs.allSettled": "Alles ausgeglichen",
"costs.nothingOwed": "Dir wird nichts geschuldet",
"costs.yourShare": "Dein Anteil",
"costs.youPaid": "Du zahltest",
"costs.expenses": "Ausgaben",
"costs.entries": "{count} Einträge",
"costs.searchPlaceholder": "Ausgaben suchen…",
"costs.filter.all": "Alle",
"costs.filter.mine": "Von mir bezahlt",
"costs.filter.owed": "Mir geschuldet",
"costs.addExpense": "Ausgabe hinzufügen",
"costs.editExpense": "Ausgabe bearbeiten",
"costs.noMatch": "Keine Ausgaben passen zur Suche.",
"costs.emptyText": "Noch keine Ausgaben. Füge die erste hinzu.",
"costs.spent": "{amount} ausgegeben",
"costs.noDate": "Kein Datum",
"costs.noOnePaid": "Noch niemand bezahlt",
"costs.youLent": "{amount} ausgelegt",
"costs.youBorrowed": "{amount} geliehen",
"costs.settleUp": "Ausgleichen",
"costs.history": "Verlauf",
"costs.everyoneSquare": "Alle quitt",
"costs.nothingOutstanding": "Aktuell keine offenen Zahlungen.",
"costs.pay": "zahlst",
"costs.pays": "zahlt",
"costs.settle": "Ausgleichen",
"costs.balances": "Salden",
"costs.byCategory": "Nach Kategorie",
"costs.noCategories": "Noch keine Ausgaben.",
"costs.settleHistory": "Ausgleichs-Verlauf",
"costs.noSettlements": "Noch keine ausgeglichenen Zahlungen.",
"costs.paymentsSettled": "{count} Zahlungen ausgeglichen",
"costs.paid": "zahlte",
"costs.undo": "Rückgängig",
"costs.whatFor": "Wofür war es?",
"costs.namePlaceholder": "z.B. Abendessen, Souvenirs, Benzin…",
"costs.totalAmount": "Gesamtbetrag",
"costs.currency": "Währung",
"costs.day": "Tag",
"costs.rateLabel": "1 {from} in {to}",
"costs.category": "Kategorie",
"costs.whoPaid": "Wer hat bezahlt?",
"costs.splitBetween": "Gleichmäßig teilen zwischen",
"costs.pickSomeone": "Wähle mindestens eine Person zum Teilen.",
"costs.splitSummary": "Auf {count} aufgeteilt · {amount} pro Person",
"costs.cat.accommodation": "Unterkunft",
"costs.cat.food": "Essen & Trinken",
"costs.cat.groceries": "Lebensmittel",
"costs.cat.transport": "Transport",
"costs.cat.flights": "Flüge",
"costs.cat.activities": "Aktivitäten",
"costs.cat.sightseeing": "Sightseeing",
"costs.cat.shopping": "Shopping",
"costs.cat.fees": "Gebühren & Tickets",
"costs.cat.health": "Gesundheit",
"costs.cat.tips": "Trinkgeld",
"costs.cat.other": "Sonstiges",
"costs.daysCount": "{count} Tage",
"costs.travelers": "{count} Reisende",
"costs.liveRate": "Live-Kurs",
"costs.settleAll": "Alle ausgleichen",
};
export default budget;
+3
View File
@@ -298,5 +298,8 @@ const settings: TranslationStrings = {
'settings.notificationPreferences.webhook': 'Webhook',
'settings.notificationPreferences.email': 'Email',
'settings.notificationPreferences.ntfy': 'Ntfy',
"settings.currency": "Währung",
"settings.currencyHint": "Alle Beträge in Costs werden in diese Währung umgerechnet und angezeigt.",
};
export default settings;
+1 -1
View File
@@ -9,7 +9,7 @@ const trip: TranslationStrings = {
'trip.tabs.packingShort': 'Liste',
'trip.tabs.lists': 'Listen',
'trip.tabs.listsShort': 'Listen',
'trip.tabs.budget': 'Budget',
'trip.tabs.budget': "Kosten",
'trip.tabs.files': 'Dateien',
'trip.loading': 'Reise wird geladen...',
'trip.loadingPhotos': 'Fotos der Orte werden geladen...',