2018-06-01 14:53:46 -05:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
|
|
import { BoxModel, ColorPalette, createStyleSheet } from '../../../styles';
|
2018-02-02 15:48:43 +01:00
|
|
|
|
2018-02-13 17:33:03 -06:00
|
|
|
const AVATAR_OPACITY = 0.4;
|
|
|
|
|
const OVERLAY_FONT_COLOR = 'rgba(255, 255, 255, 0.6)';
|
2018-02-02 15:48:43 +01:00
|
|
|
|
2019-02-13 10:39:40 +01:00
|
|
|
export const AVATAR_SIZE = 65;
|
2018-02-13 17:33:03 -06:00
|
|
|
export const UNDERLAY_COLOR = 'rgba(255, 255, 255, 0.2)';
|
2018-02-02 15:48:43 +01:00
|
|
|
|
2018-04-24 15:11:25 +02:00
|
|
|
/**
|
|
|
|
|
* Style classes of the PagedList-based components.
|
|
|
|
|
*/
|
|
|
|
|
const PAGED_LIST_STYLES = {
|
|
|
|
|
|
2018-09-25 14:48:03 +02:00
|
|
|
/**
|
|
|
|
|
* Outermost container of a page in {@code PagedList}.
|
|
|
|
|
*/
|
|
|
|
|
pageContainer: {
|
|
|
|
|
flex: 1
|
|
|
|
|
},
|
|
|
|
|
|
2018-04-24 15:11:25 +02:00
|
|
|
/**
|
|
|
|
|
* Style of the page indicator (Android).
|
|
|
|
|
*/
|
|
|
|
|
pageIndicator: {
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
flexDirection: 'column',
|
2019-03-04 15:49:57 +01:00
|
|
|
justifyContent: 'center',
|
|
|
|
|
padding: BoxModel.padding / 2
|
2018-04-24 15:11:25 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Additional style for the active indicator icon (Android).
|
|
|
|
|
*/
|
|
|
|
|
pageIndicatorActive: {
|
|
|
|
|
color: ColorPalette.white
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Container for the page indicators (Android).
|
|
|
|
|
*/
|
|
|
|
|
pageIndicatorContainer: {
|
2019-03-04 15:49:57 +01:00
|
|
|
alignItems: 'center',
|
2018-04-24 15:11:25 +02:00
|
|
|
backgroundColor: ColorPalette.blue,
|
|
|
|
|
flexDirection: 'row',
|
2019-03-04 15:49:57 +01:00
|
|
|
justifyContent: 'space-around'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
pageIndicatorContent: {
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
flexDirection: 'column',
|
2018-04-24 15:11:25 +02:00
|
|
|
justifyContent: 'center'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Icon of the page indicator (Android).
|
|
|
|
|
*/
|
|
|
|
|
pageIndicatorIcon: {
|
|
|
|
|
color: ColorPalette.blueHighlight,
|
|
|
|
|
fontSize: 24
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Label of the page indicator (Android).
|
|
|
|
|
*/
|
|
|
|
|
pageIndicatorText: {
|
|
|
|
|
color: ColorPalette.blueHighlight
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Top level style of the paged list.
|
|
|
|
|
*/
|
|
|
|
|
pagedList: {
|
|
|
|
|
flex: 1
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The paged list container View.
|
|
|
|
|
*/
|
|
|
|
|
pagedListContainer: {
|
|
|
|
|
flex: 1,
|
|
|
|
|
flexDirection: 'column'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Disabled style for the container.
|
|
|
|
|
*/
|
|
|
|
|
pagedListContainerDisabled: {
|
|
|
|
|
opacity: 0.2
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2018-02-14 10:50:48 -06:00
|
|
|
const SECTION_LIST_STYLES = {
|
2018-02-13 17:33:03 -06:00
|
|
|
/**
|
|
|
|
|
* The style of the actual avatar.
|
|
|
|
|
*/
|
|
|
|
|
avatar: {
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
backgroundColor: `rgba(23, 160, 219, ${AVATAR_OPACITY})`,
|
2019-02-13 10:39:40 +01:00
|
|
|
justifyContent: 'center'
|
2018-02-13 17:33:03 -06:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* List of styles of the avatar of a remote meeting (not the default
|
|
|
|
|
* server). The number of colors are limited because they should match
|
|
|
|
|
* nicely.
|
|
|
|
|
*/
|
|
|
|
|
avatarColor1: {
|
|
|
|
|
backgroundColor: `rgba(232, 105, 156, ${AVATAR_OPACITY})`
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
avatarColor2: {
|
|
|
|
|
backgroundColor: `rgba(255, 198, 115, ${AVATAR_OPACITY})`
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
avatarColor3: {
|
|
|
|
|
backgroundColor: `rgba(128, 128, 255, ${AVATAR_OPACITY})`
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
avatarColor4: {
|
|
|
|
|
backgroundColor: `rgba(105, 232, 194, ${AVATAR_OPACITY})`
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
avatarColor5: {
|
|
|
|
|
backgroundColor: `rgba(234, 255, 128, ${AVATAR_OPACITY})`
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The style of the avatar container that makes the avatar rounded.
|
|
|
|
|
*/
|
|
|
|
|
avatarContainer: {
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
flexDirection: 'row',
|
|
|
|
|
justifyContent: 'space-around',
|
|
|
|
|
padding: 5
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Simple {@code Text} content of the avatar (the actual initials).
|
|
|
|
|
*/
|
|
|
|
|
avatarContent: {
|
|
|
|
|
backgroundColor: 'rgba(0, 0, 0, 0)',
|
|
|
|
|
color: OVERLAY_FONT_COLOR,
|
2019-02-13 10:39:40 +01:00
|
|
|
fontSize: Math.floor(AVATAR_SIZE / 2),
|
2018-02-13 17:33:03 -06:00
|
|
|
fontWeight: '100',
|
|
|
|
|
textAlign: 'center'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The top level container style of the list.
|
|
|
|
|
*/
|
|
|
|
|
container: {
|
|
|
|
|
flex: 1
|
2018-02-02 15:50:16 +01:00
|
|
|
},
|
|
|
|
|
|
2018-02-13 17:33:03 -06:00
|
|
|
list: {
|
|
|
|
|
flex: 1,
|
|
|
|
|
flexDirection: 'column'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
listItem: {
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
flex: 1,
|
|
|
|
|
flexDirection: 'row',
|
2018-09-25 14:48:03 +02:00
|
|
|
padding: 5
|
2018-02-13 17:33:03 -06:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
listItemDetails: {
|
|
|
|
|
flex: 1,
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
overflow: 'hidden',
|
|
|
|
|
paddingHorizontal: 5
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
listItemText: {
|
|
|
|
|
color: OVERLAY_FONT_COLOR,
|
|
|
|
|
fontSize: 14
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
listItemTitle: {
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
fontSize: 16
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
listSection: {
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
backgroundColor: 'rgba(255, 255, 255, 0.2)',
|
|
|
|
|
flex: 1,
|
|
|
|
|
flexDirection: 'row',
|
2018-09-25 14:48:03 +02:00
|
|
|
paddingVertical: 5,
|
|
|
|
|
paddingHorizontal: 10
|
2018-02-13 17:33:03 -06:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
listSectionText: {
|
|
|
|
|
color: OVERLAY_FONT_COLOR,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
fontWeight: 'normal'
|
|
|
|
|
},
|
|
|
|
|
|
2018-03-20 14:51:51 +01:00
|
|
|
pullToRefresh: {
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
flex: 1,
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
justifyContent: 'center',
|
|
|
|
|
padding: 20
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
pullToRefreshIcon: {
|
|
|
|
|
backgroundColor: 'transparent',
|
|
|
|
|
color: OVERLAY_FONT_COLOR,
|
|
|
|
|
fontSize: 20
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
pullToRefreshText: {
|
|
|
|
|
backgroundColor: 'transparent',
|
|
|
|
|
color: OVERLAY_FONT_COLOR
|
|
|
|
|
},
|
|
|
|
|
|
2018-02-13 17:33:03 -06:00
|
|
|
touchableView: {
|
|
|
|
|
flexDirection: 'row'
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
2019-01-22 11:35:28 +01:00
|
|
|
export const TINTED_VIEW_DEFAULT = {
|
|
|
|
|
backgroundColor: ColorPalette.appBackground,
|
|
|
|
|
opacity: 0.8
|
|
|
|
|
};
|
|
|
|
|
|
2018-02-13 17:33:03 -06:00
|
|
|
/**
|
2018-06-01 14:53:46 -05:00
|
|
|
* The styles of the generic React {@code Component}s implemented by the feature
|
|
|
|
|
* base/react.
|
2018-02-13 17:33:03 -06:00
|
|
|
*/
|
|
|
|
|
export default createStyleSheet({
|
2018-04-24 15:11:25 +02:00
|
|
|
...PAGED_LIST_STYLES,
|
2019-03-20 22:23:19 +01:00
|
|
|
...SECTION_LIST_STYLES
|
2018-02-02 15:48:43 +01:00
|
|
|
});
|