Merge pull request #503 from lbryio/file-page-tweaks

some pre-redesign tweaks to the file page
This commit is contained in:
Akinwale Ariwodola 2019-03-27 10:17:16 +01:00 committed by GitHub
commit 6d7768e904
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 35 additions and 27 deletions

View file

@ -14,7 +14,7 @@ const select = (state, props) => ({
}); });
const perform = dispatch => ({ const perform = dispatch => ({
search: query => dispatch(doSearch(query, 10, undefined, true)), search: query => dispatch(doSearch(query, 20, undefined, true)),
}); });
export default connect( export default connect(

View file

@ -565,7 +565,13 @@ class FilePage extends React.PureComponent {
style={showActions ? filePageStyle.scrollContainerActions : filePageStyle.scrollContainer} style={showActions ? filePageStyle.scrollContainerActions : filePageStyle.scrollContainer}
contentContainerstyle={showActions ? null : filePageStyle.scrollContent} contentContainerstyle={showActions ? null : filePageStyle.scrollContent}
ref={(ref) => { this.scrollView = ref; }}> ref={(ref) => { this.scrollView = ref; }}>
<Text style={filePageStyle.title} selectable={true}>{title}</Text> <View style={filePageStyle.titleRow}>
<Text style={filePageStyle.title} selectable={true}>{title}</Text>
<TouchableOpacity style={filePageStyle.descriptionToggle}
onPress={() => this.setState({ showDescription: !this.state.showDescription })}>
<Icon name={this.state.showDescription ? "caret-up" : "caret-down"} size={24} />
</TouchableOpacity>
</View>
{channelName && {channelName &&
<View style={filePageStyle.channelRow}> <View style={filePageStyle.channelRow}>
<View style={filePageStyle.publishInfo}> <View style={filePageStyle.publishInfo}>
@ -593,10 +599,6 @@ class FilePage extends React.PureComponent {
style={[filePageStyle.actionButton, filePageStyle.bellButton]} style={[filePageStyle.actionButton, filePageStyle.bellButton]}
uri={fullChannelUri} uri={fullChannelUri}
name={channelName} /> name={channelName} />
<TouchableOpacity style={filePageStyle.descriptionToggle}
onPress={() => this.setState({ showDescription: !this.state.showDescription })}>
<Icon name={this.state.showDescription ? "caret-up" : "caret-down"} size={24} />
</TouchableOpacity>
</View> </View>
</View> </View>
} }

View file

@ -39,7 +39,7 @@ const fileListStyle = StyleSheet.create({
}, },
title: { title: {
fontFamily: 'Inter-UI-SemiBold', fontFamily: 'Inter-UI-SemiBold',
fontSize: (screenWidthPixels <= 720) ? 12 : 16 fontSize: (screenWidthPixels <= 720) ? 12 : 14
}, },
uri: { uri: {
fontFamily: 'Inter-UI-SemiBold', fontFamily: 'Inter-UI-SemiBold',
@ -48,7 +48,7 @@ const fileListStyle = StyleSheet.create({
}, },
publisher: { publisher: {
fontFamily: 'Inter-UI-SemiBold', fontFamily: 'Inter-UI-SemiBold',
fontSize: (screenWidthPixels <= 720) ? 12 : 14, fontSize: (screenWidthPixels <= 720) ? 11 : 12,
marginTop: (screenWidthPixels <= 720) ? 1 : 3, marginTop: (screenWidthPixels <= 720) ? 1 : 3,
color: Colors.LbryGreen color: Colors.LbryGreen
}, },
@ -62,7 +62,7 @@ const fileListStyle = StyleSheet.create({
}, },
infoText: { infoText: {
fontFamily: 'Inter-UI-Regular', fontFamily: 'Inter-UI-Regular',
fontSize: (screenWidthPixels <= 720) ? 12 : 14, fontSize: (screenWidthPixels <= 720) ? 11 : 12,
color: Colors.ChannelGrey color: Colors.ChannelGrey
}, },
downloadInfo: { downloadInfo: {

View file

@ -32,7 +32,8 @@ const filePageStyle = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
width: screenWidth, width: screenWidth,
height: containedMediaHeightWithControls, height: containedMediaHeightWithControls,
marginTop: 60 marginTop: 60,
marginBottom: -17
}, },
emptyClaimText: { emptyClaimText: {
fontFamily: 'Inter-UI-Regular', fontFamily: 'Inter-UI-Regular',
@ -42,8 +43,7 @@ const filePageStyle = StyleSheet.create({
marginRight: 16 marginRight: 16
}, },
scrollContainer: { scrollContainer: {
flex: 1, flex: 1
marginTop: -16
}, },
scrollContent: { scrollContent: {
paddingTop: 10 paddingTop: 10
@ -53,17 +53,23 @@ const filePageStyle = StyleSheet.create({
}, },
title: { title: {
fontFamily: 'Inter-UI-Bold', fontFamily: 'Inter-UI-Bold',
fontSize: 20, fontSize: 16,
flex: 18
},
titleRow: {
flexDirection: 'row',
marginTop: 12, marginTop: 12,
marginLeft: 20, marginBottom: 2,
marginRight: 20, marginLeft: 12,
marginBottom: 8 marginRight: 12,
alignItems: 'center',
justifyContent: 'center'
}, },
channelRow: { channelRow: {
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'space-between', justifyContent: 'space-between',
marginLeft: 20, marginLeft: 12,
marginRight: 20, marginRight: 12,
marginBottom: 16, marginBottom: 16,
}, },
subscriptionRow: { subscriptionRow: {
@ -76,7 +82,7 @@ const filePageStyle = StyleSheet.create({
}, },
channelName: { channelName: {
fontFamily: 'Inter-UI-SemiBold', fontFamily: 'Inter-UI-SemiBold',
fontSize: 16, fontSize: 14,
color: Colors.LbryGreen color: Colors.LbryGreen
}, },
publishDateText: { publishDateText: {
@ -90,10 +96,10 @@ const filePageStyle = StyleSheet.create({
description: { description: {
color: Colors.DescriptionGrey, color: Colors.DescriptionGrey,
fontFamily: 'Inter-UI-Regular', fontFamily: 'Inter-UI-Regular',
fontSize: 16, fontSize: 13,
lineHeight: 20, lineHeight: 18,
marginLeft: 20, marginLeft: 12,
marginRight: 20, marginRight: 12,
marginBottom: 16 marginBottom: 16
}, },
thumbnail: { thumbnail: {
@ -171,7 +177,6 @@ const filePageStyle = StyleSheet.create({
paddingRight: 16, paddingRight: 16,
paddingTop: 16, paddingTop: 16,
paddingBottom: 8, paddingBottom: 8,
marginTop: -14,
width: '100%', width: '100%',
}, },
fileActions: { fileActions: {
@ -286,7 +291,8 @@ const filePageStyle = StyleSheet.create({
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
width: 36, width: 36,
height: 36 height: 36,
marginTop: -8
}, },
text: { text: {
fontFamily: 'Inter-UI-Regular', fontFamily: 'Inter-UI-Regular',

View file

@ -6,8 +6,8 @@ const relatedContentStyle = StyleSheet.create({
flex: 1, flex: 1,
paddingTop: 16, paddingTop: 16,
paddingBottom: 16, paddingBottom: 16,
paddingLeft: 24, paddingLeft: 16,
paddingRight: 24, paddingRight: 16,
borderTopColor: Colors.LighterGrey, borderTopColor: Colors.LighterGrey,
borderTopWidth: 1 borderTopWidth: 1
}, },