From d063b7b1d2d8e0e71e12aab08d2c438626bc643a Mon Sep 17 00:00:00 2001 From: unknown <146806254+Atharva1015@users.noreply.github.com> Date: Fri, 2 Jan 2026 11:01:18 +0530 Subject: [PATCH 1/5] fix: force input text color to black for dark mode visibility --- formulus/src/screens/SettingsScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formulus/src/screens/SettingsScreen.tsx b/formulus/src/screens/SettingsScreen.tsx index eff272af1..e988696a1 100644 --- a/formulus/src/screens/SettingsScreen.tsx +++ b/formulus/src/screens/SettingsScreen.tsx @@ -449,7 +449,7 @@ const styles = StyleSheet.create({ height: 56, paddingHorizontal: 12, fontSize: 16, - color: colors.neutral[900], + color: '#000000', backgroundColor: 'transparent', }, qrButton: { From 65e7122efeda960947dd925e83c8e9d2ff048ef6 Mon Sep 17 00:00:00 2001 From: unknown <146806254+Atharva1015@users.noreply.github.com> Date: Sat, 3 Jan 2026 12:05:27 +0530 Subject: [PATCH 2/5] style: replaced the hex with design token. --- formulus/src/screens/SettingsScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formulus/src/screens/SettingsScreen.tsx b/formulus/src/screens/SettingsScreen.tsx index e988696a1..ed491a80c 100644 --- a/formulus/src/screens/SettingsScreen.tsx +++ b/formulus/src/screens/SettingsScreen.tsx @@ -449,7 +449,7 @@ const styles = StyleSheet.create({ height: 56, paddingHorizontal: 12, fontSize: 16, - color: '#000000', + color: colors.neutral.black, backgroundColor: 'transparent', }, qrButton: { From b68f5a293d52fb0ffc4246aad583bac515ebff15 Mon Sep 17 00:00:00 2001 From: unknown <146806254+Atharva1015@users.noreply.github.com> Date: Tue, 6 Jan 2026 12:43:53 +0530 Subject: [PATCH 3/5] refactor: use official @ode/tokens package for settings input --- formulus/src/screens/SettingsScreen.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/formulus/src/screens/SettingsScreen.tsx b/formulus/src/screens/SettingsScreen.tsx index b5e851c44..5d01a03be 100644 --- a/formulus/src/screens/SettingsScreen.tsx +++ b/formulus/src/screens/SettingsScreen.tsx @@ -25,6 +25,7 @@ import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; import {ToastService} from '../services/ToastService'; import {serverSwitchService} from '../services/ServerSwitchService'; import {syncService} from '../services/SyncService'; +import { tokens } from '@ode/tokens/dist/react-native/tokens'; type SettingsScreenNavigationProp = BottomTabNavigationProp< MainTabParamList, @@ -450,7 +451,7 @@ const styles = StyleSheet.create({ height: 56, paddingHorizontal: 12, fontSize: 16, - color: colors.neutral.black, + color: tokens.neutral.black, backgroundColor: 'transparent', }, qrButton: { From 947c80bf277207eb24bcd703f8d5de577557ac7b Mon Sep 17 00:00:00 2001 From: unknown <146806254+Atharva1015@users.noreply.github.com> Date: Wed, 7 Jan 2026 00:03:46 +0530 Subject: [PATCH 4/5] refactor: use official @ode/tokens package for settings input --- formulus/src/screens/SettingsScreen.tsx | 73 +++++++++++-------------- 1 file changed, 32 insertions(+), 41 deletions(-) diff --git a/formulus/src/screens/SettingsScreen.tsx b/formulus/src/screens/SettingsScreen.tsx index a70039e7e..5d01a03be 100644 --- a/formulus/src/screens/SettingsScreen.tsx +++ b/formulus/src/screens/SettingsScreen.tsx @@ -15,7 +15,7 @@ import {SafeAreaView} from 'react-native-safe-area-context'; import {useNavigation} from '@react-navigation/native'; import {BottomTabNavigationProp} from '@react-navigation/bottom-tabs'; import * as Keychain from 'react-native-keychain'; -import {login} from '../api/synkronus/Auth'; +import {login, getUserInfo, UserInfo} from '../api/synkronus/Auth'; import {serverConfigService} from '../services/ServerConfigService'; import QRScannerModal from '../components/QRScannerModal'; import {QRSettingsService} from '../services/QRSettingsService'; @@ -41,6 +41,7 @@ const SettingsScreen = () => { const [isLoading, setIsLoading] = useState(true); const [isLoggingIn, setIsLoggingIn] = useState(false); const [showQRScanner, setShowQRScanner] = useState(false); + const [_loggedInUser, setLoggedInUser] = useState(null); useEffect(() => { loadSettings(); @@ -97,7 +98,7 @@ const SettingsScreen = () => { ? [ { text: 'Cancel', - style: 'cancel' as const, + style: 'cancel', onPress: () => { setServerUrl(initialServerUrl); resolve(false); @@ -105,7 +106,7 @@ const SettingsScreen = () => { }, { text: 'Proceed without syncing', - style: 'destructive' as const, + style: 'destructive', onPress: () => { (async () => { try { @@ -138,7 +139,7 @@ const SettingsScreen = () => { : [ { text: 'Cancel', - style: 'cancel' as const, + style: 'cancel', onPress: () => { setServerUrl(initialServerUrl); resolve(false); @@ -146,7 +147,7 @@ const SettingsScreen = () => { }, { text: 'Yes, wipe & switch', - style: 'destructive' as const, + style: 'destructive', onPress: () => { (async () => { try { @@ -188,6 +189,9 @@ const SettingsScreen = () => { setUsername(credentials.username); setPassword(credentials.password); } + + const userInfo = await getUserInfo(); + setLoggedInUser(userInfo); } catch (error) { console.error('Failed to load settings:', error); } finally { @@ -208,7 +212,8 @@ const SettingsScreen = () => { setIsLoggingIn(true); try { await Keychain.setGenericPassword(username, password); - await login(username, password); + const userInfo = await login(username, password); + setLoggedInUser(userInfo); ToastService.showShort('Successfully logged in!'); navigation.navigate('Home'); } catch (error: any) { @@ -251,7 +256,8 @@ const SettingsScreen = () => { settings.password, ); try { - await login(settings.username, settings.password); + const userInfo = await login(settings.username, settings.password); + setLoggedInUser(userInfo); ToastService.showShort('Successfully logged in!'); navigation.navigate('Home'); } catch (error: any) { @@ -351,36 +357,24 @@ const SettingsScreen = () => { /> - {(() => { - const isFieldsEmpty = - !serverUrl.trim() || !username.trim() || !password.trim(); - const isButtonDisabled = isFieldsEmpty || isLoggingIn; - - return ( - - - - {isLoggingIn ? 'Logging in...' : 'Login'} - - - ); - })()} + + + + {isLoggingIn ? 'Logging in...' : 'Login'} + + Date: Wed, 7 Jan 2026 00:11:23 +0530 Subject: [PATCH 5/5] fix: use correct color token path for input text --- formulus/src/screens/SettingsScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/formulus/src/screens/SettingsScreen.tsx b/formulus/src/screens/SettingsScreen.tsx index 5d01a03be..a25cb2178 100644 --- a/formulus/src/screens/SettingsScreen.tsx +++ b/formulus/src/screens/SettingsScreen.tsx @@ -451,7 +451,7 @@ const styles = StyleSheet.create({ height: 56, paddingHorizontal: 12, fontSize: 16, - color: tokens.neutral.black, + color: tokens.color.neutral.black, backgroundColor: 'transparent', }, qrButton: {