diff --git a/app/mobile/src/session/Session.jsx b/app/mobile/src/session/Session.jsx index 4c6b5727..dc06f31d 100644 --- a/app/mobile/src/session/Session.jsx +++ b/app/mobile/src/session/Session.jsx @@ -9,7 +9,7 @@ import Ionicons from '@expo/vector-icons/AntDesign'; import { useSession } from './useSession.hook'; import { styles } from './Session.styled'; import Colors from 'constants/Colors'; -import { ProfileTitle, Profile } from './profile/Profile'; +import { Profile } from './profile/Profile'; import { CardsTitle, CardsBody, Cards } from './cards/Cards'; import { useCards } from './cards/useCards.hook'; import { RegistryTitle, RegistryBody, Registry } from './registry/Registry'; @@ -105,7 +105,7 @@ export function Session() { const ProfileStackScreen = () => { return ( ({ headerShown: true, headerTintColor: Colors.primary })}> - }} /> + ); } diff --git a/app/mobile/src/session/profile/Profile.jsx b/app/mobile/src/session/profile/Profile.jsx index 67497467..0e102959 100644 --- a/app/mobile/src/session/profile/Profile.jsx +++ b/app/mobile/src/session/profile/Profile.jsx @@ -1,4 +1,4 @@ -import { useContext } from 'react'; +import { useEffect, useContext } from 'react'; import { KeyboardAvoidingView, Modal, Alert, TextInput, ScrollView, View, Switch, TouchableOpacity, Text } from 'react-native'; import { styles } from './Profile.styled'; import { useProfile } from './useProfile.hook'; @@ -11,19 +11,27 @@ import { BlockedTopics } from './blockedTopics/BlockedTopics'; import { BlockedContacts } from './blockedContacts/BlockedContacts'; import { BlockedMessages } from './blockedMessages/BlockedMessages'; -export function ProfileTitle(props) { - const { state, actions } = useProfile(); - return ( - - { `${state.handle}@${state.node}` } - - ) -} - -export function Profile() { +export function Profile({ navigation }) { const { state, actions } = useProfile(); + useEffect(() => { + if (navigation) { + navigation.setOptions({ + headerTitle: () => ( + + { `${state.handle}@${state.node}` } + + ), + headerRight: () => ( + + + + ), + }); + } + }, [navigation, state]); + const setVisible = async (visible) => { try { await actions.setVisible(visible); @@ -181,14 +189,6 @@ export function Profile() { Manage Blocked Messages - - - Logout - - - - Delete - ); }; @@ -203,7 +203,10 @@ export function Profile() { { !state.tabbed && ( - { `${state.handle}@${state.node}` } + { `${state.handle}@${state.node}` } + + + diff --git a/app/mobile/src/session/profile/Profile.styled.js b/app/mobile/src/session/profile/Profile.styled.js index 9dc5e0c2..9f7772f2 100644 --- a/app/mobile/src/session/profile/Profile.styled.js +++ b/app/mobile/src/session/profile/Profile.styled.js @@ -15,12 +15,21 @@ export const styles = StyleSheet.create({ paddingTop: 16, backgroundColor: Colors.formBackground, }, + action: { + width: 64, + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + }, titleText: { fontSize: 18, + overflow: 'hidden', + flexGrow: 1, + textAlign: 'center', }, title: { display: 'flex', - flexDirection: 'column', + flexDirection: 'row', flexGrow: 1, flex: 1, width: '100%', @@ -38,8 +47,9 @@ export const styles = StyleSheet.create({ justifyContent: 'center', }, headerText: { - fontSize: 16, - paddingRight: 4, + paddingLeft: 16, + fontSize: 14, + paddingRight: 8, color: Colors.text, }, camera: { diff --git a/app/mobile/src/session/registry/Registry.jsx b/app/mobile/src/session/registry/Registry.jsx index 9985e4ea..6d0cda2c 100644 --- a/app/mobile/src/session/registry/Registry.jsx +++ b/app/mobile/src/session/registry/Registry.jsx @@ -54,9 +54,10 @@ export function RegistryTitle({ state, actions }) { } export function RegistryBody({ state, actions, openContact }) { + return ( - { state.accounts.length === 0 && state.searcheg && ( + { state.accounts.length === 0 && state.searched && ( No Contacts Found @@ -89,6 +90,7 @@ export function Registry({ closeRegistry, openContact }) { } const { state, actions } = useRegistry(); + return ( { state.tabbed && ( diff --git a/app/mobile/src/session/registry/Registry.styled.js b/app/mobile/src/session/registry/Registry.styled.js index 0f726e08..616852e0 100644 --- a/app/mobile/src/session/registry/Registry.styled.js +++ b/app/mobile/src/session/registry/Registry.styled.js @@ -90,7 +90,7 @@ export const styles = StyleSheet.create({ }, emptyText: { color: Colors.grey, - fontSize: 16, + fontSize: 18, }, addbottom: { marginRight: 8,