Skip to content

Commit 0741848

Browse files
committed
feat(ui): disable IPFS method, simplify filters, replace theme switch with picker, tweak typography & add Elevation
1 parent 88d55b2 commit 0741848

File tree

4 files changed

+91
-74
lines changed

4 files changed

+91
-74
lines changed

app/auth.tsx

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import { LinearGradient } from 'expo-linear-gradient';
77
import { router } from 'expo-router';
88
import React, { useState } from 'react';
99
import {
10-
Alert,
11-
KeyboardAvoidingView,
12-
Platform,
13-
ScrollView,
14-
StyleSheet,
15-
Text,
16-
TextInput,
17-
TouchableOpacity,
18-
View,
10+
Alert,
11+
KeyboardAvoidingView,
12+
Platform,
13+
ScrollView,
14+
StyleSheet,
15+
Text,
16+
TextInput,
17+
TouchableOpacity,
18+
View,
1919
} from 'react-native';
2020

2121
type AuthMethod = StorageBackendType;
@@ -152,22 +152,21 @@ export default function AuthScreen() {
152152
</Text>
153153
</TouchableOpacity>
154154

155-
<TouchableOpacity
155+
<View
156156
style={[
157157
styles.methodButton,
158158
styles.disabledMethodButton,
159-
activeMethod === 'ipfs' && styles.activeMethodButton,
159+
{ opacity: 0.5 },
160160
]}
161-
onPress={() => setActiveMethod('ipfs')}
162161
>
163162
<View style={styles.methodButtonContent}>
164-
<IconSymbol name="globe" size={18} color={activeMethod === 'ipfs' ? '#FFFFFF' : '#6B7280'} />
165-
<Text style={[styles.methodText, activeMethod === 'ipfs' && styles.activeMethodText]}>IPFS</Text>
163+
<IconSymbol name="globe" size={18} color="#6B7280" />
164+
<Text style={styles.methodText}>IPFS</Text>
166165
</View>
167166
<View style={styles.soonBadge}>
168167
<Text style={styles.soonText}>Soon</Text>
169168
</View>
170-
</TouchableOpacity>
169+
</View>
171170
</View>
172171

173172
<View style={styles.formContainer}>

app/index.tsx

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
import { NoteCard } from '@/components/NoteCard';
22
import { IconSymbol } from '@/components/ui/IconSymbol';
33
import {
4-
getThemeColors,
5-
Animations,
6-
Colors,
7-
Spacing,
8-
createTextStyle,
9-
Typography,
10-
BorderRadius,
11-
Shadows,
4+
Animations,
5+
BorderRadius,
6+
Colors,
7+
createTextStyle,
8+
getThemeColors,
9+
Shadows,
10+
Spacing,
11+
Typography,
1212
} from '@/constants/DesignSystem';
1313
import { useStorage } from '@/contexts/StorageContext';
1414
import { useTheme } from '@/contexts/ThemeContext';
1515
import type { Note } from '@/types/storage';
1616
import { useRouter } from 'expo-router';
1717
import React, { useEffect, useRef, useState } from 'react';
1818
import {
19-
Alert,
20-
Animated,
21-
FlatList,
22-
StatusBar,
23-
StyleSheet,
24-
Text,
25-
TextInput,
26-
TouchableOpacity,
27-
View,
19+
Alert,
20+
Animated,
21+
FlatList,
22+
StatusBar,
23+
StyleSheet,
24+
Text,
25+
TextInput,
26+
TouchableOpacity,
27+
View,
2828
} from 'react-native';
2929
import { SafeAreaView } from 'react-native-safe-area-context';
3030

@@ -182,9 +182,8 @@ export default function HomeScreen() {
182182

183183
{/* Filter Tabs - Minimal */}
184184
<View style={styles.filterTabs}>
185-
{['All', 'Recent', 'Favorites'].map(filter => {
185+
{['All'].map(filter => {
186186
const isActive = activeFilter === filter;
187-
const isComingSoon = filter === 'Recent' || filter === 'Favorites';
188187
return (
189188
<TouchableOpacity
190189
key={filter}
@@ -193,16 +192,8 @@ export default function HomeScreen() {
193192
{
194193
backgroundColor: isActive ? (isDark ? colors.text.primary : colors.text.primary) : 'transparent',
195194
},
196-
isComingSoon && styles.disabledFilterTab,
197195
]}
198-
onPress={() => {
199-
if (isComingSoon) {
200-
Alert.alert('Coming Soon', `${filter} filter will be available soon!`);
201-
} else {
202-
setActiveFilter(filter);
203-
}
204-
}}
205-
disabled={isComingSoon && isActive}
196+
onPress={() => setActiveFilter(filter)}
206197
>
207198
<Text
208199
style={[
@@ -218,11 +209,6 @@ export default function HomeScreen() {
218209
>
219210
{filter}
220211
</Text>
221-
{isComingSoon && (
222-
<View style={styles.soonBadgeSmall}>
223-
<Text style={styles.soonTextSmall}>Soon</Text>
224-
</View>
225-
)}
226212
</TouchableOpacity>
227213
);
228214
})}

app/settings.tsx

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useTheme } from '@/contexts/ThemeContext';
55
import Constants from 'expo-constants';
66
import { router } from 'expo-router';
77
import React, { useState } from 'react';
8-
import { Alert, ScrollView, StatusBar, StyleSheet, Switch, Text, TouchableOpacity, View } from 'react-native';
8+
import { Alert, ScrollView, StatusBar, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
99
import { SafeAreaView } from 'react-native-safe-area-context';
1010

1111
interface SettingItemProps {
@@ -161,23 +161,22 @@ export default function SettingsScreen() {
161161
<Text style={[styles.sectionTitle, { color: colors.text.tertiary }]}>APPEARANCE</Text>
162162
<View style={styles.sectionContent}>
163163
<SettingItem
164-
icon={'moon' as any}
165-
title="Dark Mode"
166-
subtitle={theme === 'system' ? 'Following system theme' : 'Toggle dark theme'}
164+
icon={'circle.lefthalf.filled' as any}
165+
title="Theme"
166+
subtitle={theme === 'system' ? 'Following system' : theme === 'dark' ? 'Dark' : 'Light'}
167167
colors={colors}
168-
rightElement={
169-
<Switch
170-
value={theme === 'dark' || (theme === 'system' && isDark)}
171-
onValueChange={handleThemeChange}
172-
trackColor={{
173-
false: isDark ? Colors.neutral.gray700 : Colors.neutral.gray300,
174-
true: Colors.primary.purple,
175-
}}
176-
thumbColor={isDark ? Colors.neutral.white : Colors.neutral.white}
177-
ios_backgroundColor={isDark ? Colors.neutral.gray700 : Colors.neutral.gray300}
178-
/>
179-
}
180-
showChevron={false}
168+
onPress={() => {
169+
Alert.alert(
170+
'Theme',
171+
'Choose your preferred theme',
172+
[
173+
{ text: 'Light', onPress: () => setTheme('light') },
174+
{ text: 'Dark', onPress: () => setTheme('dark') },
175+
{ text: 'System', onPress: () => setTheme('system') },
176+
{ text: 'Cancel', style: 'cancel' },
177+
]
178+
);
179+
}}
181180
/>
182181
</View>
183182
</View>

constants/DesignSystem.ts

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ export const Typography = {
145145

146146
// Font Sizes
147147
sizes: {
148-
xs: 10,
149-
sm: 12,
150-
base: 14,
151-
md: 16,
152-
lg: 18,
153-
xl: 20,
148+
xs: 11,
149+
sm: 13,
150+
base: 16,
151+
md: 17,
152+
lg: 19,
153+
xl: 21,
154154
'2xl': 24,
155155
'3xl': 28,
156156
'4xl': 32,
@@ -160,9 +160,9 @@ export const Typography = {
160160

161161
// Line Heights
162162
lineHeights: {
163-
tight: 1.2,
164-
normal: 1.5,
165-
relaxed: 1.75,
163+
tight: 1.25,
164+
normal: 1.6,
165+
relaxed: 1.8,
166166
},
167167

168168
// Letter Spacing
@@ -189,6 +189,39 @@ export const Spacing = {
189189
'6xl': 80,
190190
};
191191

192+
// === ELEVATION ===
193+
// Semantic elevation levels for layered surfaces
194+
export const Elevation = {
195+
flat: {
196+
shadowColor: '#000',
197+
shadowOffset: { width: 0, height: 0 },
198+
shadowOpacity: 0,
199+
shadowRadius: 0,
200+
elevation: 0,
201+
},
202+
card: {
203+
shadowColor: '#000',
204+
shadowOffset: { width: 0, height: 2 },
205+
shadowOpacity: 0.08,
206+
shadowRadius: 8,
207+
elevation: 2,
208+
},
209+
modal: {
210+
shadowColor: '#000',
211+
shadowOffset: { width: 0, height: 8 },
212+
shadowOpacity: 0.12,
213+
shadowRadius: 24,
214+
elevation: 8,
215+
},
216+
float: {
217+
shadowColor: '#000',
218+
shadowOffset: { width: 0, height: 4 },
219+
shadowOpacity: 0.1,
220+
shadowRadius: 16,
221+
elevation: 4,
222+
},
223+
};
224+
192225
// === BORDER RADIUS ===
193226
// Enhanced with modern rounded values
194227
export const BorderRadius = {

0 commit comments

Comments
 (0)