From 341d7992074b4fe85f11079961c38bd0d25d4d2c Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Thu, 26 Jan 2023 22:45:54 +0900 Subject: [PATCH] Bootstrap login page --- front/apps/mobile/app/login/index.tsx | 23 +++++++++++++++++++ front/apps/web/src/pages/login/index.tsx | 24 ++++++++++++++++++++ front/packages/ui/src/details/show.tsx | 2 +- front/packages/ui/src/index.ts | 1 + front/packages/ui/src/login/index.tsx | 29 ++++++++++++++++++++++++ front/packages/ui/src/navbar/index.tsx | 2 +- 6 files changed, 79 insertions(+), 2 deletions(-) create mode 100644 front/apps/mobile/app/login/index.tsx create mode 100644 front/apps/web/src/pages/login/index.tsx create mode 100644 front/packages/ui/src/login/index.tsx diff --git a/front/apps/mobile/app/login/index.tsx b/front/apps/mobile/app/login/index.tsx new file mode 100644 index 00000000..fbb64ab9 --- /dev/null +++ b/front/apps/mobile/app/login/index.tsx @@ -0,0 +1,23 @@ +/* + * 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 { LoginPage } from "@kyoo/ui"; + +export default LoginPage; diff --git a/front/apps/web/src/pages/login/index.tsx b/front/apps/web/src/pages/login/index.tsx new file mode 100644 index 00000000..8bc2c179 --- /dev/null +++ b/front/apps/web/src/pages/login/index.tsx @@ -0,0 +1,24 @@ +/* + * 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 { LoginPage } from "@kyoo/ui"; +import { withRoute } from "~/router"; + +export default withRoute(LoginPage); diff --git a/front/packages/ui/src/details/show.tsx b/front/packages/ui/src/details/show.tsx index 04e64f4a..a66f7b65 100644 --- a/front/packages/ui/src/details/show.tsx +++ b/front/packages/ui/src/details/show.tsx @@ -95,7 +95,7 @@ export const ShowDetails: QueryPage<{ slug: string; season: string }> = ({ slug, ); }; -ShowDetails.getFetchUrls = ({ slug, season = 1 }) => [ +ShowDetails.getFetchUrls = ({ slug, season }) => [ query(slug), // ShowStaff.query(slug), EpisodeList.query(slug, season), diff --git a/front/packages/ui/src/index.ts b/front/packages/ui/src/index.ts index ca995b98..b1064b5e 100644 --- a/front/packages/ui/src/index.ts +++ b/front/packages/ui/src/index.ts @@ -23,3 +23,4 @@ export { BrowsePage } from "./browse"; export { MovieDetails, ShowDetails } from "./details"; export { Player } from "./player"; export { SearchPage } from "./search"; +export { LoginPage } from "./login"; diff --git a/front/packages/ui/src/login/index.tsx b/front/packages/ui/src/login/index.tsx new file mode 100644 index 00000000..7baca94d --- /dev/null +++ b/front/packages/ui/src/login/index.tsx @@ -0,0 +1,29 @@ +/* + * 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 { QueryPage } from "@kyoo/models"; +import { View } from "react-native"; +import { DefaultLayout } from "../layout"; + +export const LoginPage: QueryPage = () => { + return ; +}; + +LoginPage.getLayout = DefaultLayout; diff --git a/front/packages/ui/src/navbar/index.tsx b/front/packages/ui/src/navbar/index.tsx index ebc7fcdb..a1ef2a43 100644 --- a/front/packages/ui/src/navbar/index.tsx +++ b/front/packages/ui/src/navbar/index.tsx @@ -88,7 +88,7 @@ export const NavbarProfile = () => { return (