added placeholders when creating account

This commit is contained in:
balzack 2022-10-24 00:11:01 -07:00
parent 0d4db25f2c
commit f41b4fccba
8 changed files with 96 additions and 25 deletions

View File

@ -310,7 +310,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 17; CURRENT_PROJECT_VERSION = 18;
DEVELOPMENT_TEAM = 3P65PQ7SUR; DEVELOPMENT_TEAM = 3P65PQ7SUR;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
GCC_PREPROCESSOR_DEFINITIONS = ( GCC_PREPROCESSOR_DEFINITIONS = (
@ -348,7 +348,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 17; CURRENT_PROJECT_VERSION = 18;
DEVELOPMENT_TEAM = 3P65PQ7SUR; DEVELOPMENT_TEAM = 3P65PQ7SUR;
INFOPLIST_FILE = Databag/Info.plist; INFOPLIST_FILE = Databag/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Databag; INFOPLIST_KEY_CFBundleDisplayName = Databag;

View File

@ -39,12 +39,21 @@ export function CardsTitle({ state, actions, openRegistry }) {
export function CardsBody({ state, actions, openContact }) { export function CardsBody({ state, actions, openContact }) {
return ( return (
<>
{ state.cards.length == 0 && (
<View style={styles.notfound}>
<Text style={styles.notfoundtext}>No Contacts Found</Text>
</View>
)}
{ state.cards.length != 0 && (
<FlatList style={styles.cards} <FlatList style={styles.cards}
data={state.cards} data={state.cards}
initialNumToRender={25} initialNumToRender={25}
renderItem={({ item }) => <CardItem item={item} openContact={openContact} />} renderItem={({ item }) => <CardItem item={item} openContact={openContact} />}
keyExtractor={item => item.cardId} keyExtractor={item => item.cardId}
/> />
)}
</>
); );
} }

View File

@ -104,6 +104,16 @@ export const styles = StyleSheet.create({
findarea: { findarea: {
borderTopWidth: 1, borderTopWidth: 1,
borderColor: Colors.divider, borderColor: Colors.divider,
},
notfound: {
width: '100%',
height: '100%',
alignItems: 'center',
justifyContent: 'center',
},
notfoundtext: {
fontSize: 20,
color: Colors.grey,
} }
}) })

View File

@ -88,7 +88,6 @@ export function useCards() {
return -1; return -1;
}); });
} }
filtered.push({cardId:''});
updateState({ cards: filtered }); updateState({ cards: filtered });
}, [card, state.filter, state.sorting]); }, [card, state.filter, state.sorting]);

View File

@ -44,12 +44,19 @@ export function ChannelsBody({ state, actions, openConversation }) {
return ( return (
<> <>
{ state.channels.length == 0 && (
<View style={styles.channels}>
<Text style={styles.notfound}>No Topics Found</Text>
</View>
)}
{ state.channels.length > 0 && (
<FlatList style={styles.channels} <FlatList style={styles.channels}
data={state.channels} data={state.channels}
initialNumToRender={25} initialNumToRender={25}
renderItem={({ item }) => <ChannelItem item={item} openConversation={openConversation} />} renderItem={({ item }) => <ChannelItem item={item} openConversation={openConversation} />}
keyExtractor={item => (`${item.cardId}:${item.channelId}`)} keyExtractor={item => (`${item.cardId}:${item.channelId}`)}
/> />
)}
<Modal <Modal
animationType="fade" animationType="fade"
transparent={true} transparent={true}
@ -106,12 +113,19 @@ export function Channels({ openConversation }) {
</View> </View>
</SafeAreaView> </SafeAreaView>
<SafeAreaView style={styles.channels} edges={['left']}> <SafeAreaView style={styles.channels} edges={['left']}>
{ state.channels.length == 0 && (
<View style={styles.channels}>
<Text style={styles.notfound}>No Topics Found</Text>
</View>
)}
{ state.channels.length != 0 && (
<FlatList <FlatList
data={state.channels} data={state.channels}
initialNumToRender={25} initialNumToRender={25}
renderItem={({ item }) => <ChannelItem item={item} openConversation={openConversation} />} renderItem={({ item }) => <ChannelItem item={item} openConversation={openConversation} />}
keyExtractor={item => (`${item.cardId}:${item.channelId}`)} keyExtractor={item => (`${item.cardId}:${item.channelId}`)}
/> />
)}
</SafeAreaView> </SafeAreaView>
<SafeAreaView style={styles.bottomArea} edges={['left']}> <SafeAreaView style={styles.bottomArea} edges={['left']}>
<TouchableOpacity style={styles.addbottom}> <TouchableOpacity style={styles.addbottom}>

View File

@ -56,12 +56,18 @@ export const styles = StyleSheet.create({
flexGrow: 1, flexGrow: 1,
flexShrink: 1, flexShrink: 1,
}, },
notfound: {
fontSize: 20,
color: Colors.grey,
},
channels: { channels: {
flexShrink: 1, flexShrink: 1,
flexGrow: 1, flexGrow: 1,
width: '100%', width: '100%',
paddingLeft: 16, paddingLeft: 16,
paddingRight: 16, paddingRight: 16,
alignItems: 'center',
justifyContent: 'center',
}, },
addbottom: { addbottom: {
backgroundColor: Colors.primary, backgroundColor: Colors.primary,

View File

@ -123,16 +123,31 @@ export function Profile() {
)} )}
<TouchableOpacity style={styles.detail} onPress={actions.showDetailEdit}> <TouchableOpacity style={styles.detail} onPress={actions.showDetailEdit}>
<View style={styles.attribute}> <View style={styles.attribute}>
{ state.name && (
<Text style={styles.nametext}>{ state.name }</Text> <Text style={styles.nametext}>{ state.name }</Text>
)}
{ !state.name && (
<Text style={styles.nonametext}>Name</Text>
)}
<Ionicons name="edit" size={16} color={Colors.text} /> <Ionicons name="edit" size={16} color={Colors.text} />
</View> </View>
<View style={styles.attribute}> <View style={styles.attribute}>
<Ionicons name="enviromento" size={14} color={Colors.text} /> <Ionicons name="enviromento" size={14} color={Colors.text} />
{ state.location && (
<Text style={styles.locationtext}>{ state.location }</Text> <Text style={styles.locationtext}>{ state.location }</Text>
)}
{ !state.location && (
<Text style={styles.nolocationtext}>Location</Text>
)}
</View> </View>
<View style={styles.attribute}> <View style={styles.attribute}>
<Ionicons name="book" size={14} color={Colors.text} /> <Ionicons name="book" size={14} color={Colors.text} />
{ state.description && (
<Text style={styles.descriptiontext}>{ state.description }</Text> <Text style={styles.descriptiontext}>{ state.description }</Text>
)}
{ !state.description && (
<Text style={styles.nodescriptiontext}>Description</Text>
)}
</View> </View>
</TouchableOpacity> </TouchableOpacity>
<View style={styles.visible}> <View style={styles.visible}>

View File

@ -75,6 +75,12 @@ export const styles = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
paddingBottom: 8, paddingBottom: 8,
}, },
nonametext: {
fontSize: 18,
paddingRight: 8,
fontWeight: 'bold',
color: Colors.grey,
},
nametext: { nametext: {
fontSize: 18, fontSize: 18,
paddingRight: 8, paddingRight: 8,
@ -83,10 +89,22 @@ export const styles = StyleSheet.create({
locationtext: { locationtext: {
fontSize: 16, fontSize: 16,
paddingLeft: 8, paddingLeft: 8,
color: Colors.text,
},
nolocationtext: {
fontSize: 16,
paddingLeft: 8,
color: Colors.grey,
}, },
descriptiontext: { descriptiontext: {
fontSize: 16, fontSize: 16,
paddingLeft: 8 paddingLeft: 8,
color: Colors.text,
},
nodescriptiontext: {
fontSize: 16,
paddingLeft: 8,
color: Colors.grey,
}, },
visible: { visible: {
display: 'flex', display: 'flex',