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

@ -46,7 +46,7 @@ export default class BridgeSettingsTab extends React.Component<IProps> {
const client = MatrixClientPeg.get();
const roomState = client.getRoom(roomId).currentState;
return BRIDGE_EVENT_TYPES.map(typeName => roomState.getStateEvents(typeName)).flat(1);
return BRIDGE_EVENT_TYPES.map((typeName) => roomState.getStateEvents(typeName)).flat(1);
}
render() {
@ -58,38 +58,52 @@ export default class BridgeSettingsTab extends React.Component<IProps> {
let content: JSX.Element;
if (bridgeEvents.length > 0) {
content = <div>
<p>{ _t(
"This room is bridging messages to the following platforms. " +
"<a>Learn more.</a>", {},
{
// TODO: We don't have this link yet: this will prevent the translators
// having to re-translate the string when we do.
a: sub => <a href={BRIDGES_LINK} target="_blank" rel="noreferrer noopener">{ sub }</a>,
},
) }</p>
<ul className="mx_RoomSettingsDialog_BridgeList">
{ bridgeEvents.map((event) => this.renderBridgeCard(event, room)) }
</ul>
</div>;
content = (
<div>
<p>
{_t(
"This room is bridging messages to the following platforms. " + "<a>Learn more.</a>",
{},
{
// TODO: We don't have this link yet: this will prevent the translators
// having to re-translate the string when we do.
a: (sub) => (
<a href={BRIDGES_LINK} target="_blank" rel="noreferrer noopener">
{sub}
</a>
),
},
)}
</p>
<ul className="mx_RoomSettingsDialog_BridgeList">
{bridgeEvents.map((event) => this.renderBridgeCard(event, room))}
</ul>
</div>
);
} else {
content = <p>{ _t(
"This room isn't bridging messages to any platforms. " +
"<a>Learn more.</a>", {},
{
// TODO: We don't have this link yet: this will prevent the translators
// having to re-translate the string when we do.
a: sub => <a href={BRIDGES_LINK} target="_blank" rel="noreferrer noopener">{ sub }</a>,
},
) }</p>;
content = (
<p>
{_t(
"This room isn't bridging messages to any platforms. " + "<a>Learn more.</a>",
{},
{
// TODO: We don't have this link yet: this will prevent the translators
// having to re-translate the string when we do.
a: (sub) => (
<a href={BRIDGES_LINK} target="_blank" rel="noreferrer noopener">
{sub}
</a>
),
},
)}
</p>
);
}
return (
<div className="mx_SettingsTab">
<div className="mx_SettingsTab_heading">{ _t("Bridges") }</div>
<div className='mx_SettingsTab_section mx_SettingsTab_subsectionText'>
{ content }
</div>
<div className="mx_SettingsTab_heading">{_t("Bridges")}</div>
<div className="mx_SettingsTab_section mx_SettingsTab_subsectionText">{content}</div>
</div>
);
}