change the appearance of the uri bar input (#561)
* change the appearance of the uri bar input * improve no search results display
This commit is contained in:
parent
10beb9935f
commit
7f57447e57
3 changed files with 26 additions and 12 deletions
|
@ -104,8 +104,7 @@ class SearchPage extends React.PureComponent {
|
||||||
<ActivityIndicator size="large" color={Colors.LbryGreen} style={searchStyle.loading} />
|
<ActivityIndicator size="large" color={Colors.LbryGreen} style={searchStyle.loading} />
|
||||||
</View>}
|
</View>}
|
||||||
|
|
||||||
{!isSearching && (!uris || uris.length === 0) &&
|
|
||||||
<Text style={searchStyle.noResultsText}>No results to display.</Text>}
|
|
||||||
{!isSearching &&
|
{!isSearching &&
|
||||||
<ScrollView
|
<ScrollView
|
||||||
style={searchStyle.scrollContainer}
|
style={searchStyle.scrollContainer}
|
||||||
|
@ -127,6 +126,10 @@ class SearchPage extends React.PureComponent {
|
||||||
navigation={navigation}
|
navigation={navigation}
|
||||||
onPress={() => navigateToUri(navigation, uri)}/>)
|
onPress={() => navigateToUri(navigation, uri)}/>)
|
||||||
) : null }
|
) : null }
|
||||||
|
{(!uris || uris.length === 0) &&
|
||||||
|
<View style={searchStyle.noResults}>
|
||||||
|
<Text style={searchStyle.noResultsText}>There are no results to display for <Text style={searchStyle.boldText}>{query}</Text>. Please try a different search term.</Text>
|
||||||
|
</View>}
|
||||||
</ScrollView>}
|
</ScrollView>}
|
||||||
<FloatingWalletBalance navigation={navigation} />
|
<FloatingWalletBalance navigation={navigation} />
|
||||||
</View>
|
</View>
|
||||||
|
|
|
@ -8,7 +8,7 @@ const searchStyle = StyleSheet.create({
|
||||||
},
|
},
|
||||||
scrollContainer: {
|
scrollContainer: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
marginTop: 60
|
marginTop: 60,
|
||||||
},
|
},
|
||||||
busyContainer: {
|
busyContainer: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
@ -16,6 +16,7 @@ const searchStyle = StyleSheet.create({
|
||||||
justifyContent: 'center'
|
justifyContent: 'center'
|
||||||
},
|
},
|
||||||
scrollPadding: {
|
scrollPadding: {
|
||||||
|
flex: 1,
|
||||||
paddingBottom: 16
|
paddingBottom: 16
|
||||||
},
|
},
|
||||||
resultItem: {
|
resultItem: {
|
||||||
|
@ -27,7 +28,6 @@ const searchStyle = StyleSheet.create({
|
||||||
marginRight: 8
|
marginRight: 8
|
||||||
},
|
},
|
||||||
featuredResultItem: {
|
featuredResultItem: {
|
||||||
flex: 1,
|
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
paddingTop: 8,
|
paddingTop: 8,
|
||||||
|
@ -42,11 +42,22 @@ const searchStyle = StyleSheet.create({
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-UI-Regular',
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
},
|
},
|
||||||
|
noResults: {
|
||||||
|
flex: 1,
|
||||||
|
width: '100%',
|
||||||
|
height: '100%',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center'
|
||||||
|
},
|
||||||
noResultsText: {
|
noResultsText: {
|
||||||
textAlign: 'center',
|
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-UI-Regular',
|
||||||
fontSize: 14,
|
fontSize: 16,
|
||||||
position: 'absolute'
|
marginLeft: 16,
|
||||||
|
marginRight: 16
|
||||||
|
},
|
||||||
|
boldText: {
|
||||||
|
fontFamily: 'Inter-UI-SemiBold',
|
||||||
|
fontSize: 16
|
||||||
},
|
},
|
||||||
loading: {
|
loading: {
|
||||||
position: 'absolute'
|
position: 'absolute'
|
||||||
|
|
|
@ -19,13 +19,13 @@ const uriBarStyle = StyleSheet.create({
|
||||||
elevation: 4
|
elevation: 4
|
||||||
},
|
},
|
||||||
uriText: {
|
uriText: {
|
||||||
backgroundColor: Colors.White,
|
backgroundColor: Colors.VeryLightGrey,
|
||||||
borderWidth: 1,
|
borderRadius: 24,
|
||||||
borderColor: Colors.LightGrey,
|
paddingLeft: 12,
|
||||||
padding: 8,
|
paddingRight: 12,
|
||||||
borderRadius: 4,
|
|
||||||
fontFamily: 'Inter-UI-Regular',
|
fontFamily: 'Inter-UI-Regular',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
|
lineHeight: 18,
|
||||||
flex: 17
|
flex: 17
|
||||||
},
|
},
|
||||||
overlay: {
|
overlay: {
|
||||||
|
|
Loading…
Reference in a new issue