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
refactor(login): lay out fields with OptionsRow
Elian Doranc2329341ca70
diff --git a/apps/client/src/login_page.tsx b/apps/client/src/login_page.tsxindex 09e2047c49..bee292a57f 100644--- a/apps/client/src/login_page.tsx+++ b/apps/client/src/login_page.tsx@@ -9,10 +9,9 @@ import logo from "./assets/icon-color.svg?url";import { initLocale, t } from "./services/i18n";import Button from "./widgets/react/Button";import { Card, CardSection } from "./widgets/react/Card";-import FormGroup from "./widgets/react/FormGroup";import FormTextBox from "./widgets/react/FormTextBox";import SetupPage from "./widgets/react/SetupPage";-import { OptionsRowWithToggle } from "./widgets/type_widgets/options/components/OptionsRow";+import OptionsRow, { OptionsRowWithToggle } from "./widgets/type_widgets/options/components/OptionsRow";async function main() {await initLocale((window.glob.currentLocale?.id ?? "en") as LOCALE_IDS);@@ -132,29 +131,25 @@ function PasswordLogin({ illustration, totpEnabled, error, errorId, onError }: {><Card><CardSection>- <FormGroup label={t("login.password")} name="password">+ <OptionsRow name="password" label={t("login.password")} stacked><FormTextBoxinputRef={passwordRef} autoFocustype="password" name="password"currentValue={password} onChange={setPassword}autocomplete="current-password" required/>- </FormGroup>- </CardSection>+ </OptionsRow>- {totpEnabled && (- <CardSection>- <FormGroup label={t("login.totp-token")} name="totpToken">+ {totpEnabled && (+ <OptionsRow name="totpToken" label={t("login.totp-token")} stacked><FormTextBoxname="totpToken"currentValue={totpToken} onChange={setTotpToken}autocomplete="one-time-code" required/>- </FormGroup>- </CardSection>- )}+ </OptionsRow>+ )}- <CardSection><OptionsRowWithTogglename="rememberMe"label={t("login.remember-me")}