Skip to content

Commit

Permalink
Add button, and dialog when clicked. Why does it ask for password?
Browse files Browse the repository at this point in the history
  • Loading branch information
estellecomment committed Nov 10, 2023
1 parent 149c567 commit 6b74e81
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modules/tchap-translations/tchap_translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1148,5 +1148,17 @@
"You can close this disconnected tab, and go to the other %(brand)s tab.": {
"en": "You can close this disconnected tab, and go to the other %(brand)s tab.",
"fr": "Vous pouvez fermer cet onglet déconnecté, et aller à l'autre onglet %(brand)s."
},
"Sauvegardez vos messages automatiquement": {
"en": "Back up your messages automatically",
"fr": "Sauvegardez vos messages automatiquement"
},
"Activer la sauvegarde automatique": {
"en": "Setup Secure Backup",
"fr": "Activer la sauvegarde automatique"
},
"Vous pourrez les récupérez sur n'importe quel appareil à l'aide du Code de Récupération.": {
"en": "You will be able to retrieve them on any device using the Recovery Code.",
"fr": "Vous pourrez les récupérez sur n'importe quel appareil à l'aide du Code de Récupération."
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/node_modules/matrix-react-sdk/src/hooks/useUserOnboardingTasks.ts b/node_modules/matrix-react-sdk/src/hooks/useUserOnboardingTasks.ts
index 43e819c..82ec3e5 100644
--- a/node_modules/matrix-react-sdk/src/hooks/useUserOnboardingTasks.ts
+++ b/node_modules/matrix-react-sdk/src/hooks/useUserOnboardingTasks.ts
@@ -29,6 +29,7 @@ import SdkConfig from "../SdkConfig";
import { UseCase } from "../settings/enums/UseCase";
import { useSettingValue } from "./useSettings";
import { UserOnboardingContext } from "./useUserOnboardingContext";
+import { accessSecretStorage } from "../SecurityManager";

interface UserOnboardingTask {
id: string;
@@ -93,6 +94,20 @@ const tasks: UserOnboardingTask[] = [
onClick: onClickStartDm,
},
},
+ { // :TCHAP:
+ id: "setup-secure-backup",
+ title: _t("Sauvegardez vos messages automatiquement"),
+ description: _t("Vous pourrez les récupérez sur n'importe quel appareil à l'aide du Code de Récupération."),
+ completed: (ctx: UserOnboardingContext) => {
+
+ }, // todo
+ action: {
+ label: _t("Activer la sauvegarde automatique"),
+ onClick: (ev: ButtonEvent) => {
+ accessSecretStorage();
+ },
+ },
+ }, // end :TCHAP:
{
id: "download-apps",
title: () =>
8 changes: 8 additions & 0 deletions patches/patches.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,13 @@
"files": [
"src/components/structures/auth/SessionLockStolenView.tsx"
]
},
"add-enable-secure-backup-in-onboarding-steps": {
"comments": "Filed in element-web : https://github.com/vector-im/element-web/issues/26540",
"package": "matrix-react-sdk",
"files": [
"src/hooks/useUserOnboardingTasks.ts",
"src/hooks/useUserOnboardingContext.ts"
]
}
}

0 comments on commit 6b74e81

Please sign in to comment.