From 6b74e81352a492d4c36dc120fac8778574e4106d Mon Sep 17 00:00:00 2001 From: Estelle Comment Date: Thu, 9 Nov 2023 18:37:33 +0100 Subject: [PATCH] Add button, and dialog when clicked. Why does it ask for password? --- .../tchap_translations.json | 12 +++++++ .../matrix-react-sdk+3.81.0.patch | 33 +++++++++++++++++++ patches/patches.json | 8 +++++ 3 files changed, 53 insertions(+) create mode 100644 patches/add-enable-secure-backup-in-onboarding-steps/matrix-react-sdk+3.81.0.patch diff --git a/modules/tchap-translations/tchap_translations.json b/modules/tchap-translations/tchap_translations.json index caace71ae7..75e56c2c63 100644 --- a/modules/tchap-translations/tchap_translations.json +++ b/modules/tchap-translations/tchap_translations.json @@ -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." } } diff --git a/patches/add-enable-secure-backup-in-onboarding-steps/matrix-react-sdk+3.81.0.patch b/patches/add-enable-secure-backup-in-onboarding-steps/matrix-react-sdk+3.81.0.patch new file mode 100644 index 0000000000..96b03df77f --- /dev/null +++ b/patches/add-enable-secure-backup-in-onboarding-steps/matrix-react-sdk+3.81.0.patch @@ -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: () => diff --git a/patches/patches.json b/patches/patches.json index e5703279a6..9a955c6a28 100644 --- a/patches/patches.json +++ b/patches/patches.json @@ -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" + ] } } \ No newline at end of file