Skip to content

Build your personal knowledge base with Trilium Notes

feat(oauth): show account name and email as separate settings rows

Elian Doran9174ffa8f989
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index b1eb6947d1..121fe42922 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -1747,8 +1747,8 @@
"oauth_how_to_enable": "How to enable",
"oauth_server_config_hint": "Add the following to your config.ini file and restart the application:",
"oauth_server_env_hint": "Or set the following environment variables:",
- "oauth_user_account": "User Account: ",
- "oauth_user_email": "User Email: ",
+ "oauth_user_account": "Account name",
+ "oauth_user_email": "Email address",
"oauth_user_not_logged_in": "Not logged in!"
},
"shortcuts": {
diff --git a/apps/client/src/widgets/type_widgets/options/password.tsx b/apps/client/src/widgets/type_widgets/options/password.tsx
index 81ca85c25e..040c02fe30 100644
--- a/apps/client/src/widgets/type_widgets/options/password.tsx
+++ b/apps/client/src/widgets/type_widgets/options/password.tsx
@@ -259,14 +259,14 @@ function OAuthStatusCard({ status }: { status?: OAuthStatus }) {
}
>
{ configured ? (
- <div class="col-md-6">
- <span><b>{t("multi_factor_authentication.oauth_user_account")}</b></span>
- <span class="user-account-name">{status?.name ?? t("multi_factor_authentication.oauth_user_not_logged_in")}</span>
-
- <br />
- <span><b>{t("multi_factor_authentication.oauth_user_email")}</b></span>
- <span class="user-account-email">{status?.email ?? t("multi_factor_authentication.oauth_user_not_logged_in")}</span>
- </div>
+ <>
+ <OptionsRow name="oauth-user-account" label={t("multi_factor_authentication.oauth_user_account")}>
+ <span>{status?.name ?? t("multi_factor_authentication.oauth_user_not_logged_in")}</span>
+ </OptionsRow>
+ <OptionsRow name="oauth-user-email" label={t("multi_factor_authentication.oauth_user_email")}>
+ <span>{status?.email ?? t("multi_factor_authentication.oauth_user_not_logged_in")}</span>
+ </OptionsRow>
+ </>
) : (
<>
<p>{t("multi_factor_authentication.oauth_not_configured_hint")}</p>