Skip to content

Commit 505468a

Browse files
authored
various updates (#4243)
1 parent bdfc79a commit 505468a

13 files changed

+156
-68
lines changed

packages/app-mobile/src/Images.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const Images = {
77
logoEthereum: require("./images/logo-ethereum.png"),
88
logoPolygon: require("./images/logo-polygon.png"),
99
logoSolana: require("./images/logo-solana.png"),
10+
walletListEthereum: require("./images/wallet-list-ethereum.png"),
11+
walletListSolana: require("./images/wallet-list-solana.png"),
1012
};
1113

1214
export default Images;

packages/app-mobile/src/components/BottomSheetViewOptions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ export function BottomSheetViewOptions({
3131
return (
3232
<>
3333
<HeaderDropdownButton
34+
tintColor={tintColor}
3435
onPress={() => {
3536
setIsVisible(!isVisible);
3637
}}
37-
tintColor={tintColor}
3838
>
3939
{title}
4040
</HeaderDropdownButton>

packages/app-mobile/src/components/UserAvatar.tsx

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ export function UserAvatar({
2626
const [type, setType] = useState<string | undefined>(undefined);
2727
const width = size;
2828
const height = size;
29-
const proxiedUri = proxyImageUrl(uri, size);
3029
// we do this bc fetching a 1x1 image is faster than fetching a 32x32 image, etc
3130
const smallUri = proxyImageUrl(uri, 1);
31+
const proxiedUri = proxyImageUrl(uri, size);
3232

3333
useEffect(() => {
3434
if (cache.has(smallUri)) {
@@ -52,7 +52,7 @@ export function UserAvatar({
5252
if (type === "image/svg+xml") {
5353
return (
5454
<View style={[styles.container, { width, height }]}>
55-
<SvgUri width={width} height={height} uri={`${smallUri}.svg`} />
55+
<SvgUri width={width} height={height} uri={`${proxiedUri}.svg`} />
5656
</View>
5757
);
5858
}
@@ -76,7 +76,7 @@ const styles = StyleSheet.create({
7676
container: {
7777
aspectRatio: 1,
7878
borderRadius: 100,
79-
backgroundColor: "gray",
79+
backgroundColor: "#FFF",
8080
overflow: "hidden",
8181
},
8282
});
@@ -89,22 +89,7 @@ export function Avatar({
8989
username?: string;
9090
}): JSX.Element {
9191
const avatarUrl = useAvatarUrl(size, username);
92-
const theme = useTheme();
93-
const outerSize = size + 6;
94-
95-
return (
96-
<View
97-
style={{
98-
backgroundColor: theme.custom.colors.avatarIconBackground,
99-
borderRadius: outerSize / 2,
100-
padding: 3,
101-
width: outerSize,
102-
height: outerSize,
103-
}}
104-
>
105-
<UserAvatar size={size} uri={avatarUrl} />
106-
</View>
107-
);
92+
return <UserAvatar size={size} uri={avatarUrl} />;
10893
}
10994

11095
export const CurrentUserAvatar = ({ size = 64 }: { size?: number }) => (

packages/app-mobile/src/components/WalletSwitcherButton.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,26 @@ export function WalletSwitcherButton(): JSX.Element {
2929
}}
3030
style={{
3131
borderRadius: 32,
32-
borderWidth: 2,
32+
borderWidth: 1,
3333
backgroundColor: theme.nav.val,
3434
borderColor: theme.borderFull.val,
35+
36+
shadowColor: "rgba(0, 0, 0, 1)",
37+
shadowOffset: {
38+
width: 0,
39+
height: 1,
40+
},
41+
shadowOpacity: 0.06,
42+
shadowRadius: 1,
43+
elevation: 2,
3544
}}
3645
>
37-
<XStack space={8} ai="center" py={8} px={18}>
46+
<XStack space={8} ai="center" py={8} pl={18} pr={12}>
3847
<BlockchainLogo blockchain={activeWallet!.blockchain} size={16} />
39-
<StyledText fontSize="$base" color="$fontColor" mr={-6}>
48+
<StyledText fontSize="$base" color="$baseTextMedEmphasis" mr={-6}>
4049
{activeWallet?.name}
4150
</StyledText>
42-
<IconDropdown size={22} color="$fontColor" />
51+
<IconDropdown size={22} color="#8E919F" />
4352
</XStack>
4453
</Pressable>
4554
<BetterBottomSheet
734 Bytes
Loading
623 Bytes
Loading

packages/app-mobile/src/navigation/GlobalDrawerContent.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
} from "@coral-xyz/tamagui";
1919
import { MaterialIcons } from "@expo/vector-icons";
2020
import { DrawerItemList } from "@react-navigation/drawer";
21+
import { useNavigation } from "@react-navigation/native";
2122
import { FlatList } from "react-native-gesture-handler";
2223

2324
import { UserAccountListItem } from "~components/ListItem";
@@ -41,6 +42,7 @@ function Header() {
4142
}
4243

4344
function UserList() {
45+
const navigation = useNavigation();
4446
const background = useBackgroundClient();
4547
const users = useAllUsers();
4648
const user = useUser();
@@ -66,6 +68,7 @@ function UserList() {
6668
};
6769

6870
const handlePressAddAccount = () => {
71+
navigation.navigate("OnboardScreen");
6972
setAppState("isAddingAccount");
7073
};
7174

packages/app-mobile/src/navigation/OnboardingNavigator.tsx

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -299,26 +299,30 @@ function CreateOrRecoverAccountScreen({
299299
}: CreateOrRecoverAccountScreenProps) {
300300
const insets = useSafeAreaInsets();
301301
const { setOnboardingData } = useOnboarding();
302+
const { appState } = useSession();
302303
const [isModalVisible, setIsModalVisible] = useState(false);
303304

304305
const handlePresentModalPress = () => {
305306
setIsModalVisible((last) => !last);
306307
};
307308

309+
const isAddingAccount = appState === "isAddingAccount";
310+
311+
const insetStyles = {
312+
marginTop: insets.top,
313+
marginBottom: insets.bottom,
314+
paddingLeft: insets.left,
315+
paddingRight: insets.right,
316+
};
317+
308318
return (
309319
<>
310320
<Screen
311-
style={[
312-
styles.container,
313-
{
314-
marginTop: insets.top,
315-
// marginBottom: insets.bottom,
316-
paddingLeft: insets.left,
317-
paddingRight: insets.right,
318-
},
319-
]}
321+
style={[styles.container, !isAddingAccount ? insetStyles : undefined]}
320322
>
321-
<HelpModalMenuButton onPress={handlePresentModalPress} />
323+
{isAddingAccount ? null : (
324+
<HelpModalMenuButton onPress={handlePresentModalPress} />
325+
)}
322326
<Box marginTop={48} marginBottom={24}>
323327
<WelcomeLogoHeader />
324328
</Box>
@@ -1192,11 +1196,17 @@ export function OnboardingNavigator({
11921196
<OnboardingProvider>
11931197
<Stack.Navigator
11941198
initialRouteName="CreateOrRecoverAccount"
1195-
screenOptions={{ headerShown: false }}
1199+
screenOptions={{ headerShown: false, presentation: "modal" }}
11961200
>
11971201
<Stack.Screen
11981202
name="CreateOrRecoverAccount"
11991203
component={CreateOrRecoverAccountScreen}
1204+
options={{
1205+
presentation: "modal",
1206+
cardStyle: {
1207+
marginTop: 0,
1208+
},
1209+
}}
12001210
/>
12011211
<Stack.Screen
12021212
name="Biometrics"

packages/app-mobile/src/navigation/RootNavigator.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ function RootNavigator(): JSX.Element {
100100
setAppState("onboardingComplete");
101101
}, [setAppState]);
102102

103-
if (appState === "isAddingAccount") {
104-
return <OnboardingNavigator onStart={console.log} />;
105-
}
103+
// if (appState === "isAddingAccount") {
104+
// return <OnboardingNavigator onStart={console.log} />;
105+
// }
106106

107107
switch (keyringStoreState) {
108108
case KeyringStoreState.NeedsOnboarding:

packages/app-mobile/src/navigation/WalletsNavigator.tsx

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { TokenDetailScreen } from "~screens/TokenDetailScreen";
3232
import { TokenListScreen } from "~screens/TokenListScreen";
3333
import { SendCollectibleSendRecipientScreen } from "~screens/Unlocked/SendCollectibleSelectRecipientScreen";
3434

35+
import { OnboardingNavigator } from "~src/navigation/OnboardingNavigator";
3536
import { SendNavigator } from "~src/navigation/SendNavigator";
3637
import {
3738
Direction,
@@ -40,25 +41,38 @@ import {
4041
SwapTokenListScreen,
4142
} from "~src/screens/Unlocked/SwapTokenScreen";
4243

44+
function OnboardScreen() {
45+
return <OnboardingNavigator onStart={console.log} />;
46+
}
47+
4348
const TopTabs = createMaterialTopTabNavigator<TopTabsParamList>();
4449
function TopTabsNavigator(): JSX.Element {
45-
const theme = useTheme();
4650
return (
4751
<TopTabs.Navigator
4852
initialLayout={{
4953
width: WINDOW_WIDTH,
5054
}}
5155
screenOptions={{
52-
tabBarIndicatorStyle: {
53-
backgroundColor: theme.custom.colors.fontColor,
56+
tabBarStyle: {
57+
marginTop: 12,
58+
marginHorizontal: 24,
59+
backgroundColor: "transparent",
5460
},
55-
tabBarActiveTintColor: theme.custom.colors.fontColor,
5661
tabBarLabelStyle: {
5762
textTransform: "capitalize",
5863
fontSize: 15,
5964
fontFamily: "InterMedium",
60-
color: theme.custom.colors.fontColor,
6165
},
66+
tabBarIndicatorStyle: {
67+
borderRadius: 12,
68+
backgroundColor: "rgba(0, 87, 235, 0.15)",
69+
alignSelf: "center",
70+
height: 40,
71+
marginBottom: 4,
72+
},
73+
tabBarActiveTintColor: "#0057EB",
74+
tabBarInactiveTintColor: "#5D606F",
75+
tabBarPressOpacity: 0.2,
6276
}}
6377
>
6478
<TopTabs.Screen
@@ -136,6 +150,9 @@ export function WalletsNavigator(): JSX.Element {
136150
initialRouteName="HomeWalletList"
137151
screenOptions={{
138152
headerTintColor: theme.fontColor.val,
153+
headerStyle: {
154+
backgroundColor: "transparent",
155+
},
139156
}}
140157
>
141158
<Stack.Screen
@@ -146,6 +163,9 @@ export function WalletsNavigator(): JSX.Element {
146163
headerShown: true,
147164
headerBackTitleVisible: false,
148165
title: "Balances",
166+
headerStyle: {
167+
backgroundColor: "transparent",
168+
},
149169
headerTitle: ({ tintColor, children }) => {
150170
return (
151171
<BottomSheetViewOptions
@@ -163,8 +183,9 @@ export function WalletsNavigator(): JSX.Element {
163183
headerRight: (props) => (
164184
<HeaderButtonSpacer>
165185
<HeaderButton
166-
name="notifications"
167186
{...props}
187+
name="notifications-none"
188+
tintColor={theme.icon.val}
168189
onPress={() => {
169190
navigation.navigate("Notifications");
170191
}}
@@ -181,6 +202,9 @@ export function WalletsNavigator(): JSX.Element {
181202
options={{
182203
headerShadowVisible: false,
183204
headerBackTitleVisible: false,
205+
headerStyle: {
206+
backgroundColor: "transparent",
207+
},
184208
headerTitle: () => {
185209
return <WalletSwitcherButton />;
186210
},
@@ -233,6 +257,7 @@ export function WalletsNavigator(): JSX.Element {
233257
/>
234258
<Stack.Group screenOptions={{ headerShown: false }}>
235259
<Stack.Screen name="SendSelectTokenModal" component={SendNavigator} />
260+
<Stack.Screen name="OnboardScreen" component={OnboardScreen} />
236261
<Stack.Screen name="SwapModal" component={SwapNavigator} />
237262
</Stack.Group>
238263
<Stack.Screen

0 commit comments

Comments
 (0)