diff --git a/front/app/(public)/login.tsx b/front/app/(public)/login.tsx
new file mode 100644
index 00000000..e69de29b
diff --git a/front/packages/ui/src/index.ts b/front/packages/ui/src/index.ts
index a8d43d75..99eb2e65 100644
--- a/front/packages/ui/src/index.ts
+++ b/front/packages/ui/src/index.ts
@@ -25,7 +25,7 @@ export { MovieDetails, ShowDetails } from "./details";
export { CollectionPage } from "./collection";
export { Player } from "./player";
export { SearchPage } from "./search";
-export { ServerUrlPage, LoginPage, RegisterPage, OidcCallbackPage } from "./login";
+export { ServerUrlPage, LoginPage, RegisterPage, OidcCallbackPage } from "../../../src/ui/login";
export { DownloadPage, DownloadProvider } from "./downloads";
export { SettingsPage } from "./settings";
export { AdminPage } from "./admin";
diff --git a/front/packages/ui/src/login/index.ts b/front/packages/ui/src/login/index.ts
deleted file mode 100644
index da4c05a7..00000000
--- a/front/packages/ui/src/login/index.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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, see .
- */
-
-export { LoginPage } from "./login";
-export { RegisterPage } from "./register";
-export { ServerUrlPage } from "./server-url";
-export { OidcCallbackPage } from "./oidc";
diff --git a/front/packages/ui/src/login/password-input.tsx b/front/packages/ui/src/login/password-input.tsx
deleted file mode 100644
index 3cc55945..00000000
--- a/front/packages/ui/src/login/password-input.tsx
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * 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, see .
- */
-
-import { IconButton, Input } from "@kyoo/primitives";
-import Visibility from "@material-symbols/svg-400/rounded/visibility-fill.svg";
-import VisibilityOff from "@material-symbols/svg-400/rounded/visibility_off-fill.svg";
-import { type ComponentProps, useState } from "react";
-import { px, useYoshiki } from "yoshiki/native";
-
-export const PasswordInput = (props: ComponentProps) => {
- const { css } = useYoshiki();
- const [show, setVisibility] = useState(false);
-
- return (
- setVisibility(!show)}
- {...css({ width: px(19), height: px(19), m: 0, p: 0 })}
- />
- }
- {...props}
- />
- );
-};
diff --git a/front/packages/ui/src/settings/account.tsx b/front/packages/ui/src/settings/account.tsx
index 9af82464..233d7cf4 100644
--- a/front/packages/ui/src/settings/account.tsx
+++ b/front/packages/ui/src/settings/account.tsx
@@ -33,7 +33,7 @@ import { type ComponentProps, useState } from "react";
import { useTranslation } from "react-i18next";
import { View } from "react-native";
import { rem, useYoshiki } from "yoshiki/native";
-import { PasswordInput } from "../login/password-input";
+import { PasswordInput } from "../../../../src/ui/login/password-input";
import { Preference, SettingsContainer } from "./base";
import Username from "@material-symbols/svg-400/outlined/badge.svg";
diff --git a/front/routes.d.ts b/front/routes.d.ts
index 4904a9fc..ae4ecfe6 100644
--- a/front/routes.d.ts
+++ b/front/routes.d.ts
@@ -6,7 +6,7 @@ import type { OneRouter } from 'one'
declare module 'one' {
export namespace OneRouter {
export interface __routes extends Record {
- StaticRoutes: `/` | `/(app)` | `/(app)/` | `/_sitemap`
+ StaticRoutes: `/` | `/(app)` | `/(app)/` | `/(public)/login` | `/_sitemap` | `/login`
DynamicRoutes: never
DynamicRouteTemplate: never
IsTyped: true
diff --git a/front/src/primitives/button.tsx b/front/src/primitives/button.tsx
index bb63ca10..804db671 100644
--- a/front/src/primitives/button.tsx
+++ b/front/src/primitives/button.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
import { type ComponentType, type ForwardedRef, type ReactElement, forwardRef } from "react";
import { type Falsy, type PressableProps, View } from "react-native";
import { type Theme, useYoshiki } from "yoshiki/native";
diff --git a/front/src/primitives/divider.tsx b/front/src/primitives/divider.tsx
index 03176ce7..ef5ed340 100644
--- a/front/src/primitives/divider.tsx
+++ b/front/src/primitives/divider.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
import { HR as EHR } from "@expo/html-elements";
import { type Stylable, px, useYoshiki } from "yoshiki/native";
import { ts } from "./utils";
diff --git a/front/src/primitives/index.ts b/front/src/primitives/index.ts
index f5d9ba32..748e1dea 100644
--- a/front/src/primitives/index.ts
+++ b/front/src/primitives/index.ts
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
export { Header, Main, Nav, Footer, UL } from "@expo/html-elements";
export * from "./text";
export * from "./theme";
@@ -28,7 +8,7 @@ export * from "./links";
// export * from "./skeleton";
// export * from "./tooltip";
// export * from "./container";
-// export * from "./divider";
+export * from "./divider";
// export * from "./progress";
// export * from "./slider";
// export * from "./snackbar";
@@ -36,7 +16,7 @@ export * from "./links";
// export * from "./menu";
// export * from "./popup";
// export * from "./select";
-// export * from "./input";
+export * from "./input";
export * from "./button";
// export * from "./chip";
diff --git a/front/src/primitives/input.tsx b/front/src/primitives/input.tsx
index 598a5830..29dd90f1 100644
--- a/front/src/primitives/input.tsx
+++ b/front/src/primitives/input.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
import { type ReactNode, forwardRef, useState } from "react";
import { TextInput, type TextInputProps, View, type ViewStyle } from "react-native";
import { type Theme, px, useYoshiki } from "yoshiki/native";
diff --git a/front/src/primitives/links.tsx b/front/src/primitives/links.tsx
index 89327d90..09d90374 100644
--- a/front/src/primitives/links.tsx
+++ b/front/src/primitives/links.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
import { useLinkTo } from "one";
import { type ReactNode, forwardRef } from "react";
import {
diff --git a/front/src/primitives/utils/capitalize.ts b/front/src/primitives/utils/capitalize.ts
index ed700a9a..3017fd54 100644
--- a/front/src/primitives/utils/capitalize.ts
+++ b/front/src/primitives/utils/capitalize.ts
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
export const capitalize = (str: string): string => {
return str
.split(" ")
diff --git a/front/src/primitives/utils/head.tsx b/front/src/primitives/utils/head.tsx
index ed66a17b..b999f858 100644
--- a/front/src/primitives/utils/head.tsx
+++ b/front/src/primitives/utils/head.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
export const Head = ({
title,
description,
diff --git a/front/src/primitives/utils/head.web.tsx b/front/src/primitives/utils/head.web.tsx
index 8cbf0191..162e132b 100644
--- a/front/src/primitives/utils/head.web.tsx
+++ b/front/src/primitives/utils/head.web.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
// import NextHead from "next/head";
export const Head = ({
diff --git a/front/src/primitives/utils/index.tsx b/front/src/primitives/utils/index.tsx
index f410b378..9e3bea8e 100644
--- a/front/src/primitives/utils/index.tsx
+++ b/front/src/primitives/utils/index.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
export * from "./nojs";
export * from "./head";
export * from "./spacing";
diff --git a/front/src/primitives/utils/nojs.tsx b/front/src/primitives/utils/nojs.tsx
index 53bda1e6..8b361c1f 100644
--- a/front/src/primitives/utils/nojs.tsx
+++ b/front/src/primitives/utils/nojs.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
import type { ViewProps } from "react-native";
export const hiddenIfNoJs: ViewProps = { style: { $$css: true, noJs: "noJsHidden" } as any };
diff --git a/front/src/primitives/utils/page-style.tsx b/front/src/primitives/utils/page-style.tsx
index f8ff521a..fc658785 100644
--- a/front/src/primitives/utils/page-style.tsx
+++ b/front/src/primitives/utils/page-style.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
import { useSafeAreaInsets } from "react-native-safe-area-context";
export const usePageStyle = () => {
diff --git a/front/src/primitives/utils/page-style.web.tsx b/front/src/primitives/utils/page-style.web.tsx
index de178959..ced291ba 100644
--- a/front/src/primitives/utils/page-style.web.tsx
+++ b/front/src/primitives/utils/page-style.web.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
export const usePageStyle = () => {
return {} as const;
};
diff --git a/front/src/primitives/utils/spacing.tsx b/front/src/primitives/utils/spacing.tsx
index c120fe88..2cb39cdc 100644
--- a/front/src/primitives/utils/spacing.tsx
+++ b/front/src/primitives/utils/spacing.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
import { Platform } from "react-native";
import { px } from "yoshiki/native";
diff --git a/front/src/primitives/utils/touchonly.tsx b/front/src/primitives/utils/touchonly.tsx
index fef304ac..630e2cf1 100644
--- a/front/src/primitives/utils/touchonly.tsx
+++ b/front/src/primitives/utils/touchonly.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
import { Platform, type ViewProps } from "react-native";
export const TouchOnlyCss = () => {
diff --git a/front/packages/ui/src/login/form.tsx b/front/src/ui/login/form.tsx
similarity index 70%
rename from front/packages/ui/src/login/form.tsx
rename to front/src/ui/login/form.tsx
index a85f6047..727b1774 100644
--- a/front/packages/ui/src/login/form.tsx
+++ b/front/src/ui/login/form.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
import { imageFn } from "@kyoo/models";
import { ts } from "@kyoo/primitives";
import type { ReactNode } from "react";
diff --git a/front/src/ui/login/index.ts b/front/src/ui/login/index.ts
new file mode 100644
index 00000000..3801e442
--- /dev/null
+++ b/front/src/ui/login/index.ts
@@ -0,0 +1,4 @@
+export { LoginPage } from "./login";
+export { RegisterPage } from "./register";
+export { ServerUrlPage } from "./server-url";
+export { OidcCallbackPage } from "./oidc";
diff --git a/front/packages/ui/src/login/login.tsx b/front/src/ui/login/login.tsx
similarity index 61%
rename from front/packages/ui/src/login/login.tsx
rename to front/src/ui/login/login.tsx
index 34621273..034e28d9 100644
--- a/front/packages/ui/src/login/login.tsx
+++ b/front/src/ui/login/login.tsx
@@ -1,32 +1,10 @@
-/*
- * 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, see .
- */
-
-import { type QueryPage, login } from "@kyoo/models";
-import { A, Button, H1, Input, P, ts } from "@kyoo/primitives";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { Trans } from "react-i18next";
import { Platform } from "react-native";
-import { useRouter } from "solito/router";
import { percent, px, useYoshiki } from "yoshiki/native";
-import { DefaultLayout } from "../layout";
+import { type QueryPage, login } from "~/models";
+import { A, Button, H1, Input, P, ts } from "~/primitives";
import { FormPage } from "./form";
import { OidcLogin } from "./oidc";
import { PasswordInput } from "./password-input";
@@ -43,13 +21,6 @@ export const LoginPage: QueryPage<{ apiUrl?: string; error?: string }> = ({
const { t } = useTranslation();
const { css } = useYoshiki();
- useEffect(() => {
- if (!apiUrl && Platform.OS !== "web")
- router.replace("/server-url", undefined, {
- experimental: { nativeBehavior: "stack-replace", isNestedNavigator: false },
- });
- }, [apiUrl, router]);
-
return (
{t("login.login")}
@@ -101,5 +72,3 @@ export const LoginPage: QueryPage<{ apiUrl?: string; error?: string }> = ({
};
LoginPage.getFetchUrls = () => [OidcLogin.query()];
-LoginPage.isPublic = true;
-LoginPage.getLayout = DefaultLayout;
diff --git a/front/packages/ui/src/login/oidc.tsx b/front/src/ui/login/oidc.tsx
similarity index 76%
rename from front/packages/ui/src/login/oidc.tsx
rename to front/src/ui/login/oidc.tsx
index e7447f3e..1fa43bac 100644
--- a/front/packages/ui/src/login/oidc.tsx
+++ b/front/src/ui/login/oidc.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
import {
type QueryIdentifier,
type QueryPage,
@@ -32,7 +12,7 @@ import { useTranslation } from "react-i18next";
import { ImageBackground, View } from "react-native";
import { useRouter } from "solito/router";
import { percent, rem, useYoshiki } from "yoshiki/native";
-import { ErrorView } from "../../../../src/ui/errors";
+import { ErrorView } from "../errors";
export const OidcLogin = ({ apiUrl }: { apiUrl?: string }) => {
const { css } = useYoshiki();
diff --git a/front/src/ui/login/password-input.tsx b/front/src/ui/login/password-input.tsx
new file mode 100644
index 00000000..21014938
--- /dev/null
+++ b/front/src/ui/login/password-input.tsx
@@ -0,0 +1,25 @@
+import { IconButton, Input } from "@kyoo/primitives";
+import Visibility from "@material-symbols/svg-400/rounded/visibility-fill.svg";
+import VisibilityOff from "@material-symbols/svg-400/rounded/visibility_off-fill.svg";
+import { type ComponentProps, useState } from "react";
+import { px, useYoshiki } from "yoshiki/native";
+
+export const PasswordInput = (props: ComponentProps) => {
+ const { css } = useYoshiki();
+ const [show, setVisibility] = useState(false);
+
+ return (
+ setVisibility(!show)}
+ {...css({ width: px(19), height: px(19), m: 0, p: 0 })}
+ />
+ }
+ {...props}
+ />
+ );
+};
diff --git a/front/packages/ui/src/login/register.tsx b/front/src/ui/login/register.tsx
similarity index 78%
rename from front/packages/ui/src/login/register.tsx
rename to front/src/ui/login/register.tsx
index 23d2c772..f6d76fed 100644
--- a/front/packages/ui/src/login/register.tsx
+++ b/front/src/ui/login/register.tsx
@@ -1,23 +1,3 @@
-/*
- * 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, see .
- */
-
import { type QueryPage, login } from "@kyoo/models";
import { A, Button, H1, Input, P, ts } from "@kyoo/primitives";
import { useEffect, useState } from "react";
@@ -26,7 +6,7 @@ import { Trans } from "react-i18next";
import { Platform } from "react-native";
import { useRouter } from "solito/router";
import { percent, px, useYoshiki } from "yoshiki/native";
-import { DefaultLayout } from "../layout";
+import { DefaultLayout } from "../../../packages/ui/src/layout";
import { FormPage } from "./form";
import { OidcLogin } from "./oidc";
import { PasswordInput } from "./password-input";
diff --git a/front/packages/ui/src/login/server-url.tsx b/front/src/ui/login/server-url.tsx
similarity index 70%
rename from front/packages/ui/src/login/server-url.tsx
rename to front/src/ui/login/server-url.tsx
index cfb23fae..7fb74d70 100644
--- a/front/packages/ui/src/login/server-url.tsx
+++ b/front/src/ui/login/server-url.tsx
@@ -1,37 +1,10 @@
-/*
- * 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, see .
- */
-
-import {
- type QueryIdentifier,
- type QueryPage,
- type ServerInfo,
- ServerInfoP,
- useFetch,
-} from "@kyoo/models";
-import { Button, H1, HR, Input, Link, P, ts } from "@kyoo/primitives";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { ImageBackground, Platform, View } from "react-native";
-import { useRouter } from "solito/router";
import { type Theme, percent, useYoshiki } from "yoshiki/native";
-import { DefaultLayout } from "../layout";
+import { type ServerInfo, ServerInfoP } from "~/models";
+import { Button, H1, HR, Input, Link, P, ts } from "~/primitives";
+import { DefaultLayout } from "../../../packages/ui/src/layout";
export const cleanApiUrl = (apiUrl: string) => {
if (Platform.OS === "web") return undefined;