Merge pull request #11940 from ramonlsouza/navbar-mobile-changes

Remove recording button text on phones
This commit is contained in:
Anton Georgiev 2021-04-08 11:03:00 -04:00 committed by GitHub
commit 1809f1640a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 8 deletions

View File

@ -4,6 +4,7 @@ import humanizeSeconds from '/imports/utils/humanizeSeconds';
import Tooltip from '/imports/ui/components/tooltip/component';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import cx from 'classnames';
import { styles } from './styles';
const intlMessages = defineMessages({
@ -103,6 +104,7 @@ class RecordingIndicator extends PureComponent {
allowStartStopRecording,
notify,
micUser,
isPhone,
} = this.props;
const { time } = this.state;
@ -116,12 +118,15 @@ class RecordingIndicator extends PureComponent {
: intlMessages.recordingIndicatorOff);
let recordTitle = '';
if (!recording) {
recordTitle = time > 0
? intl.formatMessage(intlMessages.resumeTitle)
: intl.formatMessage(intlMessages.startTitle);
} else {
recordTitle = intl.formatMessage(intlMessages.stopTitle);
if (!isPhone) {
if (!recording) {
recordTitle = time > 0
? intl.formatMessage(intlMessages.resumeTitle)
: intl.formatMessage(intlMessages.startTitle);
} else {
recordTitle = intl.formatMessage(intlMessages.stopTitle);
}
}
const recordingToggle = () => {
@ -169,7 +174,7 @@ class RecordingIndicator extends PureComponent {
>
{recordingIndicatorIcon}
<div className={styles.presentationTitle}>
<div className={cx(styles.presentationTitle, (!isPhone || recording) && styles.presentationTitleMargin)}>
{recording
? (
<span className={styles.visuallyHidden}>

View File

@ -5,6 +5,7 @@ import Auth from '/imports/ui/services/auth';
import { notify } from '/imports/ui/services/notification';
import VoiceUsers from '/imports/api/voice-users';
import RecordIndicator from './component';
import deviceInfo from '/imports/utils/deviceInfo';
const RecordIndicatorContainer = props => (
<RecordIndicator {...props} />
@ -40,5 +41,6 @@ export default withTracker(() => {
time: recordObeject && recordObeject.time,
notify,
micUser,
isPhone: deviceInfo.isPhone,
};
})(RecordIndicatorContainer);

View File

@ -65,7 +65,6 @@
color: var(--color-white);
font-size: var(--font-size-base);
padding: 0;
margin-left: var(--sm-padding-x);
margin-right: 0;
white-space: nowrap;
overflow: hidden;
@ -86,6 +85,10 @@
}
}
.presentationTitleMargin {
margin-left: var(--sm-padding-x);
}
.recordingStatusViewOnly {
display: flex;
}