{t("login.server")}
- - > - )}{t("login.username")}
setUsername(value)} />{t("login.password")}
diff --git a/front/packages/ui/src/login/oidc.tsx b/front/packages/ui/src/login/oidc.tsx index 7caad26e..ac297413 100644 --- a/front/packages/ui/src/login/oidc.tsx +++ b/front/packages/ui/src/login/oidc.tsx @@ -19,7 +19,6 @@ */ import { - KyooErrors, QueryIdentifier, QueryPage, ServerInfo, @@ -31,7 +30,7 @@ import { Button, HR, P, Skeleton, ts } from "@kyoo/primitives"; import { View, ImageBackground } from "react-native"; import { percent, rem, useYoshiki } from "yoshiki/native"; import { useTranslation } from "react-i18next"; -import { useEffect, useRef, useState } from "react"; +import { useEffect, useRef } from "react"; import { useRouter } from "solito/router"; import { ErrorView } from "../errors"; diff --git a/front/packages/ui/src/login/register.tsx b/front/packages/ui/src/login/register.tsx index 4fe3f27c..6a6ada61 100644 --- a/front/packages/ui/src/login/register.tsx +++ b/front/packages/ui/src/login/register.tsx @@ -29,11 +29,9 @@ import { percent, px, useYoshiki } from "yoshiki/native"; import { DefaultLayout } from "../layout"; import { FormPage } from "./form"; import { PasswordInput } from "./password-input"; -import { cleanApiUrl } from "./login"; import { OidcLogin } from "./oidc"; export const RegisterPage: QueryPage = () => { - const [apiUrl, setApiUrl] = useState(""); const [email, setEmail] = useState(""); const [username, setUsername] = useState(""); const [password, setPassword] = useState(""); @@ -86,7 +84,6 @@ export const RegisterPage: QueryPage = () => { const { error } = await login( "register", { email, username, password, apiUrl: cleanApiUrl(apiUrl) }, - 5_000, ); setError(error); if (error) return; diff --git a/front/packages/ui/src/login/server-url.tsx b/front/packages/ui/src/login/server-url.tsx new file mode 100644 index 00000000..0a932fd2 --- /dev/null +++ b/front/packages/ui/src/login/server-url.tsx @@ -0,0 +1,101 @@ +/* + * Kyoo - A portable and vast media library solution. + * Copyright (c) Kyoo. + * + * See AUTHORS.md and LICENSE file in the project root for full license information. + * + * Kyoo is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * Kyoo is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kyoo. If not, seetheme.colors.red, alignSelf: "center" })}> + {error.errors[0]} +
+ )} +