From 7c2ee29433b3cb68bfd457549a0b75591d2cdb1a Mon Sep 17 00:00:00 2001 From: DarynaBb Date: Wed, 18 Nov 2026 13:47:09 +0100 Subject: [PATCH 1/3] feat(app): add onboarding screen with disclaimer --- mobile/assets/images/quitt-icon-vw.svg | 32 +++++ mobile/package-lock.json | 34 +++++ mobile/package.json | 1 + mobile/src/app/_layout.tsx | 26 +++- mobile/src/app/onboarding.tsx | 190 +++++++++++++++++++++++++ mobile/src/context/onboarding.tsx | 42 ++++++ 6 files changed, 322 insertions(+), 3 deletions(-) create mode 100644 mobile/assets/images/quitt-icon-vw.svg create mode 100644 mobile/src/app/onboarding.tsx create mode 100644 mobile/src/context/onboarding.tsx diff --git a/mobile/assets/images/quitt-icon-vw.svg b/mobile/assets/images/quitt-icon-vw.svg new file mode 100644 index 0000000..0a96f6a --- /dev/null +++ b/mobile/assets/images/quitt-icon-vw.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mobile/package-lock.json b/mobile/package-lock.json index 8af3b6f..f5885da 100644 --- a/mobile/package-lock.json +++ b/mobile/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@expo/ui": "~58.0.27", "@expo/vector-icons": "^15.0.2", + "@react-native-async-storage/async-storage": "2.2.0", "expo": "~58.0.23", "expo-constants": "~58.0.15", "expo-device": "~58.0.5", @@ -2611,6 +2612,18 @@ } } }, + "node_modules/@react-native-async-storage/async-storage": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-2.2.0.tgz", + "integrity": "sha512-gvRvjR5JAaUZF8tv2Kcq/Gbt3JHwbKFYfmb445rhOj6NUMx3qPLixmDx5pZAyb9at1bYvJ4/eTUipU5aki45xw==", + "license": "MIT", + "dependencies": { + "merge-options": "^3.0.4" + }, + "peerDependencies": { + "react-native": "^0.0.0-0 || >=0.65 <1.0" + } + }, "node_modules/@react-native-masked-view/masked-view": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@react-native-masked-view/masked-view/-/masked-view-0.3.2.tgz", @@ -7367,6 +7380,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-regex": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", @@ -8208,6 +8230,18 @@ "integrity": "sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q==", "license": "MIT" }, + "node_modules/merge-options": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", + "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==", + "license": "MIT", + "dependencies": { + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", diff --git a/mobile/package.json b/mobile/package.json index 647065a..0bb753c 100644 --- a/mobile/package.json +++ b/mobile/package.json @@ -5,6 +5,7 @@ "dependencies": { "@expo/ui": "~58.0.27", "@expo/vector-icons": "^15.0.2", + "@react-native-async-storage/async-storage": "2.2.0", "expo": "~58.0.23", "expo-constants": "~58.0.15", "expo-device": "~58.0.5", diff --git a/mobile/src/app/_layout.tsx b/mobile/src/app/_layout.tsx index f664743..cfbe2e3 100644 --- a/mobile/src/app/_layout.tsx +++ b/mobile/src/app/_layout.tsx @@ -1,10 +1,30 @@ import { Stack } from 'expo-router'; +import { OnboardingProvider, useOnboarding } from '@/context/onboarding'; + +function RootNavigator() { + const { accepted, isLoading } = useOnboarding(); + + if (isLoading) { + return null; + } -export default function RootLayout() { return ( - - + + + + + + + ); } + +export default function RootLayout() { + return ( + + + + ); +} diff --git a/mobile/src/app/onboarding.tsx b/mobile/src/app/onboarding.tsx new file mode 100644 index 0000000..51cf39e --- /dev/null +++ b/mobile/src/app/onboarding.tsx @@ -0,0 +1,190 @@ +import { View, Text, StyleSheet, Pressable } from 'react-native'; +import { useState } from 'react'; +import { Image } from 'expo-image'; +import { Ionicons } from '@expo/vector-icons'; +import { useOnboarding } from '@/context/onboarding'; + +type Point = { title: string; description: string }; + +const onboardingPoints: Point[] = [ + { + title: 'Quitt sammelt und sortiert', + description: 'Belege fotografieren, Betrag und Kategorie eintragen.', + }, + { + title: 'Quitt erinnert', + description: 'Push-Erinnerungen rechtzeitig vor einer Frist.', + }, + { + title: 'Quitt berät nicht', + description: 'Quitt prüft nicht, ob etwas absetzbar ist, und berechnet keine Erstattung.', + }, +]; + +export default function Onboarding() { + const [accepted, setAccepted] = useState(false); + const { accept } = useOnboarding(); + + const handleStart = async () => { + await accept(); + }; + + return ( + + + + Bevor es losgeht + + + + {onboardingPoints.map((point, index) => ( + + + {index + 1} + + + {point.title} + {point.description} + + + ))} + + + + Fragen zur Steuer? Lohnsteuerhilfeverein oder{' '} + Steuerberatung + + + + + setAccepted(!accepted)} + accessibilityRole="checkbox" + accessibilityState={{ checked: accepted }} + > + + + Ich habe verstanden: Quitt ist keine Steuerberatung. + + + + + Los geht’s + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + paddingTop: 72, + paddingHorizontal: 24, + paddingBottom: 32, + backgroundColor: '#FFFFFF', + gap: 28, + }, + header: { + gap: 20, + }, + logo: { + width: 120, + height: 120, + }, + title: { + fontSize: 28, + lineHeight: 34, + fontWeight: '700', + color: '#18181B', + }, + points: { + gap: 20, + }, + pointRow: { + flexDirection: 'row', + alignItems: 'flex-start', + gap: 14, + }, + pointNumber: { + width: 32, + height: 32, + borderRadius: 16, + borderWidth: 1.5, + borderColor: '#18181B', + alignItems: 'center', + justifyContent: 'center', + }, + pointNumberText: { + fontSize: 14, + fontWeight: '700', + color: '#18181B', + }, + pointTexts: { + flex: 1, + gap: 4, + }, + pointTitle: { + fontSize: 16, + lineHeight: 22, + fontWeight: '600', + color: '#18181B', + }, + pointDescription: { + fontSize: 14, + lineHeight: 20, + color: '#52525B', + }, + help: { + fontSize: 14, + lineHeight: 20, + color: '#52525B', + }, + helpLink: { + fontWeight: '600', + color: '#18181B', + }, + spacer: { + flexGrow: 1, + }, + checkboxRow: { + flexDirection: 'row', + alignItems: 'flex-start', + gap: 12, + minHeight: 44, + padding: 14, + borderWidth: 1.5, + borderColor: '#18181B', + backgroundColor: '#F4F4F5', + }, + checkboxLabel: { + flex: 1, + fontSize: 14, + lineHeight: 20, + fontWeight: '500', + color: '#18181B', + }, + button: { + height: 52, + alignItems: 'center', + justifyContent: 'center', + backgroundColor: '#18181B', + }, + buttonDisabled: { + backgroundColor: '#A1A1AA', + }, + buttonText: { + fontSize: 16, + fontWeight: '600', + color: '#FFFFFF', + }, +}); diff --git a/mobile/src/context/onboarding.tsx b/mobile/src/context/onboarding.tsx new file mode 100644 index 0000000..f72a2bc --- /dev/null +++ b/mobile/src/context/onboarding.tsx @@ -0,0 +1,42 @@ +import AsyncStorage from '@react-native-async-storage/async-storage'; +import { createContext, useContext, useEffect, useState, type ReactNode } from 'react'; + +const STORAGE_KEY = 'onboardingAccepted'; + +type OnboardingContextValue = { + accepted: boolean; + isLoading: boolean; + accept: () => Promise; +}; + +const OnboardingContext = createContext(null); + +export function OnboardingProvider({ children }: { children: ReactNode }) { + const [accepted, setAccepted] = useState(false); + const [isLoading, setIsLoading] = useState(true); + + useEffect(() => { + AsyncStorage.getItem(STORAGE_KEY) + .then((value) => setAccepted(value === 'true')) + .finally(() => setIsLoading(false)); + }, []); + + const accept = async () => { + await AsyncStorage.setItem(STORAGE_KEY, 'true'); + setAccepted(true); + }; + + return ( + + {children} + + ); +} + +export function useOnboarding() { + const context = useContext(OnboardingContext); + if (!context) { + throw new Error('useOnboarding must be used inside OnboardingProvider'); + } + return context; +} From 7be1ea92a5b5adca0337e504d1055343ada67127 Mon Sep 17 00:00:00 2001 From: DarynaBb Date: Wed, 18 Nov 2026 13:59:42 +0100 Subject: [PATCH 2/3] steuerberatung link added --- mobile/src/app/onboarding.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/mobile/src/app/onboarding.tsx b/mobile/src/app/onboarding.tsx index 51cf39e..05bb50c 100644 --- a/mobile/src/app/onboarding.tsx +++ b/mobile/src/app/onboarding.tsx @@ -1,4 +1,4 @@ -import { View, Text, StyleSheet, Pressable } from 'react-native'; +import { Linking, View, Text, StyleSheet, Pressable } from 'react-native'; import { useState } from 'react'; import { Image } from 'expo-image'; import { Ionicons } from '@expo/vector-icons'; @@ -6,6 +6,8 @@ import { useOnboarding } from '@/context/onboarding'; type Point = { title: string; description: string }; +const STEUERBERATER_URL = 'https://steuerberaterverzeichnis.berufs-org.de/'; + const onboardingPoints: Point[] = [ { title: 'Quitt sammelt und sortiert', @@ -55,8 +57,14 @@ export default function Onboarding() { - Fragen zur Steuer? Lohnsteuerhilfeverein oder{' '} - Steuerberatung + Fragen zur Steuer?{' '} + Linking.openURL(STEUERBERATER_URL)} + > + Steuerberatung + From 65caa8c51206e7878bdee52495263bc03912ec3c Mon Sep 17 00:00:00 2001 From: DarynaBb Date: Thu, 19 Nov 2026 10:23:05 +0100 Subject: [PATCH 3/3] fix(app): handle safe area and storage errors in onboarding --- mobile/src/app/onboarding.tsx | 8 +++++--- mobile/src/context/onboarding.tsx | 13 +++++++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/mobile/src/app/onboarding.tsx b/mobile/src/app/onboarding.tsx index 05bb50c..8258d44 100644 --- a/mobile/src/app/onboarding.tsx +++ b/mobile/src/app/onboarding.tsx @@ -3,6 +3,7 @@ import { useState } from 'react'; import { Image } from 'expo-image'; import { Ionicons } from '@expo/vector-icons'; import { useOnboarding } from '@/context/onboarding'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; type Point = { title: string; description: string }; @@ -26,13 +27,16 @@ const onboardingPoints: Point[] = [ export default function Onboarding() { const [accepted, setAccepted] = useState(false); const { accept } = useOnboarding(); + const insets = useSafeAreaInsets(); const handleStart = async () => { await accept(); }; return ( - + { AsyncStorage.getItem(STORAGE_KEY) .then((value) => setAccepted(value === 'true')) + .catch((error) => { + console.warn('Failed to read onboarding flag', error); + setAccepted(false); + }) .finally(() => setIsLoading(false)); }, []); const accept = async () => { - await AsyncStorage.setItem(STORAGE_KEY, 'true'); - setAccepted(true); + try { + await AsyncStorage.setItem(STORAGE_KEY, 'true'); + } catch (error) { + console.warn('Failed to save onboarding flag', error); + } finally { + setAccepted(true); + } }; return (