Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Enable Secure Backup" in onboarding steps #819

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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."
},
"Sauvegarder vos messages automatiquement": {
"en": "Back up your messages automatically",
"fr": "Sauvegarder 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,41 @@
diff --git a/node_modules/matrix-react-sdk/src/hooks/useUserOnboardingTasks.ts b/node_modules/matrix-react-sdk/src/hooks/useUserOnboardingTasks.ts
index 43e819c..aa75cef 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;
@@ -54,12 +55,28 @@ const onClickStartDm = (ev: ButtonEvent): void => {
};

const tasks: UserOnboardingTask[] = [
+ /** :TCHAP: delete the first task, we have too many
{
id: "create-account",
title: _t("Create account"),
description: _t("onboarding|you_made_it"),
completed: () => true,
},
+ */
+ { // :TCHAP:
+ id: "setup-secure-backup",
+ title: _t("Sauvegarder 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: "find-friends",
title: _t("onboarding|find_friends"),
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"
]
}
}
Loading