rn,recording: fix not displaying Dropbox storage text
This commit is contained in:
parent
01abc4e8a8
commit
f9071b8b6b
|
@ -6,6 +6,7 @@ import {
|
||||||
createRecordingDialogEvent,
|
createRecordingDialogEvent,
|
||||||
sendAnalytics
|
sendAnalytics
|
||||||
} from '../../../analytics';
|
} from '../../../analytics';
|
||||||
|
import { ColorSchemeRegistry } from '../../../base/color-scheme';
|
||||||
import {
|
import {
|
||||||
_abstractMapStateToProps
|
_abstractMapStateToProps
|
||||||
} from '../../../base/dialog';
|
} from '../../../base/dialog';
|
||||||
|
@ -22,16 +23,12 @@ import { connect } from '../../../base/redux';
|
||||||
import { ColorPalette, StyleType } from '../../../base/styles';
|
import { ColorPalette, StyleType } from '../../../base/styles';
|
||||||
import { authorizeDropbox, updateDropboxToken } from '../../../dropbox';
|
import { authorizeDropbox, updateDropboxToken } from '../../../dropbox';
|
||||||
|
|
||||||
import {
|
|
||||||
default as styles,
|
|
||||||
DROPBOX_LOGO,
|
|
||||||
ICON_SHARE,
|
|
||||||
JITSI_LOGO
|
|
||||||
} from './styles';
|
|
||||||
|
|
||||||
import { RECORDING_TYPES } from '../../constants';
|
import { RECORDING_TYPES } from '../../constants';
|
||||||
import { getRecordingDurationEstimation } from '../../functions';
|
import { getRecordingDurationEstimation } from '../../functions';
|
||||||
|
|
||||||
|
import { DROPBOX_LOGO, ICON_SHARE, JITSI_LOGO } from './styles';
|
||||||
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -39,6 +36,11 @@ type Props = {
|
||||||
*/
|
*/
|
||||||
_dialogStyles: StyleType,
|
_dialogStyles: StyleType,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The color-schemed stylesheet of this component.
|
||||||
|
*/
|
||||||
|
_styles: StyleType,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The redux dispatch function.
|
* The redux dispatch function.
|
||||||
*/
|
*/
|
||||||
|
@ -138,6 +140,8 @@ class StartRecordingDialogContent extends Component<Props> {
|
||||||
* @returns {React$Component}
|
* @returns {React$Component}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
|
const { _styles: styles } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container
|
<Container
|
||||||
className = 'recording-dialog'
|
className = 'recording-dialog'
|
||||||
|
@ -161,10 +165,13 @@ class StartRecordingDialogContent extends Component<Props> {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
_dialogStyles,
|
_dialogStyles,
|
||||||
|
_styles: styles,
|
||||||
isValidating,
|
isValidating,
|
||||||
onSharingSettingChanged,
|
onSharingSettingChanged,
|
||||||
selectedRecordingService,
|
selectedRecordingService,
|
||||||
sharingSetting, t } = this.props;
|
sharingSetting,
|
||||||
|
t
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
const controlDisabled = selectedRecordingService !== RECORDING_TYPES.JITSI_REC_SERVICE;
|
const controlDisabled = selectedRecordingService !== RECORDING_TYPES.JITSI_REC_SERVICE;
|
||||||
let mainContainerClasses = 'recording-header recording-header-line';
|
let mainContainerClasses = 'recording-header recording-header-line';
|
||||||
|
@ -222,7 +229,7 @@ class StartRecordingDialogContent extends Component<Props> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { _dialogStyles, isValidating, t } = this.props;
|
const { _dialogStyles, _styles: styles, isValidating, t } = this.props;
|
||||||
|
|
||||||
const switchContent
|
const switchContent
|
||||||
= this.props.integrationsEnabled
|
= this.props.integrationsEnabled
|
||||||
|
@ -274,7 +281,7 @@ class StartRecordingDialogContent extends Component<Props> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { _dialogStyles, isTokenValid, isValidating, t } = this.props;
|
const { _dialogStyles, _styles: styles, isTokenValid, isValidating, t } = this.props;
|
||||||
|
|
||||||
let content = null;
|
let content = null;
|
||||||
let switchContent = null;
|
let switchContent = null;
|
||||||
|
@ -421,7 +428,7 @@ class StartRecordingDialogContent extends Component<Props> {
|
||||||
* @returns {React$Component}
|
* @returns {React$Component}
|
||||||
*/
|
*/
|
||||||
_renderSignOut() {
|
_renderSignOut() {
|
||||||
const { spaceLeft, t, userName } = this.props;
|
const { _styles: styles, spaceLeft, t, userName } = this.props;
|
||||||
const duration = getRecordingDurationEstimation(spaceLeft);
|
const duration = getRecordingDurationEstimation(spaceLeft);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -471,12 +478,22 @@ class StartRecordingDialogContent extends Component<Props> {
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
_onSignOut() {
|
_onSignOut() {
|
||||||
sendAnalytics(
|
sendAnalytics(createRecordingDialogEvent('start', 'signOut.button'));
|
||||||
createRecordingDialogEvent('start', 'signOut.button')
|
|
||||||
);
|
|
||||||
this.props.dispatch(updateDropboxToken());
|
this.props.dispatch(updateDropboxToken());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default translate(
|
/**
|
||||||
connect(_abstractMapStateToProps)(StartRecordingDialogContent));
|
* Maps part of the redux state to the props of this component.
|
||||||
|
*
|
||||||
|
* @param {Object} state - The Redux state.
|
||||||
|
* @returns {Props}
|
||||||
|
*/
|
||||||
|
function _mapStateToProps(state) {
|
||||||
|
return {
|
||||||
|
..._abstractMapStateToProps(state),
|
||||||
|
_styles: ColorSchemeRegistry.get(state, 'StartRecordingDialogContent')
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translate(connect(_mapStateToProps)(StartRecordingDialogContent));
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
|
import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
|
||||||
import { BoxModel, ColorPalette } from '../../../base/styles';
|
import { BoxModel, ColorPalette } from '../../../base/styles';
|
||||||
|
|
||||||
// XXX The "standard" {@code BoxModel.padding} has been deemed insufficient in
|
// XXX The "standard" {@code BoxModel.padding} has been deemed insufficient in
|
||||||
|
@ -13,9 +14,10 @@ export const ICON_SHARE = require('../../../../../images/icon-users.png');
|
||||||
export const JITSI_LOGO = require('../../../../../images/jitsiLogo_square.png');
|
export const JITSI_LOGO = require('../../../../../images/jitsiLogo_square.png');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The styles of the React {@code Components} of the feature recording.
|
* Color schemed styles for the @{code StartRecordingDialogContent} component.
|
||||||
*/
|
*/
|
||||||
export default {
|
ColorSchemeRegistry.register('StartRecordingDialogContent', {
|
||||||
|
|
||||||
container: {
|
container: {
|
||||||
flex: 0,
|
flex: 0,
|
||||||
flexDirection: 'column'
|
flexDirection: 'column'
|
||||||
|
@ -64,6 +66,6 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
text: {
|
text: {
|
||||||
color: ColorPalette.white
|
color: schemeColor('text')
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
|
Loading…
Reference in New Issue