Merge pull request #11940 from ramonlsouza/navbar-mobile-changes
Remove recording button text on phones
This commit is contained in:
commit
1809f1640a
@ -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}>
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user