weitere perfektionierung der neuen mobile app

This commit is contained in:
Codex Agent
2025-12-11 12:18:08 +01:00
parent 7b01a77083
commit b4417db5cd
38 changed files with 4265 additions and 3040 deletions

View File

@@ -18,17 +18,6 @@ import { adminPath } from '../constants';
type PreferenceKey = keyof NotificationPreferences;
const PREFERENCE_LABELS: Record<PreferenceKey, string> = {
task_updates: 'Task updates',
photo_limits: 'Photo limits',
photo_thresholds: 'Photo thresholds',
guest_limits: 'Guest limits',
guest_thresholds: 'Guest thresholds',
purchase_limits: 'Purchase limits',
billing: 'Billing & invoices',
alerts: 'Alerts',
};
export default function MobileSettingsPage() {
const { t } = useTranslation('management');
const navigate = useNavigate();
@@ -79,7 +68,7 @@ export default function MobileSettingsPage() {
};
return (
<MobileShell activeTab="profile" title={t('settings.title', 'Einstellungen')} onBack={() => navigate(-1)}>
<MobileShell activeTab="profile" title={t('mobileSettings.title', 'Settings')} onBack={() => navigate(-1)}>
{error ? (
<MobileCard>
<Text fontWeight="700" color="#b91c1c">
@@ -92,14 +81,14 @@ export default function MobileSettingsPage() {
<XStack alignItems="center" space="$2">
<Shield size={18} color="#0f172a" />
<Text fontSize="$md" fontWeight="800" color="#0f172a">
{t('settings.session.title', 'Account')}
{t('mobileSettings.accountTitle', 'Account')}
</Text>
</XStack>
<Text fontSize="$sm" color="#4b5563">
{user?.name ?? user?.email ?? t('settings.session.unknown', 'Benutzer')}
</Text>
{user?.tenant_id ? (
<PillBadge tone="muted">Tenant #{user.tenant_id}</PillBadge>
<PillBadge tone="muted">{t('mobileSettings.tenantBadge', 'Tenant #{{id}}', { id: user.tenant_id })}</PillBadge>
) : null}
<XStack space="$2">
<CTAButton label={t('settings.profile.actions.openProfile', 'Profil bearbeiten')} onPress={() => navigate(adminPath('/mobile/profile'))} />
@@ -111,21 +100,21 @@ export default function MobileSettingsPage() {
<XStack alignItems="center" space="$2">
<Bell size={18} color="#0f172a" />
<Text fontSize="$md" fontWeight="800" color="#0f172a">
{t('settings.notifications.title', 'Benachrichtigungen')}
{t('mobileSettings.notificationsTitle', 'Notifications')}
</Text>
</XStack>
{loading ? (
<Text fontSize="$sm" color="#6b7280">
{t('settings.notifications.loading', 'Lade Einstellungen ...')}
{t('mobileSettings.notificationsLoading', 'Loading settings ...')}
</Text>
) : (
<YStack space="$2">
{Object.keys(PREFERENCE_LABELS).map((key) => {
{(['task_updates','photo_limits','photo_thresholds','guest_limits','guest_thresholds','purchase_limits','billing','alerts'] as PreferenceKey[]).map((key) => {
const prefKey = key as PreferenceKey;
return (
<XStack key={prefKey} alignItems="center" justifyContent="space-between" borderBottomWidth={1} borderColor="#e5e7eb" paddingBottom="$2" paddingTop="$1.5">
<Text fontSize="$sm" color="#0f172a">
{PREFERENCE_LABELS[prefKey]}
{t(`mobileSettings.pref.${prefKey}`, prefKey)}
</Text>
<input
type="checkbox"