mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Cleanup safe area colors
This commit is contained in:
parent
7451452088
commit
1c7c4d3ab2
@ -21,8 +21,8 @@
|
|||||||
import { Icon } from "@kyoo/primitives";
|
import { Icon } from "@kyoo/primitives";
|
||||||
import { Tabs } from "expo-router";
|
import { Tabs } from "expo-router";
|
||||||
import { useTheme } from "yoshiki/native";
|
import { useTheme } from "yoshiki/native";
|
||||||
import Home from "@material-symbols/svg-400/rounded/home.svg";
|
import Home from "@material-symbols/svg-400/rounded/home-fill.svg";
|
||||||
import Browse from "@material-symbols/svg-400/rounded/browse.svg";
|
import Browse from "@material-symbols/svg-400/rounded/browse-fill.svg";
|
||||||
|
|
||||||
export default function TabsLayout() {
|
export default function TabsLayout() {
|
||||||
return (
|
return (
|
||||||
|
@ -41,6 +41,7 @@ export default function SignGuard() {
|
|||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
screenOptions={{
|
screenOptions={{
|
||||||
|
navigationBarColor: theme.variant.background,
|
||||||
headerTitle: () => <NavbarTitle />,
|
headerTitle: () => <NavbarTitle />,
|
||||||
headerRight: () => <NavbarRight />,
|
headerRight: () => <NavbarRight />,
|
||||||
contentStyle: {
|
contentStyle: {
|
||||||
|
@ -34,9 +34,10 @@ import {
|
|||||||
Poppins_400Regular,
|
Poppins_400Regular,
|
||||||
Poppins_900Black,
|
Poppins_900Black,
|
||||||
} from "@expo-google-fonts/poppins";
|
} from "@expo-google-fonts/poppins";
|
||||||
import { useEffect, useState } from "react";
|
import { ReactNode, useEffect, useState } from "react";
|
||||||
import { useColorScheme } from "react-native";
|
import { useColorScheme } from "react-native";
|
||||||
import { initReactI18next } from "react-i18next";
|
import { initReactI18next } from "react-i18next";
|
||||||
|
import { ThemeProvider as RNThemeProvider } from "@react-navigation/native";
|
||||||
import "intl-pluralrules";
|
import "intl-pluralrules";
|
||||||
import "@formatjs/intl-locale/polyfill";
|
import "@formatjs/intl-locale/polyfill";
|
||||||
import "@formatjs/intl-displaynames/polyfill";
|
import "@formatjs/intl-displaynames/polyfill";
|
||||||
@ -46,6 +47,7 @@ import "@formatjs/intl-displaynames/locale-data/fr";
|
|||||||
// TODO: use a backend to load jsons.
|
// TODO: use a backend to load jsons.
|
||||||
import en from "../../../translations/en.json";
|
import en from "../../../translations/en.json";
|
||||||
import fr from "../../../translations/fr.json";
|
import fr from "../../../translations/fr.json";
|
||||||
|
import { useTheme } from "yoshiki/native";
|
||||||
|
|
||||||
i18next.use(initReactI18next).init({
|
i18next.use(initReactI18next).init({
|
||||||
interpolation: {
|
interpolation: {
|
||||||
@ -61,6 +63,27 @@ i18next.use(initReactI18next).init({
|
|||||||
|
|
||||||
SplashScreen.preventAutoHideAsync();
|
SplashScreen.preventAutoHideAsync();
|
||||||
|
|
||||||
|
const NavigationThemeProvider = ({ children }: { children: ReactNode }) => {
|
||||||
|
const theme = useTheme();
|
||||||
|
return (
|
||||||
|
<RNThemeProvider
|
||||||
|
value={{
|
||||||
|
dark: theme.mode === "dark",
|
||||||
|
colors: {
|
||||||
|
primary: theme.accent,
|
||||||
|
card: theme.variant.background,
|
||||||
|
text: theme.paragraph,
|
||||||
|
border: theme.background,
|
||||||
|
notification: theme.background,
|
||||||
|
background: theme.background,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</RNThemeProvider>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
export default function Root() {
|
export default function Root() {
|
||||||
const [queryClient] = useState(() => createQueryClient());
|
const [queryClient] = useState(() => createQueryClient());
|
||||||
const theme = useColorScheme();
|
const theme = useColorScheme();
|
||||||
@ -84,7 +107,9 @@ export default function Root() {
|
|||||||
>
|
>
|
||||||
<PortalProvider>
|
<PortalProvider>
|
||||||
<AccountProvider>
|
<AccountProvider>
|
||||||
<Slot />
|
<NavigationThemeProvider>
|
||||||
|
<Slot />
|
||||||
|
</NavigationThemeProvider>
|
||||||
</AccountProvider>
|
</AccountProvider>
|
||||||
</PortalProvider>
|
</PortalProvider>
|
||||||
</ThemeSelector>
|
</ThemeSelector>
|
||||||
|
@ -25,9 +25,7 @@ import {
|
|||||||
Skeleton,
|
Skeleton,
|
||||||
ts,
|
ts,
|
||||||
ImageBackground,
|
ImageBackground,
|
||||||
Poster,
|
|
||||||
Heading,
|
Heading,
|
||||||
Icon,
|
|
||||||
PosterBackground,
|
PosterBackground,
|
||||||
imageBorderRadius,
|
imageBorderRadius,
|
||||||
} from "@kyoo/primitives";
|
} from "@kyoo/primitives";
|
||||||
@ -35,7 +33,6 @@ import { useState } from "react";
|
|||||||
import { View } from "react-native";
|
import { View } from "react-native";
|
||||||
import { percent, px, rem, useYoshiki } from "yoshiki/native";
|
import { percent, px, rem, useYoshiki } from "yoshiki/native";
|
||||||
import { Layout, WithLoading } from "../fetch";
|
import { Layout, WithLoading } from "../fetch";
|
||||||
import Done from "@material-symbols/svg-400/rounded/done-fill.svg";
|
|
||||||
import { ItemWatchStatus } from "./grid";
|
import { ItemWatchStatus } from "./grid";
|
||||||
|
|
||||||
export const ItemList = ({
|
export const ItemList = ({
|
||||||
@ -84,6 +81,7 @@ export const ItemList = ({
|
|||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
height: ItemList.layout.size,
|
height: ItemList.layout.size,
|
||||||
borderRadius: px(imageBorderRadius),
|
borderRadius: px(imageBorderRadius),
|
||||||
|
overflow: "hidden",
|
||||||
marginX: ItemList.layout.gap,
|
marginX: ItemList.layout.gap,
|
||||||
},
|
},
|
||||||
props,
|
props,
|
||||||
|
@ -33,7 +33,7 @@ export const VerticalRecommanded = () => {
|
|||||||
const { css } = useYoshiki();
|
const { css } = useYoshiki();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View {...css({ marginTop: ItemGrid.layout.gap })}>
|
<View {...css({ marginY: ItemGrid.layout.gap })}>
|
||||||
<H3 {...css({ mX: ItemGrid.layout.gap })}>{t("home.recommanded")}</H3>
|
<H3 {...css({ mX: ItemGrid.layout.gap })}>{t("home.recommanded")}</H3>
|
||||||
<InfiniteFetch
|
<InfiniteFetch
|
||||||
query={VerticalRecommanded.query()}
|
query={VerticalRecommanded.query()}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user