fix: Native styles fixes (#12606)

* feat(conference/native): update indicator styles

* feat(prejoin/native): removed unnecessary styles

* feat(mobile/navigation): fixed header buttons style

* feat(mobile/navigation): fixed linter
pull/12610/head jitsi-meet_8102
Calinteodor 2 years ago committed by GitHub
parent 93566e313e
commit 6bce0bc917
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      react/features/conference/components/native/styles.js
  2. 16
      react/features/mobile/navigation/components/HeaderNavigationButton.js
  3. 25
      react/features/mobile/navigation/components/styles.js
  4. 5
      react/features/prejoin/components/native/Prejoin.tsx
  5. 6
      react/features/prejoin/components/styles.js

@ -129,8 +129,8 @@ export default {
}, },
roomTimer: { roomTimer: {
color: BaseTheme.palette.text01,
...BaseTheme.typography.bodyShortBold, ...BaseTheme.typography.bodyShortBold,
color: BaseTheme.palette.text01,
paddingHorizontal: 8, paddingHorizontal: 8,
paddingVertical: 6, paddingVertical: 6,
textAlign: 'center' textAlign: 'center'
@ -138,8 +138,9 @@ export default {
roomTimerView: { roomTimerView: {
backgroundColor: BaseTheme.palette.ui03, backgroundColor: BaseTheme.palette.ui03,
borderRadius: 3, borderRadius: BaseTheme.shape.borderRadius,
justifyContent: 'center', justifyContent: 'center',
minHeight: 32,
minWidth: 50 minWidth: 50
}, },
@ -190,6 +191,7 @@ export default {
raisedHandsCountLabel: { raisedHandsCountLabel: {
alignItems: 'center', alignItems: 'center',
backgroundColor: BaseTheme.palette.warning02, backgroundColor: BaseTheme.palette.warning02,
borderRadius: BaseTheme.shape.borderRadius,
flexDirection: 'row', flexDirection: 'row',
marginLeft: BaseTheme.spacing[0], marginLeft: BaseTheme.spacing[0],
marginBottom: BaseTheme.spacing[0] marginBottom: BaseTheme.spacing[0]

@ -2,18 +2,11 @@ import React from 'react';
import { Text, TouchableRipple } from 'react-native-paper'; import { Text, TouchableRipple } from 'react-native-paper';
import { Icon } from '../../../base/icons'; import { Icon } from '../../../base/icons';
import type { StyleType } from '../../../base/styles';
import BaseTheme from '../../../base/ui/components/BaseTheme.native';
import { navigationStyles } from './styles'; import { navigationStyles } from './styles';
type Props = { type Props = {
/**
* Style of the header button .
*/
buttonStyle?: StyleType,
/** /**
* Is the button disabled? * Is the button disabled?
*/ */
@ -42,7 +35,6 @@ type Props = {
const HeaderNavigationButton const HeaderNavigationButton
= ({ = ({
buttonStyle,
disabled, disabled,
label, label,
onPress, onPress,
@ -55,14 +47,10 @@ const HeaderNavigationButton
src ? ( src ? (
<TouchableRipple <TouchableRipple
onPress = { onPress } onPress = { onPress }
style = { [ style = { navigationStyles.headerNavigationButtonIcon } >
buttonStyle,
navigationStyles.headerNavigationButtonIcon ] } >
<Icon <Icon
color = { BaseTheme.palette.link01Active }
size = { 24 } size = { 24 }
src = { src } src = { src } />
style = { navigationStyles.headerNavigationIcon } />
</TouchableRipple> </TouchableRipple>
) : ( ) : (
<TouchableRipple <TouchableRipple

@ -7,12 +7,12 @@ export const TEXT_COLOR = BaseTheme.palette.text01;
const HEADER_ACTION_BUTTON_SIZE = 17; const HEADER_ACTION_BUTTON_SIZE = 17;
const headerNavigationButton = { const headerNavigationButton = {
alignContent: 'center', alignItems: 'center',
height: '100%', justifyContent: 'center'
justifyItems: 'center'
}; };
const headerNavigationText = { const headerNavigationText = {
...BaseTheme.typography.bodyShortBoldLarge,
color: BaseTheme.palette.link01, color: BaseTheme.palette.link01,
fontSize: HEADER_ACTION_BUTTON_SIZE fontSize: HEADER_ACTION_BUTTON_SIZE
}; };
@ -49,29 +49,26 @@ export const navigationStyles = {
headerNavigationButtonIcon: { headerNavigationButtonIcon: {
...headerNavigationButton, ...headerNavigationButton,
paddingTop: 18, height: BaseTheme.spacing[5],
width: BaseTheme.spacing[7] paddingLeft: BaseTheme.spacing[3],
width: BaseTheme.spacing[5]
}, },
headerNavigationButtonText: { headerNavigationButtonText: {
...headerNavigationButton, ...headerNavigationButton,
paddingTop: 10, height: BaseTheme.spacing[9],
width: BaseTheme.spacing[10] width: BaseTheme.spacing[9]
},
headerNavigationIcon: {
marginLeft: 12
}, },
headerNavigationText: { headerNavigationText: {
...headerNavigationText, ...headerNavigationText,
marginLeft: BaseTheme.spacing[3] marginLeft: BaseTheme.spacing[2]
}, },
headerNavigationTextBold: { headerNavigationTextBold: {
...headerNavigationText, ...headerNavigationText,
...BaseTheme.typography.labelButton, ...BaseTheme.typography.bodyShortRegularLarge,
marginRight: BaseTheme.spacing[3] marginRight: BaseTheme.spacing[1]
}, },
unreadCounterContainer: { unreadCounterContainer: {

@ -126,18 +126,15 @@ const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {
let contentWrapperStyles; let contentWrapperStyles;
let contentContainerStyles; let contentContainerStyles;
let largeVideoContainerStyles; let largeVideoContainerStyles;
let toolboxContainerStyles;
if (aspectRatio === ASPECT_RATIO_NARROW) { if (aspectRatio === ASPECT_RATIO_NARROW) {
contentWrapperStyles = styles.contentWrapper; contentWrapperStyles = styles.contentWrapper;
contentContainerStyles = styles.contentContainer; contentContainerStyles = styles.contentContainer;
largeVideoContainerStyles = styles.largeVideoContainer; largeVideoContainerStyles = styles.largeVideoContainer;
toolboxContainerStyles = styles.toolboxContainer;
} else { } else {
contentWrapperStyles = styles.contentWrapperWide; contentWrapperStyles = styles.contentWrapperWide;
contentContainerStyles = styles.contentContainerWide; contentContainerStyles = styles.contentContainerWide;
largeVideoContainerStyles = styles.largeVideoContainerWide; largeVideoContainerStyles = styles.largeVideoContainerWide;
toolboxContainerStyles = styles.toolboxContainerWide;
} }
return ( return (
@ -161,7 +158,7 @@ const Prejoin: React.FC<IPrejoinProps> = ({ navigation }: IPrejoinProps) => {
</View> </View>
} }
<View style = { contentContainerStyles }> <View style = { contentContainerStyles }>
<View style = { toolboxContainerStyles }> <View style = { styles.toolboxContainer }>
<AudioMuteButton <AudioMuteButton
// @ts-ignore // @ts-ignore
styles = { styles.buttonStylesBorderless } /> styles = { styles.buttonStylesBorderless } />

@ -2,6 +2,7 @@ import BaseTheme from '../../base/ui/components/BaseTheme.native';
export default { export default {
joinButton: { joinButton: {
marginTop: BaseTheme.spacing[3], marginTop: BaseTheme.spacing[3],
width: 352 width: 352
@ -77,11 +78,6 @@ export default {
width: 148 width: 148
}, },
toolboxContainerWide: {
flexDirection: 'row',
justifyContent: 'center'
},
formWrapper: { formWrapper: {
alignItems: 'center', alignItems: 'center',
justifyContent: 'center' justifyContent: 'center'

Loading…
Cancel
Save