X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fshared%2Fcomponents%2Fhome%2Fsetup.tsx;h=7b3d4c27ea9b072e968b4e2ce63f2654346b6280;hb=b7ec7ae3110c560968e0cb24a32f1fe9166eec29;hp=fb4c710f3dd4c3a8dab8adf0d8450819445cadf6;hpb=0fee7cba3b63bcd9854215e5b545e657b1a82efa;p=lemmy-ui.git diff --git a/src/shared/components/home/setup.tsx b/src/shared/components/home/setup.tsx index fb4c710..7b3d4c2 100644 --- a/src/shared/components/home/setup.tsx +++ b/src/shared/components/home/setup.tsx @@ -7,9 +7,10 @@ import { LoginResponse, Register, } from "lemmy-js-client"; -import { FirstLoadService, I18NextService, UserService } from "../../services"; +import { I18NextService, UserService } from "../../services"; import { HttpService, RequestState } from "../../services/HttpService"; import { Spinner } from "../common/icon"; +import PasswordInput from "../common/password-input"; import { SiteForm } from "./site-form"; interface State { @@ -47,8 +48,6 @@ export class Setup extends Component { super(props, context); this.handleCreateSite = this.handleCreateSite.bind(this); - - FirstLoadService.isFirstLoad; } async componentDidMount() { @@ -65,7 +64,9 @@ export class Setup extends Component {
-

{I18NextService.i18n.t("lemmy_instance_setup")}

+

+ {I18NextService.i18n.t("lemmy_instance_setup")} +

{!this.state.doneRegisteringUser ? ( this.registerUser() ) : ( @@ -86,7 +87,7 @@ export class Setup extends Component { registerUser() { return (
-
{I18NextService.i18n.t("setup_admin")}
+

{I18NextService.i18n.t("setup_admin")}

-
- -
- -
+
+
-
- -
- -
+
+
@@ -206,10 +187,8 @@ export class Setup extends Component { if (i.state.registerRes.state == "success") { const data = i.state.registerRes.data; - UserService.Instance.login(data); - if (UserService.Instance.jwtInfo) { - i.setState({ doneRegisteringUser: true }); - } + UserService.Instance.login({ res: data }); + i.setState({ doneRegisteringUser: true }); } } }