2018-09-01 23:04:50 +02:00
|
|
|
import { Dimensions, PixelRatio, StyleSheet } from 'react-native';
|
2019-04-24 16:31:44 +02:00
|
|
|
import { mediaWidth, mediaHeight } from './discover';
|
2018-08-31 09:56:41 +02:00
|
|
|
import Colors from './colors';
|
|
|
|
|
|
|
|
const screenDimension = Dimensions.get('window');
|
|
|
|
const screenWidth = screenDimension.width;
|
|
|
|
const screenHeight = screenDimension.height;
|
2018-09-01 23:04:50 +02:00
|
|
|
const screenWidthPixels = PixelRatio.getPixelSizeForLayoutSize(screenWidth);
|
|
|
|
const screenHeightPixels = PixelRatio.getPixelSizeForLayoutSize(screenHeight);
|
|
|
|
const verticalAdjust = (screenHeightPixels > 1280 && screenHeightPixels <= 1920) ? 6 : 0;
|
|
|
|
const thumbnailWidth = (screenWidthPixels <= 720) ? 144 : 156;
|
|
|
|
const thumbnailHeight = ((screenWidth / screenHeight) * thumbnailWidth) - verticalAdjust;
|
2018-08-31 09:56:41 +02:00
|
|
|
|
|
|
|
const fileListStyle = StyleSheet.create({
|
|
|
|
item: {
|
|
|
|
flex: 1,
|
|
|
|
flexDirection: 'row',
|
|
|
|
justifyContent: 'space-between',
|
2018-09-01 23:04:50 +02:00
|
|
|
marginTop: 8
|
2018-08-31 09:56:41 +02:00
|
|
|
},
|
|
|
|
detailsContainer: {
|
|
|
|
flex: 1
|
|
|
|
},
|
2019-03-11 12:09:08 +01:00
|
|
|
featuredUri: {
|
|
|
|
fontFamily: 'Inter-UI-SemiBold',
|
|
|
|
fontSize: 24,
|
|
|
|
color: Colors.White
|
|
|
|
},
|
|
|
|
featuredTitle: {
|
|
|
|
fontFamily: 'Inter-UI-SemiBold',
|
|
|
|
fontSize: (screenWidthPixels <= 720) ? 12 : 16,
|
|
|
|
color: Colors.White
|
|
|
|
},
|
2018-08-31 09:56:41 +02:00
|
|
|
thumbnail: {
|
|
|
|
width: thumbnailWidth,
|
|
|
|
height: thumbnailHeight,
|
2018-09-01 23:04:50 +02:00
|
|
|
marginRight: (screenWidthPixels <= 720) ? 10 : 12,
|
2018-09-24 15:59:00 +02:00
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center',
|
2018-08-31 09:56:41 +02:00
|
|
|
},
|
|
|
|
title: {
|
2018-12-11 21:06:42 +01:00
|
|
|
fontFamily: 'Inter-UI-SemiBold',
|
2019-03-27 10:13:13 +01:00
|
|
|
fontSize: (screenWidthPixels <= 720) ? 12 : 14
|
2018-08-31 09:56:41 +02:00
|
|
|
},
|
|
|
|
uri: {
|
2018-12-11 21:06:42 +01:00
|
|
|
fontFamily: 'Inter-UI-SemiBold',
|
2018-09-01 23:04:50 +02:00
|
|
|
fontSize: (screenWidthPixels <= 720) ? 12 : 14,
|
2018-08-31 09:56:41 +02:00
|
|
|
marginBottom: 8
|
|
|
|
},
|
|
|
|
publisher: {
|
2018-12-11 21:06:42 +01:00
|
|
|
fontFamily: 'Inter-UI-SemiBold',
|
2019-03-27 10:13:13 +01:00
|
|
|
fontSize: (screenWidthPixels <= 720) ? 11 : 12,
|
2018-09-01 23:04:50 +02:00
|
|
|
marginTop: (screenWidthPixels <= 720) ? 1 : 3,
|
2018-08-31 09:56:41 +02:00
|
|
|
color: Colors.LbryGreen
|
|
|
|
},
|
|
|
|
loading: {
|
|
|
|
position: 'absolute'
|
|
|
|
},
|
2019-01-24 21:22:12 +01:00
|
|
|
info: {
|
|
|
|
marginTop: (screenWidthPixels <= 720) ? 1 : 2,
|
|
|
|
flexDirection: 'row',
|
|
|
|
justifyContent: 'space-between'
|
2018-08-31 09:56:41 +02:00
|
|
|
},
|
2019-01-24 21:22:12 +01:00
|
|
|
infoText: {
|
2018-12-11 21:06:42 +01:00
|
|
|
fontFamily: 'Inter-UI-Regular',
|
2019-03-27 10:13:13 +01:00
|
|
|
fontSize: (screenWidthPixels <= 720) ? 11 : 12,
|
2018-08-31 09:56:41 +02:00
|
|
|
color: Colors.ChannelGrey
|
|
|
|
},
|
2019-01-24 21:22:12 +01:00
|
|
|
downloadInfo: {
|
|
|
|
marginTop: 2
|
|
|
|
},
|
2018-08-31 09:56:41 +02:00
|
|
|
progress: {
|
2018-09-01 23:04:50 +02:00
|
|
|
marginTop: (screenWidthPixels <= 720) ? 2 : 4,
|
2018-08-31 09:56:41 +02:00
|
|
|
height: 3,
|
|
|
|
flex: 1,
|
|
|
|
flexDirection: 'row'
|
|
|
|
},
|
|
|
|
progressCompleted: {
|
|
|
|
backgroundColor: Colors.LbryGreen
|
|
|
|
},
|
|
|
|
progressRemaining: {
|
|
|
|
backgroundColor: Colors.LbryGreen,
|
|
|
|
opacity: 0.2
|
2019-01-24 21:22:12 +01:00
|
|
|
},
|
2019-04-24 16:31:44 +02:00
|
|
|
downloadedIcon: {
|
|
|
|
position: 'absolute',
|
|
|
|
top: 8,
|
|
|
|
left: 8
|
|
|
|
},
|
|
|
|
fileItem: {
|
|
|
|
marginLeft: 24,
|
|
|
|
marginRight: 24,
|
|
|
|
marginBottom: 48
|
|
|
|
},
|
|
|
|
fileItemMedia: {
|
|
|
|
width: mediaWidth,
|
|
|
|
height: mediaHeight,
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center'
|
|
|
|
},
|
2018-08-31 09:56:41 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default fileListStyle;
|