From ebb06cdeafdf367664e0fb0a6c5de8a4c26b67ef Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 13 Jan 2025 20:23:45 -0500 Subject: [PATCH] Moving totp and delete account settings into their own cards. (#2907) - Fixes #2896 --- src/shared/components/person/settings.tsx | 176 +++++++++++----------- 1 file changed, 92 insertions(+), 84 deletions(-) diff --git a/src/shared/components/person/settings.tsx b/src/shared/components/person/settings.tsx index 3e9a2728..a1f269d0 100644 --- a/src/shared/components/person/settings.tsx +++ b/src/shared/components/person/settings.tsx @@ -451,7 +451,13 @@ export class Settings extends Component {
{this.changePasswordHtmlForm()}
-
{this.importExport()}
+
{this.totpSection()}
+
+
+
{this.importExportForm()}
+
+
+
{this.deleteAccountForm()}
@@ -523,10 +529,7 @@ export class Settings extends Component { />
-
- {this.totpSection()}
-
-
+ + ); + } + + deleteAccountForm() { + return ( + <> +

{I18NextService.i18n.t("delete_account")}

+ + - {this.state.deleteAccountShowConfirm && ( - <> - - -
-
- - -
+ {I18NextService.i18n.t("delete_account")} + + {this.state.deleteAccountShowConfirm && ( + <> + + +
+
+ +
- - - - )} - +
+ + + + )} ); @@ -1248,9 +1254,11 @@ export class Settings extends Component { !!UserService.Instance.myUserInfo?.local_user_view.local_user .totp_2fa_enabled; const { generateTotpRes } = this.state; + const totpActionStr = totpEnabled ? "disable_totp" : "enable_totp"; return ( <> +

{I18NextService.i18n.t(totpActionStr)}

{totpEnabled ? (