mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-02 21:24:20 -04:00
Add basics tabs on android
This commit is contained in:
parent
7403be6519
commit
7451452088
50
front/apps/mobile/app/(app)/(tabs)/_layout.tsx
Normal file
50
front/apps/mobile/app/(app)/(tabs)/_layout.tsx
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/*
|
||||||
|
* 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 <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { Icon } from "@kyoo/primitives";
|
||||||
|
import { Tabs } from "expo-router";
|
||||||
|
import { useTheme } from "yoshiki/native";
|
||||||
|
import Home from "@material-symbols/svg-400/rounded/home.svg";
|
||||||
|
import Browse from "@material-symbols/svg-400/rounded/browse.svg";
|
||||||
|
|
||||||
|
export default function TabsLayout() {
|
||||||
|
return (
|
||||||
|
<Tabs
|
||||||
|
screenOptions={{
|
||||||
|
headerShown: false,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Tabs.Screen
|
||||||
|
name="index"
|
||||||
|
options={{
|
||||||
|
tabBarLabel: "Home",
|
||||||
|
tabBarIcon: ({ color, size }) => <Icon icon={Home} color={color} size={size} />,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Tabs.Screen
|
||||||
|
name="browse"
|
||||||
|
options={{
|
||||||
|
tabBarLabel: "Browse",
|
||||||
|
tabBarIcon: ({ color, size }) => <Icon icon={Browse} color={color} size={size} />,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Tabs>
|
||||||
|
);
|
||||||
|
}
|
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { HomePage } from "@kyoo/ui";
|
import { HomePage } from "@kyoo/ui";
|
||||||
import { withRoute } from "../utils";
|
import { withRoute } from "../../utils";
|
||||||
|
|
||||||
export default withRoute(HomePage, {
|
export default withRoute(HomePage, {
|
||||||
options: { headerTransparent: true, headerStyle: { backgroundColor: "transparent" } },
|
options: { headerTransparent: true, headerStyle: { backgroundColor: "transparent" } },
|
@ -38,7 +38,6 @@ export default function SignGuard() {
|
|||||||
|
|
||||||
if (error) return <Redirect href={"/connection-error"} />;
|
if (error) return <Redirect href={"/connection-error"} />;
|
||||||
if (!account) return <Redirect href="/login" />;
|
if (!account) return <Redirect href="/login" />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
screenOptions={{
|
screenOptions={{
|
||||||
|
@ -19,13 +19,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { ComponentProps, ComponentType, ForwardedRef, forwardRef } from "react";
|
import React, { ComponentProps, ComponentType, ForwardedRef, forwardRef } from "react";
|
||||||
import { Platform, PressableProps, ViewStyle } from "react-native";
|
import { Platform, PressableProps } from "react-native";
|
||||||
import { SvgProps } from "react-native-svg";
|
import { SvgProps } from "react-native-svg";
|
||||||
import { YoshikiStyle } from "yoshiki";
|
import { YoshikiStyle } from "yoshiki";
|
||||||
import { px, Stylable, Theme, useYoshiki } from "yoshiki/native";
|
import { px, Stylable, Theme, useYoshiki } from "yoshiki/native";
|
||||||
import { PressableFeedback } from "./links";
|
import { PressableFeedback } from "./links";
|
||||||
import { alpha } from "./themes";
|
import { Breakpoint, focusReset, ts } from "./utils";
|
||||||
import { Breakpoint, focusReset, ts, useBreakpointValue } from "./utils";
|
|
||||||
import { P } from "./text";
|
import { P } from "./text";
|
||||||
|
|
||||||
declare module "react" {
|
declare module "react" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user