Apply prettier formatting

This commit is contained in:
Michael Weimann 2022-12-12 12:24:14 +01:00
parent 1cac306093
commit 526645c791
No known key found for this signature in database
GPG key ID: 53F535A266BB9584
1576 changed files with 65385 additions and 62478 deletions

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import React from "react";
import { MatrixEvent } from "matrix-js-sdk/src/models/event";
import { _t } from "../../../languageHandler";
@ -34,43 +34,49 @@ export default class MJitsiWidgetEvent extends React.PureComponent<IProps> {
}
render() {
const url = this.props.mxEvent.getContent()['url'];
const prevUrl = this.props.mxEvent.getPrevContent()['url'];
const url = this.props.mxEvent.getContent()["url"];
const prevUrl = this.props.mxEvent.getPrevContent()["url"];
const senderName = this.props.mxEvent.sender?.name || this.props.mxEvent.getSender();
const room = MatrixClientPeg.get().getRoom(this.props.mxEvent.getRoomId());
const widgetId = this.props.mxEvent.getStateKey();
const widget = WidgetStore.instance.getRoom(room.roomId, true).widgets.find(w => w.id === widgetId);
const widget = WidgetStore.instance.getRoom(room.roomId, true).widgets.find((w) => w.id === widgetId);
let joinCopy = _t('Join the conference at the top of this room');
let joinCopy = _t("Join the conference at the top of this room");
if (widget && WidgetLayoutStore.instance.isInContainer(room, widget, Container.Right)) {
joinCopy = _t('Join the conference from the room information card on the right');
joinCopy = _t("Join the conference from the room information card on the right");
} else if (!widget) {
joinCopy = null;
}
if (!url) {
// removed
return <EventTileBubble
className="mx_MJitsiWidgetEvent"
title={_t('Video conference ended by %(senderName)s', { senderName })}
timestamp={this.props.timestamp}
/>;
return (
<EventTileBubble
className="mx_MJitsiWidgetEvent"
title={_t("Video conference ended by %(senderName)s", { senderName })}
timestamp={this.props.timestamp}
/>
);
} else if (prevUrl) {
// modified
return <EventTileBubble
className="mx_MJitsiWidgetEvent"
title={_t('Video conference updated by %(senderName)s', { senderName })}
subtitle={joinCopy}
timestamp={this.props.timestamp}
/>;
return (
<EventTileBubble
className="mx_MJitsiWidgetEvent"
title={_t("Video conference updated by %(senderName)s", { senderName })}
subtitle={joinCopy}
timestamp={this.props.timestamp}
/>
);
} else {
// assume added
return <EventTileBubble
className="mx_MJitsiWidgetEvent"
title={_t("Video conference started by %(senderName)s", { senderName })}
subtitle={joinCopy}
timestamp={this.props.timestamp}
/>;
return (
<EventTileBubble
className="mx_MJitsiWidgetEvent"
title={_t("Video conference started by %(senderName)s", { senderName })}
subtitle={joinCopy}
timestamp={this.props.timestamp}
/>
);
}
}
}