Skip to content

Commit 610a263

Browse files
committed
v1.0.3: Remove Google Sign-in and add dynamic tab bar adjustment
1 parent e88ade0 commit 610a263

8 files changed

Lines changed: 111 additions & 15 deletions

File tree

SpendWise-v1.0.2.apk

79.9 MB
Binary file not shown.

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"expo": {
33
"name": "SpendWise",
44
"slug": "spendwise-native",
5-
"version": "1.0.1",
5+
"version": "1.0.3",
66
"orientation": "portrait",
77
"icon": "./assets/images/icon.png",
88
"scheme": "spendwise",

app/(auth)/login.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ import {
1111
Platform,
1212
Alert,
1313
ActivityIndicator,
14+
Image,
1415
} from 'react-native';
1516
import { Colors } from '../../constants/app';
1617
import { signIn, signUp, resetPassword } from '../../lib/auth';
18+
import FontAwesome from '@expo/vector-icons/FontAwesome';
1719

1820
export default function LoginScreen() {
1921
const colorScheme = useColorScheme();
@@ -55,6 +57,8 @@ export default function LoginScreen() {
5557
}
5658
};
5759

60+
61+
5862
const handleForgotPassword = async () => {
5963
if (!email) {
6064
Alert.alert('Error', 'Please enter your email address');
@@ -90,6 +94,8 @@ export default function LoginScreen() {
9094
{isLogin ? 'Welcome Back' : 'Create Account'}
9195
</Text>
9296

97+
98+
9399
<TextInput
94100
style={[styles.input, { backgroundColor: theme.background, color: theme.text, borderColor: theme.border }]}
95101
placeholder="Email"
@@ -193,6 +199,7 @@ const styles = StyleSheet.create({
193199
textAlign: 'center',
194200
marginBottom: 24,
195201
},
202+
196203
input: {
197204
borderWidth: 1,
198205
borderRadius: 12,

app/(tabs)/_layout.tsx

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React from 'react';
22
import FontAwesome from '@expo/vector-icons/FontAwesome';
3-
import { Tabs } from 'expo-router';
3+
import { Tabs, useRouter } from 'expo-router';
4+
import { TouchableOpacity } from 'react-native';
5+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
46
import { Colors } from '../../constants/app';
57

68
function TabBarIcon(props: {
@@ -12,6 +14,14 @@ function TabBarIcon(props: {
1214

1315
export default function TabLayout() {
1416
const theme = Colors.dark;
17+
const router = useRouter();
18+
const insets = useSafeAreaInsets();
19+
20+
// Calculate dynamic tab bar height based on safe area bottom inset
21+
// If bottom inset is 0, device has navigation buttons (add more padding)
22+
// If bottom inset > 0, device has gesture navigation (less padding needed)
23+
const tabBarHeight = 60 + insets.bottom;
24+
const tabBarPaddingBottom = insets.bottom > 0 ? insets.bottom : 16;
1525

1626
return (
1727
<Tabs
@@ -22,8 +32,8 @@ export default function TabLayout() {
2232
backgroundColor: 'rgba(24, 24, 27, 0.95)',
2333
borderTopColor: '#27272a',
2434
borderTopWidth: 1,
25-
height: 70,
26-
paddingBottom: 16,
35+
height: tabBarHeight,
36+
paddingBottom: tabBarPaddingBottom,
2737
paddingTop: 10,
2838
position: 'absolute',
2939
elevation: 0,
@@ -43,6 +53,14 @@ export default function TabLayout() {
4353
headerTitleStyle: {
4454
fontWeight: '600',
4555
},
56+
headerRight: () => (
57+
<TouchableOpacity
58+
onPress={() => router.push('/(tabs)/settings')}
59+
style={{ marginRight: 16 }}
60+
>
61+
<FontAwesome name="cog" size={22} color={theme.textSecondary} />
62+
</TouchableOpacity>
63+
),
4664
}}>
4765
<Tabs.Screen
4866
name="index"
@@ -59,10 +77,10 @@ export default function TabLayout() {
5977
}}
6078
/>
6179
<Tabs.Screen
62-
name="insights"
80+
name="budget"
6381
options={{
64-
title: 'AI Insights',
65-
tabBarIcon: ({ color }) => <TabBarIcon name="magic" color={color} />,
82+
title: 'Budget',
83+
tabBarIcon: ({ color }) => <TabBarIcon name="pie-chart" color={color} />,
6684
}}
6785
/>
6886
<Tabs.Screen
@@ -73,24 +91,25 @@ export default function TabLayout() {
7391
}}
7492
/>
7593
<Tabs.Screen
76-
name="budget"
94+
name="goals"
7795
options={{
78-
title: 'Budget',
79-
tabBarIcon: ({ color }) => <TabBarIcon name="pie-chart" color={color} />,
96+
title: 'Goals',
97+
tabBarIcon: ({ color }) => <TabBarIcon name="bullseye" color={color} />,
8098
}}
8199
/>
100+
{/* Hidden tabs - accessible from Settings */}
82101
<Tabs.Screen
83-
name="goals"
102+
name="insights"
84103
options={{
85-
title: 'Goals',
86-
tabBarIcon: ({ color }) => <TabBarIcon name="bullseye" color={color} />,
104+
href: null, // Hide from tab bar
105+
title: 'AI Insights',
87106
}}
88107
/>
89108
<Tabs.Screen
90109
name="settings"
91110
options={{
111+
href: null, // Hide from tab bar
92112
title: 'Settings',
93-
tabBarIcon: ({ color }) => <TabBarIcon name="cog" color={color} />,
94113
}}
95114
/>
96115
</Tabs>

app/(tabs)/settings.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// Settings Screen with Notification Controls
22
import React, { useState, useEffect } from 'react';
33
import { StyleSheet, View, Text, ScrollView, useColorScheme, TouchableOpacity, Switch, Alert, Modal, Linking } from 'react-native';
4+
import { useRouter } from 'expo-router';
45
import { useApp } from '../../context/AppContext';
56
import { Colors, SUPPORTED_CURRENCIES } from '../../constants/app';
7+
import FontAwesome from '@expo/vector-icons/FontAwesome';
68
import {
79
requestNotificationPermission,
810
scheduleDailyReminder,
@@ -14,6 +16,7 @@ import {
1416
export default function SettingsScreen() {
1517
const colorScheme = useColorScheme();
1618
const theme = Colors[colorScheme === 'dark' ? 'dark' : 'light'];
19+
const router = useRouter();
1720
const { user, darkMode, setDarkMode, currency, setCurrency, handleLogout, resetData, transactions, budgets, goals } = useApp();
1821

1922
const [currencyModalVisible, setCurrencyModalVisible] = useState(false);
@@ -137,6 +140,25 @@ export default function SettingsScreen() {
137140
</View>
138141
</View>
139142

143+
{/* Quick Access */}
144+
<View style={[styles.section, { backgroundColor: theme.card }]}>
145+
<Text style={[styles.sectionTitle, { color: theme.text }]}>🚀 Quick Access</Text>
146+
147+
<TouchableOpacity
148+
style={[styles.quickAccessButton, { backgroundColor: theme.primary + '15' }]}
149+
onPress={() => router.push('/(tabs)/insights')}
150+
>
151+
<View style={[styles.quickAccessIcon, { backgroundColor: theme.primary + '20' }]}>
152+
<FontAwesome name="magic" size={20} color={theme.primary} />
153+
</View>
154+
<View style={styles.quickAccessContent}>
155+
<Text style={[styles.quickAccessTitle, { color: theme.text }]}>AI Insights</Text>
156+
<Text style={[styles.quickAccessDesc, { color: theme.textSecondary }]}>Get personalized financial advice</Text>
157+
</View>
158+
<FontAwesome name="chevron-right" size={16} color={theme.textSecondary} />
159+
</TouchableOpacity>
160+
</View>
161+
140162
{/* Notifications */}
141163
<View style={[styles.section, { backgroundColor: theme.card }]}>
142164
<Text style={[styles.sectionTitle, { color: theme.text }]}>🔔 Notifications</Text>
@@ -335,4 +357,9 @@ const styles = StyleSheet.create({
335357
checkmark: { fontSize: 18, color: '#10b981' },
336358
closeButton: { borderWidth: 1, borderRadius: 12, padding: 14, alignItems: 'center', marginTop: 12 },
337359
closeButtonText: { fontWeight: '500' },
360+
quickAccessButton: { flexDirection: 'row', alignItems: 'center', padding: 16, borderRadius: 12, gap: 12 },
361+
quickAccessIcon: { width: 44, height: 44, borderRadius: 12, justifyContent: 'center', alignItems: 'center' },
362+
quickAccessContent: { flex: 1 },
363+
quickAccessTitle: { fontSize: 16, fontWeight: '600' },
364+
quickAccessDesc: { fontSize: 12, marginTop: 2 },
338365
});

lib/auth.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import {
1111

1212
export { auth };
1313

14+
15+
1416
export const signUp = async (email: string, password: string): Promise<User> => {
1517
const userCredential = await createUserWithEmailAndPassword(auth, email, password);
1618
await sendEmailVerification(userCredential.user);
@@ -22,10 +24,13 @@ export const signIn = async (email: string, password: string): Promise<User> =>
2224
return userCredential.user;
2325
};
2426

27+
28+
2529
export const logout = async (): Promise<void> => {
2630
await signOut(auth);
2731
};
2832

2933
export const resetPassword = async (email: string): Promise<void> => {
3034
await sendPasswordResetEmail(auth, email);
3135
};
36+

package-lock.json

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
"@react-native-async-storage/async-storage": "^1.24.0",
1414
"@react-navigation/native": "^7.1.8",
1515
"expo": "~54.0.27",
16+
"expo-auth-session": "^7.0.10",
1617
"expo-constants": "~18.0.11",
18+
"expo-crypto": "^15.0.8",
1719
"expo-font": "~14.0.10",
1820
"expo-linking": "~8.0.10",
1921
"expo-notifications": "^0.32.14",
@@ -39,4 +41,4 @@
3941
"typescript": "~5.9.2"
4042
},
4143
"private": true
42-
}
44+
}

0 commit comments

Comments
 (0)