From 0551becafd7ff6b3bda2673de4cd80e51c5ea757 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 29 Jun 2021 13:42:19 +0100 Subject: [PATCH] Fix long lines --- src/components/structures/GroupView.js | 5 +++- src/components/structures/MatrixChat.tsx | 10 +++++-- .../structures/auth/Registration.tsx | 8 +++++- .../views/directory/NetworkDropdown.tsx | 24 +++++++++------- src/components/views/settings/BridgeTile.tsx | 4 ++- .../tabs/room/SecurityRoomSettingsTab.tsx | 28 ++++++++++++++++--- 6 files changed, 60 insertions(+), 19 deletions(-) diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index ac798386a9..38163e72ac 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -363,7 +363,10 @@ class FeaturedUser extends React.Component { "Failed to remove a user from the summary of %(groupId)s", { groupId: this.props.groupId }, ), - description: _t("The user '%(displayName)s' could not be removed from the summary.", { displayName }), + description: _t( + "The user '%(displayName)s' could not be removed from the summary.", + { displayName }, + ), }, ); }); diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index e683432127..33c04335d2 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -1131,8 +1131,14 @@ export default class MatrixChat extends React.PureComponent { description: ( { isSpace - ? _t("Are you sure you want to leave the space '%(spaceName)s'?", { spaceName: roomToLeave.name }) - : _t("Are you sure you want to leave the room '%(roomName)s'?", { roomName: roomToLeave.name }) } + ? _t( + "Are you sure you want to leave the space '%(spaceName)s'?", + { spaceName: roomToLeave.name }, + ) + : _t( + "Are you sure you want to leave the room '%(roomName)s'?", + { roomName: roomToLeave.name }, + )} { warnings } ), diff --git a/src/components/structures/auth/Registration.tsx b/src/components/structures/auth/Registration.tsx index add536da03..f27bed2cc3 100644 --- a/src/components/structures/auth/Registration.tsx +++ b/src/components/structures/auth/Registration.tsx @@ -487,7 +487,13 @@ export default class Registration extends React.Component { fragmentAfterLogin={this.props.fragmentAfterLogin} />

- { _t("%(ssoButtons)s Or %(usernamePassword)s", { ssoButtons: "", usernamePassword: "" }).trim() } + {_t( + "%(ssoButtons)s Or %(usernamePassword)s", + { + ssoButtons: "", + usernamePassword: "", + }, + ).trim()}

; } diff --git a/src/components/views/directory/NetworkDropdown.tsx b/src/components/views/directory/NetworkDropdown.tsx index 04caa7dab5..c57aa7bccc 100644 --- a/src/components/views/directory/NetworkDropdown.tsx +++ b/src/components/views/directory/NetworkDropdown.tsx @@ -216,16 +216,20 @@ const NetworkDropdown = ({ onOptionChange, protocols = {}, selectedServerName, s if (removableServers.has(server)) { const onClick = async () => { closeMenu(); - const { finished } = Modal.createTrackedDialog("Network Dropdown", "Remove server", QuestionDialog, { - title: _t("Are you sure?"), - description: _t("Are you sure you want to remove %(serverName)s", { - serverName: server, - }, { - b: serverName => { serverName }, - }), - button: _t("Remove"), - fixedWidth: false, - }, "mx_NetworkDropdown_dialog"); + const { finished } = Modal.createTrackedDialog( + "Network Dropdown", "Remove server", QuestionDialog, + { + title: _t("Are you sure?"), + description: _t("Are you sure you want to remove %(serverName)s", { + serverName: server, + }, { + b: serverName => { serverName }, + }), + button: _t("Remove"), + fixedWidth: false, + }, + "mx_NetworkDropdown_dialog", + ); const [ok] = await finished; if (!ok) return; diff --git a/src/components/views/settings/BridgeTile.tsx b/src/components/views/settings/BridgeTile.tsx index c8e57562bb..d3a0c5ea13 100644 --- a/src/components/views/settings/BridgeTile.tsx +++ b/src/components/views/settings/BridgeTile.tsx @@ -131,7 +131,9 @@ export default class BridgeTile extends React.PureComponent { const networkName = network.displayname || network.id; let networkLink = {networkName}; if (typeof network.external_url === "string" && isUrlPermitted(network.external_url)) { - networkLink = {networkName}; + networkLink = ( + {networkName} + ); } networkItem = _t("Workspace: ", {}, { networkLink: () => networkLink, diff --git a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx index 1c79836adf..4868ffd4fc 100644 --- a/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx +++ b/src/components/views/settings/tabs/room/SecurityRoomSettingsTab.tsx @@ -169,11 +169,21 @@ export default class SecurityRoomSettingsTab extends React.Component { + client.sendStateEvent( + this.props.roomId, + "m.room.join_rules", + { join_rule: joinRule }, + "", + ).catch((e) => { console.error(e); this.setState({ joinRule: beforeJoinRule }); }); - client.sendStateEvent(this.props.roomId, "m.room.guest_access", { guest_access: guestAccess }, "").catch((e) => { + client.sendStateEvent( + this.props.roomId, + "m.room.guest_access", + { guest_access: guestAccess }, + "", + ).catch((e) => { console.error(e); this.setState({ guestAccess: beforeGuestAccess }); }); @@ -215,11 +225,21 @@ export default class SecurityRoomSettingsTab extends React.Component { + client.sendStateEvent( + this.props.roomId, + "m.room.join_rules", + { join_rule: joinRule }, + "", + ).catch((e) => { console.error(e); this.setState({ joinRule: beforeJoinRule }); }); - client.sendStateEvent(this.props.roomId, "m.room.guest_access", { guest_access: guestAccess }, "").catch((e) => { + client.sendStateEvent( + this.props.roomId, + "m.room.guest_access", + { guest_access: guestAccess }, + "", + ).catch((e) => { console.error(e); this.setState({ guestAccess: beforeGuestAccess }); });