Adhere to better eslint rules

This commit is contained in:
Michael Telatynski 2021-07-23 10:23:45 +01:00
parent 88884bbaad
commit f5630acea7
92 changed files with 710 additions and 348 deletions

View file

@ -665,15 +665,19 @@ export default class CallView extends React.Component<IProps, IState> {
let fullScreenButton;
if (this.props.call.type === CallType.Video && !this.props.pipMode) {
fullScreenButton = <div className="mx_CallView_header_button mx_CallView_header_button_fullscreen"
onClick={this.onFullscreenClick} title={_t("Fill Screen")}
fullScreenButton = <div
className="mx_CallView_header_button mx_CallView_header_button_fullscreen"
onClick={this.onFullscreenClick}
title={_t("Fill Screen")}
/>;
}
let expandButton;
if (this.props.pipMode) {
expandButton = <div className="mx_CallView_header_button mx_CallView_header_button_expand"
onClick={this.onExpandClick} title={_t("Return to call")}
expandButton = <div
className="mx_CallView_header_button mx_CallView_header_button_expand"
onClick={this.onExpandClick}
title={_t("Return to call")}
/>;
}
@ -685,7 +689,7 @@ export default class CallView extends React.Component<IProps, IState> {
let header: React.ReactNode;
if (!this.props.pipMode) {
header = <div className="mx_CallView_header">
<div className="mx_CallView_header_phoneIcon"></div>
<div className="mx_CallView_header_phoneIcon" />
<span className="mx_CallView_header_callType">{ callTypeText }</span>
{ headerControls }
</div>;

View file

@ -68,13 +68,19 @@ export default class Dialpad extends React.PureComponent<IProps> {
for (let i = 0; i < BUTTONS.length; i++) {
const button = BUTTONS[i];
const digitSubtext = BUTTON_LETTERS[i];
buttonNodes.push(<DialPadButton key={button} kind={DialPadButtonKind.Digit}
digit={button} digitSubtext={digitSubtext} onButtonPress={this.props.onDigitPress}
buttonNodes.push(<DialPadButton
key={button}
kind={DialPadButtonKind.Digit}
digit={button}
digitSubtext={digitSubtext}
onButtonPress={this.props.onDigitPress}
/>);
}
if (this.props.hasDial) {
buttonNodes.push(<DialPadButton key="dial" kind={DialPadButtonKind.Dial}
buttonNodes.push(<DialPadButton
key="dial"
kind={DialPadButtonKind.Dial}
onButtonPress={this.props.onDialPress}
/>);
}

View file

@ -81,14 +81,18 @@ export default class DialpadModal extends React.PureComponent<IProps, IState> {
// Only show the backspace button if the field has content
let dialPadField;
if (this.state.value.length !== 0) {
dialPadField = <Field className="mx_DialPadModal_field" id="dialpad_number"
dialPadField = <Field
className="mx_DialPadModal_field"
id="dialpad_number"
value={this.state.value}
autoFocus={true}
onChange={this.onChange}
postfixComponent={backspaceButton}
/>;
} else {
dialPadField = <Field className="mx_DialPadModal_field" id="dialpad_number"
dialPadField = <Field
className="mx_DialPadModal_field"
id="dialpad_number"
value={this.state.value}
autoFocus={true}
onChange={this.onChange}

View file

@ -136,7 +136,7 @@ export default class VideoFeed extends React.Component<IProps, IState> {
const avatarSize = this.props.pipMode ? 76 : 160;
return (
<div className={classnames(videoClasses)} >
<div className={classnames(videoClasses)}>
<MemberAvatar
member={member}
height={avatarSize}