Skip to content

Build your personal knowledge base with Trilium Notes

fix(oauth): tidy the not-connected OpenID card layout

Elian Dorana6d23826d3de
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index c5c1b135d6..c3cc450844 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -1756,7 +1756,8 @@
"oauth_user_account": "Account name",
"oauth_user_email": "Email address",
"oauth_user_not_logged_in": "Not logged in!",
- "oauth_not_enrolled_hint": "OpenID Connect is configured but no account is connected yet. Connect your account to make it the active sign-in method — until then, you'll keep signing in with your password.",
+ "oauth_not_enrolled_title": "No account connected",
+ "oauth_not_enrolled_hint": "OpenID Connect is configured, but no account is connected yet. Connect your account to make it the active sign-in method; until then, you'll keep signing in with your password.",
"oauth_connect_label": "Connect account",
"oauth_connect_description": "Sign in with your provider once to bind your account. Only this account will be able to sign in afterwards.",
"oauth_connect_button": "Connect account",
diff --git a/apps/client/src/widgets/type_widgets/options/password.tsx b/apps/client/src/widgets/type_widgets/options/password.tsx
index 9f6d58bba7..d859dbb69f 100644
--- a/apps/client/src/widgets/type_widgets/options/password.tsx
+++ b/apps/client/src/widgets/type_widgets/options/password.tsx
@@ -10,7 +10,7 @@ import protected_session_holder from "../../../services/protected_session_holder
import server from "../../../services/server";
import toast from "../../../services/toast";
import { isElectron } from "../../../services/utils";
-import Admonition from "../../react/Admonition";
+import Admonition, { ExtendedAdmonition } from "../../react/Admonition";
import Button from "../../react/Button";
import Collapsible from "../../react/Collapsible";
import FormGroup from "../../react/FormGroup";
@@ -320,8 +320,15 @@ function OAuthStatusCard({ status, refreshStatus }: { status?: OAuthStatus, refr
</>
) : (
<>
+ <ExtendedAdmonition
+ type="note"
+ icon="bx bx-info-circle"
+ title={t("multi_factor_authentication.oauth_not_enrolled_title")}
+ >
+ {t("multi_factor_authentication.oauth_not_enrolled_hint")}
+ </ExtendedAdmonition>
+
<OAuthProviderRows status={status} />
- <Admonition type="note">{t("multi_factor_authentication.oauth_not_enrolled_hint")}</Admonition>
<OptionsRowWithButton
label={t("multi_factor_authentication.oauth_connect_label")}