fix lint
This commit is contained in:
parent
fd6c594a8f
commit
7459e19f06
1 changed files with 27 additions and 11 deletions
|
@ -306,7 +306,7 @@ module.exports = React.createClass({
|
||||||
_t("%(errcode)s was returned while trying to access the room. If you think you're seeing this message in error, please <issueLink>submit a bug report</issueLink>.",
|
_t("%(errcode)s was returned while trying to access the room. If you think you're seeing this message in error, please <issueLink>submit a bug report</issueLink>.",
|
||||||
{ errcode: this.props.error.errcode },
|
{ errcode: this.props.error.errcode },
|
||||||
{ issueLink: label => <a href="https://github.com/vector-im/riot-web/issues/new/choose"
|
{ issueLink: label => <a href="https://github.com/vector-im/riot-web/issues/new/choose"
|
||||||
target="_blank" rel="noopener">{ label }</a> }
|
target="_blank" rel="noopener">{ label }</a> },
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
|
@ -324,12 +324,6 @@ module.exports = React.createClass({
|
||||||
subTitleElements = subTitle.map((t, i) => <p key={`subTitle${i}`}>{t}</p>);
|
subTitleElements = subTitle.map((t, i) => <p key={`subTitle${i}`}>{t}</p>);
|
||||||
}
|
}
|
||||||
|
|
||||||
const classes = classNames("mx_RoomPreviewBar", "dark-panel", {
|
|
||||||
"mx_RoomPreviewBar_panel": this.props.canPreview,
|
|
||||||
"mx_RoomPreviewBar_dialog": !this.props.canPreview,
|
|
||||||
"mx_RoomPreviewBar_dark": darkStyle,
|
|
||||||
});
|
|
||||||
|
|
||||||
let titleElement;
|
let titleElement;
|
||||||
if (showSpinner) {
|
if (showSpinner) {
|
||||||
titleElement = <h3 className="mx_RoomPreviewBar_spinnerTitle"><Spinner />{ title }</h3>;
|
titleElement = <h3 className="mx_RoomPreviewBar_spinnerTitle"><Spinner />{ title }</h3>;
|
||||||
|
@ -337,6 +331,30 @@ module.exports = React.createClass({
|
||||||
titleElement = <h3>{ title }</h3>;
|
titleElement = <h3>{ title }</h3>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let primaryButton;
|
||||||
|
if (primaryActionHandler) {
|
||||||
|
primaryButton = (
|
||||||
|
<AccessibleButton kind="primary" onClick={primaryActionHandler}>
|
||||||
|
{ primaryActionLabel }
|
||||||
|
</AccessibleButton>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
let secondaryButton;
|
||||||
|
if (secondaryActionHandler) {
|
||||||
|
secondaryButton = (
|
||||||
|
<AccessibleButton kind="secondary" onClick={secondaryActionHandler}>
|
||||||
|
{ secondaryActionLabel }
|
||||||
|
</AccessibleButton>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
const classes = classNames("mx_RoomPreviewBar", "dark-panel", {
|
||||||
|
"mx_RoomPreviewBar_panel": this.props.canPreview,
|
||||||
|
"mx_RoomPreviewBar_dialog": !this.props.canPreview,
|
||||||
|
"mx_RoomPreviewBar_dark": darkStyle,
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes}>
|
<div className={classes}>
|
||||||
<div className="mx_RoomPreviewBar_message">
|
<div className="mx_RoomPreviewBar_message">
|
||||||
|
@ -344,12 +362,10 @@ module.exports = React.createClass({
|
||||||
{ subTitleElements }
|
{ subTitleElements }
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_RoomPreviewBar_actions">
|
<div className="mx_RoomPreviewBar_actions">
|
||||||
{ secondaryActionHandler ? <AccessibleButton kind="secondary" onClick={secondaryActionHandler}>{ secondaryActionLabel }</AccessibleButton> : undefined }
|
{ secondaryButton }
|
||||||
{ primaryActionHandler ? <AccessibleButton kind="primary" onClick={primaryActionHandler}>{ primaryActionLabel }</AccessibleButton> : undefined }
|
{ primaryButton }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue