Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(login): address review feedback on the login page
Elian Doran29aa281ce564
diff --git a/apps/client/src/login_page.tsx b/apps/client/src/login_page.tsxindex 44053ddfcb..bb8e4b4fde 100644--- a/apps/client/src/login_page.tsx+++ b/apps/client/src/login_page.tsx@@ -52,7 +52,7 @@ function App() {text={(<>{config.ssoIssuerIcon- ? <img src={config.ssoIssuerIcon} alt="" onError={(e) => (e.currentTarget as HTMLImageElement).remove()} />+ ? <img src={config.ssoIssuerIcon} alt="" onError={(e) => { (e.currentTarget as HTMLImageElement).style.display = "none"; }} />: null}{t("login.sign_in_with_sso", { ssoIssuerName: config.ssoIssuerName ?? "" })}</>@@ -138,7 +138,9 @@ function PasswordLogin({ illustration, totpEnabled, error, errorId, onError }: {onError(t("login.incorrect-password"));}} catch {- onError(t("login.incorrect-password"));+ // fetch only rejects on network-level failures (server unreachable, DNS, etc.) —+ // not on HTTP error statuses — so this is a connection problem, not bad credentials.+ onError(t("login.connection-error"));} finally {setSubmitting(false);}diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex 78ca015ea0..97b4b51ee5 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -2859,6 +2859,7 @@"incorrect-totp": "One-time password is incorrect. Please try again.","incorrect-recovery-code": "Recovery code is incorrect, or has already been used.","too-many-attempts": "Too many login attempts. Please wait a few minutes and try again.",+ "connection-error": "Couldn't reach the server. Check your connection and try again.","sign_in_with_sso": "Sign in with {{ssoIssuerName}}","sso-wrong-account": "That account isn't the one linked to this Trilium instance. Sign in with the linked account.","sso-not-enrolled": "Single sign-on isn't set up yet. Sign in with your password first, then link your account from the settings."