{copy().householdSettingsBody}
-diff --git a/apps/miniapp/src/App.tsx b/apps/miniapp/src/App.tsx index 7398343..495b8a6 100644 --- a/apps/miniapp/src/App.tsx +++ b/apps/miniapp/src/App.tsx @@ -1,4 +1,4 @@ -import { Match, Show, Switch, createMemo, createSignal, onMount } from 'solid-js' +import { Match, Switch, createMemo, createSignal, onMount } from 'solid-js' import { dictionary, type Locale } from './i18n' import { @@ -35,7 +35,7 @@ import { type MiniAppDashboard, type MiniAppPendingMember } from './miniapp-api' -import { Button, Field, IconButton, Modal } from './components/ui' +import { Button, Field, Modal } from './components/ui' import { HeroBanner } from './components/layout/hero-banner' import { NavigationTabs } from './components/layout/navigation-tabs' import { ProfileCard } from './components/layout/profile-card' @@ -45,6 +45,7 @@ import { LoadingState } from './components/session/loading-state' import { OnboardingState } from './components/session/onboarding-state' import { BalancesScreen } from './screens/balances-screen' import { HomeScreen } from './screens/home-screen' +import { HouseScreen } from './screens/house-screen' import { LedgerScreen } from './screens/ledger-screen' import { demoAdminSettings, @@ -1996,1094 +1997,268 @@ function App() { /> ) case 'house': - return readySession()?.member.isAdmin ? ( -
{copy().householdSettingsBody}
-{copy().billingSettingsTitle}
-- {cycleState()?.cycle - ? copy().billingCycleStatus.replace( - '{currency}', - cycleState()?.cycle?.currency ?? billingForm().settlementCurrency - ) - : copy().billingCycleOpenHint} -
-- {copy().shareRent}: {data().rentSourceAmountMajor}{' '} - {data().rentSourceCurrency} - {data().rentSourceCurrency !== data().currency - ? ` -> ${data().rentDisplayAmountMajor} ${data().currency}` - : ''} -
- )} -- {billingForm().paymentBalanceAdjustmentPolicy === 'utilities' - ? copy().paymentBalanceAdjustmentUtilities - : billingForm().paymentBalanceAdjustmentPolicy === 'rent' - ? copy().paymentBalanceAdjustmentRent - : copy().paymentBalanceAdjustmentSeparate} -
- - -{copy().householdSettingsBody}
- -{copy().utilityCategoriesBody}
-{copy().utilityBillsEditorBody}
- -{copy().utilityCategoryName}
- -{copy().utilityBillsEmpty}
- )} -{copy().utilityCategoriesBody}
- -{copy().utilityCategoryName}
- -{copy().adminsBody}
-{memberStatusLabel(member.status)}
- -{copy().pendingMembersBody}
- {pendingMembers().length === 0 ? ( -{copy().pendingMembersEmpty}
- ) : ( -- {member.username - ? copy().pendingMemberHandle.replace('{username}', member.username) - : (member.languageCode ?? 'Telegram')} -
- -{copy().topicBindingsBody}
-- {binding - ? `${binding.topicName ?? `Topic #${binding.telegramThreadId}`} · #${binding.telegramThreadId}` - : copy().topicUnbound} -
-{copy().residentHouseBody}
-{props.copy.residentHouseBody ?? ''}
+{props.copy.householdSettingsBody ?? ''}
+{props.copy.billingSettingsTitle ?? ''}
++ {props.cycleState?.cycle + ? (props.copy.billingCycleStatus ?? '').replace( + '{currency}', + props.cycleState?.cycle?.currency ?? props.billingForm.settlementCurrency + ) + : props.copy.billingCycleOpenHint} +
++ {props.copy.shareRent ?? ''}: {data().rentSourceAmountMajor}{' '} + {data().rentSourceCurrency} + {data().rentSourceCurrency !== data().currency + ? ` -> ${data().rentDisplayAmountMajor} ${data().currency}` + : ''} +
+ )} ++ {props.billingForm.paymentBalanceAdjustmentPolicy === 'utilities' + ? props.copy.paymentBalanceAdjustmentUtilities + : props.billingForm.paymentBalanceAdjustmentPolicy === 'rent' + ? props.copy.paymentBalanceAdjustmentRent + : props.copy.paymentBalanceAdjustmentSeparate} +
+ + +{props.copy.householdSettingsBody ?? ''}
+ +{props.copy.utilityCategoriesBody ?? ''}
+{props.copy.utilityBillsEditorBody ?? ''}
+ +{props.copy.utilityCategoryName ?? ''}
+ +{props.copy.utilityBillsEmpty ?? ''}
+ )} +{props.copy.utilityCategoriesBody ?? ''}
+ +{props.copy.utilityCategoryName ?? ''}
+ +{props.copy.adminsBody ?? ''}
+{props.memberStatusLabel(member.status)}
+ +{props.copy.pendingMembersBody ?? ''}
+ {props.pendingMembers.length === 0 ? ( +{props.copy.pendingMembersEmpty ?? ''}
+ ) : ( ++ {member.username + ? (props.copy.pendingMemberHandle ?? '').replace( + '{username}', + member.username + ) + : (member.languageCode ?? 'Telegram')} +
+ +{props.copy.topicBindingsBody ?? ''}
++ {binding + ? `${binding.topicName ?? `Topic #${binding.telegramThreadId}`} · #${binding.telegramThreadId}` + : props.copy.topicUnbound} +
+