{_t("Cryptography")}
-
-
- {_t("Session ID:")} |
-
- {deviceId}
- |
-
-
- {_t("Session key:")} |
-
-
- {identityKey}
-
- |
-
-
+
+ {_t("Session ID:")} |
+
+ {deviceId}
+ |
+
+
+ {_t("Session key:")} |
+
+
+ {identityKey}
+
+ |
+
{importExportButtons}
{noSendUnverifiedSetting}
diff --git a/src/components/views/settings/SecureBackupPanel.tsx b/src/components/views/settings/SecureBackupPanel.tsx
index 747378684c0..2b19a8af583 100644
--- a/src/components/views/settings/SecureBackupPanel.tsx
+++ b/src/components/views/settings/SecureBackupPanel.tsx
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
-import React from "react";
+import React, { ReactNode } from "react";
import { IKeyBackupInfo } from "matrix-js-sdk/src/crypto/keybackup";
import { TrustInfo } from "matrix-js-sdk/src/crypto/backup";
import { CryptoEvent } from "matrix-js-sdk/src/crypto";
@@ -231,9 +231,9 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
sessionsRemaining,
} = this.state;
- let statusDescription;
- let extraDetailsTableRows;
- let extraDetails;
+ let statusDescription: JSX.Element;
+ let extraDetailsTableRows: JSX.Element | undefined;
+ let extraDetails: JSX.Element | undefined;
const actions: JSX.Element[] = [];
if (error) {
statusDescription =
{_t("Unable to load key backup status")}
;
@@ -267,7 +267,7 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
restoreButtonCaption = _t("Connect this session to Key Backup");
}
- let uploadStatus;
+ let uploadStatus: ReactNode;
if (!MatrixClientPeg.get().getKeyBackupEnabled()) {
// No upload status to show when backup disabled.
uploadStatus = "";
@@ -391,11 +391,11 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
extraDetailsTableRows = (
<>
- {_t("Backup version:")} |
+ {_t("Backup version:")} |
{backupInfo.version} |
- {_t("Algorithm:")} |
+ {_t("Algorithm:")} |
{backupInfo.algorithm} |
>
@@ -460,7 +460,7 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
}
}
- let actionRow;
+ let actionRow: JSX.Element | undefined;
if (actions.length) {
actionRow =
{actions}
;
}
@@ -478,28 +478,26 @@ export default class SecureBackupPanel extends React.PureComponent<{}, IState> {
{_t("Advanced")}
-
-
- {_t("Backup key stored:")} |
- {backupKeyStored === true ? _t("in secret storage") : _t("not stored")} |
-
-
- {_t("Backup key cached:")} |
-
- {backupKeyCached ? _t("cached locally") : _t("not found locally")}
- {backupKeyWellFormedText}
- |
-
-
- {_t("Secret storage public key:")} |
- {secretStorageKeyInAccount ? _t("in account data") : _t("not found")} |
-
-
- {_t("Secret storage:")} |
- {secretStorageReady ? _t("ready") : _t("not ready")} |
-
- {extraDetailsTableRows}
-
+
+ {_t("Backup key stored:")} |
+ {backupKeyStored === true ? _t("in secret storage") : _t("not stored")} |
+
+
+ {_t("Backup key cached:")} |
+
+ {backupKeyCached ? _t("cached locally") : _t("not found locally")}
+ {backupKeyWellFormedText}
+ |
+
+
+ {_t("Secret storage public key:")} |
+ {secretStorageKeyInAccount ? _t("in account data") : _t("not found")} |
+
+
+ {_t("Secret storage:")} |
+ {secretStorageReady ? _t("ready") : _t("not ready")} |
+
+ {extraDetailsTableRows}
{extraDetails}
diff --git a/src/components/views/spaces/SpaceCreateMenu.tsx b/src/components/views/spaces/SpaceCreateMenu.tsx
index 64fc408b774..ded069778d5 100644
--- a/src/components/views/spaces/SpaceCreateMenu.tsx
+++ b/src/components/views/spaces/SpaceCreateMenu.tsx
@@ -89,8 +89,8 @@ const SpaceCreateMenuType: React.FC<{
}> = ({ title, description, className, onClick }) => {
return (
- {title}
- {description}
+ {title}
+ {description}
);
};
diff --git a/src/components/views/spaces/SpacePublicShare.tsx b/src/components/views/spaces/SpacePublicShare.tsx
index 85446ab2517..68bf940831a 100644
--- a/src/components/views/spaces/SpacePublicShare.tsx
+++ b/src/components/views/spaces/SpacePublicShare.tsx
@@ -52,7 +52,7 @@ const SpacePublicShare: React.FC
= ({ space, onFinished }) => {
}
}}
>
- {_t("Share invite link")}
+ {_t("Share invite link")}
{copiedText}
{space.canInvite(MatrixClientPeg.get()?.getUserId()) && shouldShowComponent(UIComponent.InviteUsers) ? (
@@ -63,8 +63,8 @@ const SpacePublicShare: React.FC = ({ space, onFinished }) => {
showRoomInviteDialog(space.roomId);
}}
>
- {_t("Invite people")}
- {_t("Invite with email or username")}
+ {_t("Invite people")}
+ {_t("Invite with email or username")}
) : null}
diff --git a/test/components/structures/SpaceHierarchy-test.tsx b/test/components/structures/SpaceHierarchy-test.tsx
index 5f248140c89..b81a84facaa 100644
--- a/test/components/structures/SpaceHierarchy-test.tsx
+++ b/test/components/structures/SpaceHierarchy-test.tsx
@@ -32,11 +32,9 @@ import DMRoomMap from "../../../src/utils/DMRoomMap";
import SettingsStore from "../../../src/settings/SettingsStore";
// Fake random strings to give a predictable snapshot for checkbox IDs
-jest.mock("matrix-js-sdk/src/randomstring", () => {
- return {
- randomString: () => "abdefghi",
- };
-});
+jest.mock("matrix-js-sdk/src/randomstring", () => ({
+ randomString: () => "abdefghi",
+}));
describe("SpaceHierarchy", () => {
describe("showRoom", () => {
diff --git a/test/components/views/location/LocationShareMenu-test.tsx b/test/components/views/location/LocationShareMenu-test.tsx
index 9ee667f319e..8ab7b46cbd0 100644
--- a/test/components/views/location/LocationShareMenu-test.tsx
+++ b/test/components/views/location/LocationShareMenu-test.tsx
@@ -72,6 +72,11 @@ jest.mock("../../../../src/Modal", () => ({
ModalManagerEvent: { Opened: "opened" },
}));
+// Fake random strings to give a predictable snapshot for IDs
+jest.mock("matrix-js-sdk/src/randomstring", () => ({
+ randomString: () => "abdefghi",
+}));
+
describe("