mirror of
https://github.com/Jellify-Music/App.git
synced 2026-01-04 10:05:35 -06:00
clean up global component folder
player styling changes
This commit is contained in:
@@ -7,13 +7,13 @@ import { getImageApi } from "@jellyfin/sdk/lib/utils/api";
|
||||
import { useApiClientContext } from "../jellyfin-api-provider";
|
||||
import { BaseItemDto, ImageType } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
import { queryConfig } from "../../api/queries/query.config";
|
||||
import { H4, H5, Text } from "../Global/text";
|
||||
import { H4, H5, Text } from "../Global/helpers/text";
|
||||
import { FlatList } from "react-native";
|
||||
import { useAlbumTracks } from "../../api/queries/album";
|
||||
import { usePlayerContext } from "../../player/provider";
|
||||
import { mapDtoToTrack } from "../../helpers/mappings";
|
||||
import RunTimeTicks from "../Global/runtimeticks";
|
||||
import Track from "../Global/track";
|
||||
import RunTimeTicks from "../Global/helpers/runtimeticks";
|
||||
import Track from "../Global/components/track";
|
||||
|
||||
interface AlbumProps {
|
||||
album: BaseItemDto,
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import { ScrollView } from "tamagui";
|
||||
import Avatar from "../Global/avatar";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
import { useArtistAlbums } from "../../api/queries/artist";
|
||||
import { useApiClientContext } from "../jellyfin-api-provider";
|
||||
import { FlatList } from "react-native";
|
||||
import { Card } from "../Global/card";
|
||||
import { Card } from "../Global/helpers/card";
|
||||
import { NativeStackNavigationProp } from "@react-navigation/native-stack";
|
||||
import { StackParamList } from "../types";
|
||||
import { H4, H5 } from "../Global/text";
|
||||
import { H4 } from "../Global/helpers/text";
|
||||
import { useState } from "react";
|
||||
import { CachedImage } from "@georstat/react-native-image-cache";
|
||||
import { ImageType } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { usePlayerContext } from "@/player/provider";
|
||||
import React from "react";
|
||||
import { Separator, useTheme, View, XStack } from "tamagui";
|
||||
import { Text } from "./text";
|
||||
import RunTimeTicks from "./runtimeticks";
|
||||
import { useApiClientContext } from "../jellyfin-api-provider";
|
||||
import { Text } from "../helpers/text";
|
||||
import RunTimeTicks from "../helpers/runtimeticks";
|
||||
import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
import { mapDtoToTrack } from "@/helpers/mappings";
|
||||
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
import { Colors } from "@/enums/colors";
|
||||
@@ -1,13 +1,13 @@
|
||||
import React, { } from "react";
|
||||
import type { CardProps as TamaguiCardProps } from "tamagui"
|
||||
import { H5, Card as TamaguiCard, View } from "tamagui";
|
||||
import { useApiClientContext } from "../jellyfin-api-provider";
|
||||
import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
import { getImageApi } from "@jellyfin/sdk/lib/utils/api";
|
||||
import { ImageType } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
import { CachedImage } from "@georstat/react-native-image-cache";
|
||||
import invert from "invert-color"
|
||||
import { Blurhash } from "react-native-blurhash"
|
||||
import { queryConfig } from "../../api/queries/query.config";
|
||||
import { queryConfig } from "../../../api/queries/query.config";
|
||||
import { Text } from "./text";
|
||||
|
||||
interface CardProps extends TamaguiCardProps {
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons"
|
||||
import { Colors } from "../../enums/colors"
|
||||
import { Colors } from "../../../enums/colors"
|
||||
|
||||
const regularSize = 12;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { HomeProvider, useHomeContext } from "./provider";
|
||||
import { createNativeStackNavigator } from "@react-navigation/native-stack";
|
||||
import { StackParamList, ProvidedHomeProps } from "../types";
|
||||
import { HomeArtistScreen } from "./screens/artist";
|
||||
import Avatar from "../Global/avatar";
|
||||
import Avatar from "../Global/helpers/avatar";
|
||||
import { HomeAlbumScreen } from "./screens/album";
|
||||
import Playlists from "./helpers/playlists";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useUserPlaylists } from "@/api/queries/playlist";
|
||||
import { Card } from "@/components/Global/card";
|
||||
import { H2 } from "@/components/Global/text";
|
||||
import { Card } from "@/components/Global/helpers/card";
|
||||
import { H2 } from "@/components/Global/helpers/text";
|
||||
import { useApiClientContext } from "@/components/jellyfin-api-provider";
|
||||
import React from "react";
|
||||
import { FlatList } from "react-native";
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { View } from "tamagui";
|
||||
import { useHomeContext } from "../provider";
|
||||
import { H2 } from "../../Global/text";
|
||||
import { H2 } from "../../Global/helpers/text";
|
||||
import { ProvidedHomeProps } from "../../types";
|
||||
import { FlatList } from "react-native";
|
||||
import { Card } from "../../Global/card";
|
||||
import { Card } from "../../Global/helpers/card";
|
||||
import { getPrimaryBlurhashFromDto } from "../../../helpers/blurhash";
|
||||
|
||||
export default function RecentArtists({ navigation }: ProvidedHomeProps): React.JSX.Element {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, { useEffect } from "react";
|
||||
import { ScrollView, View } from "tamagui";
|
||||
import { useHomeContext } from "../provider";
|
||||
import { H2 } from "../../Global/text";
|
||||
import { Card } from "../../Global/card";
|
||||
import { H2 } from "../../Global/helpers/text";
|
||||
import { Card } from "../../Global/helpers/card";
|
||||
import { mapDtoToTrack } from "../../../helpers/mappings";
|
||||
import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
import { usePlayerContext } from "../../../player/provider";
|
||||
|
||||
@@ -5,10 +5,10 @@ import { MMKVStorageKeys } from "../../../enums/mmkv-storage-keys";
|
||||
import { JellifyServer } from "../../../types/JellifyServer";
|
||||
import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
import { Spacer, Spinner, View, XStack, ZStack } from "tamagui";
|
||||
import { SwitchWithLabel } from "../../Global/switch-with-label";
|
||||
import { H1 } from "../../Global/text";
|
||||
import Input from "../../Global/input";
|
||||
import Button from "../../Global/button";
|
||||
import { SwitchWithLabel } from "../../Global/helpers/switch-with-label";
|
||||
import { H1 } from "../../Global/helpers/text";
|
||||
import Input from "../../Global/helpers/input";
|
||||
import Button from "../../Global/helpers/button";
|
||||
import { http, https } from "../utils/constants";
|
||||
import { storage } from "../../../constants/storage";
|
||||
import { client } from "../../../api/client";
|
||||
|
||||
@@ -5,9 +5,9 @@ import _ from "lodash";
|
||||
import { JellyfinCredentials } from "../../../api/types/jellyfin-credentials";
|
||||
import { Spinner, View, YStack, ZStack } from "tamagui";
|
||||
import { useAuthenticationContext } from "../provider";
|
||||
import { H1 } from "../../Global/text";
|
||||
import Button from "../../Global/button";
|
||||
import Input from "../../Global/input";
|
||||
import { H1 } from "../../Global/helpers/text";
|
||||
import Button from "../../Global/helpers/button";
|
||||
import Input from "../../Global/helpers/input";
|
||||
|
||||
export default function ServerAuthentication(): React.JSX.Element {
|
||||
const { username, setUsername } = useAuthenticationContext();
|
||||
|
||||
@@ -2,8 +2,8 @@ import React, { useEffect } from "react";
|
||||
import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
import { Spinner, Text, ToggleGroup, View } from "tamagui";
|
||||
import { useAuthenticationContext } from "../provider";
|
||||
import { H1, Label } from "../../Global/text";
|
||||
import Button from "../../Global/button";
|
||||
import { H1, Label } from "../../Global/helpers/text";
|
||||
import Button from "../../Global/helpers/button";
|
||||
import _ from "lodash";
|
||||
import { useMusicLibraries, usePlaylistLibrary } from "@/api/queries/libraries";
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ import { useApiClientContext } from "../jellyfin-api-provider";
|
||||
import { getImageApi } from "@jellyfin/sdk/lib/utils/api";
|
||||
import { ImageType } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
import { queryConfig } from "../../api/queries/query.config";
|
||||
import { Text } from "../Global/text";
|
||||
import { Text } from "../Global/helpers/text";
|
||||
import { SafeAreaView } from "react-native-safe-area-context";
|
||||
import { playPauseButton } from "./helpers/buttons";
|
||||
import { BottomTabNavigationEventMap } from "@react-navigation/bottom-tabs";
|
||||
import { NavigationHelpers, ParamListBase } from "@react-navigation/native";
|
||||
import { HorizontalSlider } from "../Global/slider";
|
||||
import { HorizontalSlider } from "../Global/helpers/slider";
|
||||
|
||||
export default function Player({ navigation }: { navigation : NavigationHelpers<ParamListBase, BottomTabNavigationEventMap> }): React.JSX.Element {
|
||||
|
||||
@@ -45,12 +45,13 @@ export default function Player({ navigation }: { navigation : NavigationHelpers<
|
||||
|
||||
<XStack
|
||||
justifyContent="flex-start"
|
||||
marginHorizontal={10}
|
||||
marginVertical={10}
|
||||
>
|
||||
|
||||
<YStack alignContent="flex-start">
|
||||
<Text>{nowPlaying?.title ?? "Untitled Track"}</Text>
|
||||
<YStack justifyContent="flex-start">
|
||||
<Text fontSize={"$4"}>{nowPlaying?.title ?? "Untitled Track"}</Text>
|
||||
<Text
|
||||
fontSize={"$4"}
|
||||
bold
|
||||
onPress={() => {
|
||||
navigation.navigate("Artist", {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { State } from "react-native-track-player";
|
||||
import { Colors } from "react-native/Libraries/NewAppScreen";
|
||||
import { Spinner } from "tamagui";
|
||||
import Icon from "../../Global/icon";
|
||||
import Icon from "../../Global/helpers/icon";
|
||||
|
||||
export function playPauseButton(playbackState: State | undefined, play: Function, pause: Function) {
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import { usePlayerContext } from "../../player/provider";
|
||||
import { BottomTabNavigationEventMap } from "@react-navigation/bottom-tabs";
|
||||
import { NavigationHelpers, ParamListBase } from "@react-navigation/native";
|
||||
import { BlurView } from "@react-native-community/blur";
|
||||
import Icon from "../Global/icon";
|
||||
import { Text } from "../Global/text";
|
||||
import Icon from "../Global/helpers/icon";
|
||||
import { Text } from "../Global/helpers/text";
|
||||
import { Colors } from "../../enums/colors";
|
||||
import { CachedImage } from "@georstat/react-native-image-cache";
|
||||
import { ImageType } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Text } from "@/components/Global/text";
|
||||
import { Text } from "@/components/Global/helpers/text";
|
||||
import { useApiClientContext } from "@/components/jellyfin-api-provider";
|
||||
import React from "react";
|
||||
import { View } from "tamagui";
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons";
|
||||
import { H5, Text, XStack, YStack } from "tamagui";
|
||||
import { Colors } from "../../../enums/colors";
|
||||
import Icon from "../../Global/icon";
|
||||
import Icon from "../../Global/helpers/icon";
|
||||
|
||||
export default function ServerDetails() : React.JSX.Element {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import React from "react";
|
||||
import Button from "../../Global/button";
|
||||
import Button from "../../Global/helpers/button";
|
||||
import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
|
||||
export default function SignOut(): React.JSX.Element {
|
||||
|
||||
Reference in New Issue
Block a user