From 886ca8a2406929004ad321e1907e8cd0890ac008 Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Fri, 21 Jan 2022 20:04:39 +0000 Subject: [PATCH] split login forms into own files --- src/ui/pages/Login.tsx | 108 ++------------------------------ src/ui/pages/Login_Token.tsx | 49 +++++++++++++++ src/ui/pages/Login_Username.tsx | 57 +++++++++++++++++ src/ui/pages/Unseal.tsx | 4 +- src/ui/pages/Unseal_Form.tsx | 8 +-- src/ui/pages/Unseal_QR.tsx | 10 +-- 6 files changed, 121 insertions(+), 115 deletions(-) create mode 100644 src/ui/pages/Login_Token.tsx create mode 100644 src/ui/pages/Login_Username.tsx diff --git a/src/ui/pages/Login.tsx b/src/ui/pages/Login.tsx index 6770a29..c9a6acd 100644 --- a/src/ui/pages/Login.tsx +++ b/src/ui/pages/Login.tsx @@ -1,110 +1,10 @@ -import { Button } from "../elements/Button"; import { Component, JSX } from "preact"; import { DefaultPageProps } from "../../types/DefaultPageProps"; -import { Form } from "../elements/Form"; -import { Margin } from "../elements/Margin"; -import { MarginInline } from "../elements/MarginInline"; import { PageTitle } from "../elements/PageTitle"; -import { route } from "preact-router"; -import { setErrorText } from "../../pageUtils"; +import { TokenLoginForm } from "./Login_Token"; +import { UsernameLoginForm } from "./Login_Username"; import i18next from "i18next"; -export class TokenLoginForm extends Component { - constructor() { - super(); - } - - render(): JSX.Element { - return ( -
this.onSubmit(data)}> - - - - -