diff --git a/front/packages/models/src/resources/index.ts b/front/packages/models/src/resources/index.ts index 9d72b08d..abbc0ad6 100644 --- a/front/packages/models/src/resources/index.ts +++ b/front/packages/models/src/resources/index.ts @@ -28,3 +28,4 @@ export * from "./person"; export * from "./studio"; export * from "./episode"; export * from "./season"; +export * from "./watch-item"; diff --git a/front/packages/primitives/src/icons.tsx b/front/packages/primitives/src/icons.tsx index 8048a589..094daa84 100644 --- a/front/packages/primitives/src/icons.tsx +++ b/front/packages/primitives/src/icons.tsx @@ -27,13 +27,16 @@ import { ts } from "./utils"; type IconProps = { icon: ComponentType; - color: YoshikiStyle; + color?: YoshikiStyle; size?: YoshikiStyle; }; export const Icon = ({ icon: Icon, color, size = 24, ...props }: IconProps) => { - const { css } = useYoshiki(); - const computed = css({ width: size, height: size, fill: color } as ViewStyle, props); + const { css, theme } = useYoshiki(); + const computed = css( + { width: size, height: size, fill: color ?? theme.colors.white } as ViewStyle, + props, + ); return ( ({ diff --git a/front/packages/primitives/src/index.ts b/front/packages/primitives/src/index.ts index 712ae906..22cb1ad4 100644 --- a/front/packages/primitives/src/index.ts +++ b/front/packages/primitives/src/index.ts @@ -29,6 +29,7 @@ export * from "./skeleton"; export * from "./tooltip"; export * from "./container"; export * from "./divider"; +export * from "./progress"; export * from "./animated"; export * from "./utils"; diff --git a/front/packages/primitives/src/links.tsx b/front/packages/primitives/src/links.tsx index 44c39b16..e8fc29bc 100644 --- a/front/packages/primitives/src/links.tsx +++ b/front/packages/primitives/src/links.tsx @@ -18,7 +18,6 @@ * along with Kyoo. If not, see . */ -import { ViewStyle } from "@expo/html-elements/build/primitives/View"; import { ComponentType, Fragment, ReactNode } from "react"; import { Platform, diff --git a/front/packages/primitives/src/progress.tsx b/front/packages/primitives/src/progress.tsx new file mode 100644 index 00000000..e95b2c3c --- /dev/null +++ b/front/packages/primitives/src/progress.tsx @@ -0,0 +1,83 @@ +/* + * 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, View, ViewProps } from "react-native"; +import { Circle, Svg } from "react-native-svg"; +import { px, useYoshiki } from "yoshiki/native"; + +// TODO: Use moti on native +export const CircularProgress = ({ + size = 48, + tickness = 5, + color, + ...props +}: { size?: number; tickness?: number; color?: string } & ViewProps) => { + const { css, theme } = useYoshiki(); + + return ( + + + + + + + ); +}; diff --git a/front/packages/ui/src/fetch.tsx b/front/packages/ui/src/fetch.tsx index 70b64852..7ce43a51 100644 --- a/front/packages/ui/src/fetch.tsx +++ b/front/packages/ui/src/fetch.tsx @@ -20,7 +20,6 @@ import { Page, QueryIdentifier, useFetch, KyooErrors } from "@kyoo/models"; import { Breakpoint, P } from "@kyoo/primitives"; -import { Fragment } from "react"; import { View } from "react-native"; import { useYoshiki } from "yoshiki/native";