,
+ {
+ onFinished: () => {
+ loadBackupStatus();
+ },
+ },
+ undefined,
+ /* priority = */ false,
+ /* static = */ true,
+ );
+ }, [loadBackupStatus]);
+
+ useEffect(() => {
+ // async, but handles its own exceptions
+ loadBackupStatus();
+ }, [loadBackupStatus]);
+
+ const onAllowKeyStorageChange = useCallback(
+ (checked: boolean) => {
+ if (checked) {
+ startNewBackup();
+ }
+ },
+ [startNewBackup],
+ );
+
+ if (loading) {
+ return ;
+ }
+
+ if (error) {
+ return {_t("settings|encryption|error_loading_key_backup_status")}
;
+ }
+
+ return (
+ <>
+
+ {_t("settings|encryption|key_storage_body", undefined, {
+ a: (sub: string) => (
+
+ {sub}
+
+ ),
+ })}
+
+
+ >
+ );
+};
+
+export default KeyBackupPanel;
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 21619b99d7..a29ad90f0a 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -2171,6 +2171,9 @@
"title": "Bridges"
},
"delete_avatar_label": "Delete avatar",
+ "encryption": {
+ "title": "Encryption"
+ },
"general": {
"alias_field_has_domain_invalid": "Missing domain separator e.g. (:domain.org)",
"alias_field_has_localpart_invalid": "Missing room name or separator e.g. (my-room:domain.org)",
@@ -2477,6 +2480,13 @@
"emoji_autocomplete": "Enable Emoji suggestions while typing",
"enable_markdown": "Enable Markdown",
"enable_markdown_description": "Start messages with /plain to send without markdown.",
+ "encryption": {
+ "allow_key_storage": "Allow key storage",
+ "dialog_title": "Settings: Encryption",
+ "error_loading_key_backup_status": "Unable to load key backup status",
+ "key_storage_body": "Store your cryptographic identity and message keys securely on the server. This will allow you to view your message history on any new devices. Learn more",
+ "key_storage_title": "Key storage"
+ },
"general": {
"account_management_section": "Account management",
"account_section": "Account",