From f51d6e4de60f6808002826f4c767f2689a91b344 Mon Sep 17 00:00:00 2001 From: Chuporceeta Date: Tue, 10 Sep 2024 14:13:05 -0400 Subject: [PATCH 01/20] Add Profile Picture to Settings Screen --- .../app/screens/settings/SettingsScreen.tsx | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/client/app/screens/settings/SettingsScreen.tsx b/client/app/screens/settings/SettingsScreen.tsx index 4db3a263..b9e0c278 100644 --- a/client/app/screens/settings/SettingsScreen.tsx +++ b/client/app/screens/settings/SettingsScreen.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { SafeAreaView, Text, StyleSheet, View, ScrollView } from "react-native"; +import { SafeAreaView, Text, StyleSheet, View, ScrollView, Image } from "react-native"; import { SettingsItem } from "../../components/settings/SettingsItem"; @@ -33,18 +33,30 @@ const Sections = [ const SettingsScreen: React.FC = () => { // settings values (will be changed later to reflect the actual settings) const [data, setData] = useState({ + displayName: "Display Name", + profilePic: require("../../../assets/icons/user/face_01.png"), + profileColor: "#1199ff", notifyNewMessage: true, darkMode: false, language: "English", deleteMessages: false, }); + const iconStyle = [styles.icon, {backgroundColor: data.profileColor}] + + return ( + Settings + + {Sections.map(({ header, items }) => ( @@ -79,6 +91,8 @@ const styles = StyleSheet.create({ paddingVertical: 24, }, header: { + flexDirection: "row", + justifyContent: "space-between", paddingLeft: 24, paddingRight: 24, }, @@ -106,6 +120,11 @@ const styles = StyleSheet.create({ borderBottomWidth: 1, borderColor: "#e3e3e3", }, + icon: { + width: 50, + height: 50, + borderRadius: 20, + }, }); export default SettingsScreen; From a460091dd0202785770b8de9414d8269628b9c14 Mon Sep 17 00:00:00 2001 From: Chuporceeta Date: Tue, 10 Sep 2024 14:19:27 -0400 Subject: [PATCH 02/20] Add Profile Settings Menu Skeleton Clicking on the profile picture opens a new menu to edit display name, profile color, and profile picture. No settings work currently. --- .../app/screens/settings/SettingsScreen.tsx | 54 ++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/client/app/screens/settings/SettingsScreen.tsx b/client/app/screens/settings/SettingsScreen.tsx index b9e0c278..ceb741d6 100644 --- a/client/app/screens/settings/SettingsScreen.tsx +++ b/client/app/screens/settings/SettingsScreen.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { SafeAreaView, Text, StyleSheet, View, ScrollView, Image } from "react-native"; +import { SafeAreaView, Text, StyleSheet, View, ScrollView, Image, Pressable, Modal, Button } from "react-native"; import { SettingsItem } from "../../components/settings/SettingsItem"; @@ -42,6 +42,7 @@ const SettingsScreen: React.FC = () => { deleteMessages: false, }); + const[profileVisible, setProfileVisible] = useState(false); const iconStyle = [styles.icon, {backgroundColor: data.profileColor}] @@ -49,12 +50,55 @@ const SettingsScreen: React.FC = () => { + setProfileVisible(false)} + > + + + + Hi {data.displayName}! + + setProfileVisible(false)}> + + + + + + Edit Profile + + +