cleaning up

This commit is contained in:
Violet Caulfield
2025-01-25 13:21:31 -06:00
parent dc40510918
commit d35bfaf099
15 changed files with 35 additions and 30 deletions

View File

@@ -11,7 +11,7 @@ import { useItemTracks } from "../../api/queries/tracks";
import { SafeAreaView, useSafeAreaFrame } from "react-native-safe-area-context";
import FavoriteButton from "../Global/components/favorite-button";
import { useEffect } from "react";
import BlurhashedImage from "../Global/helpers/blurhashed-image";
import BlurhashedImage from "../Global/components/blurhashed-image";
interface AlbumProps {
album: BaseItemDto,

View File

@@ -1,7 +1,7 @@
import { useFavoriteAlbums } from "../../api/queries/favorites";
import { AlbumsProps } from "../types";
import { SafeAreaView, useSafeAreaFrame } from "react-native-safe-area-context";
import { ItemCard } from "../Global/helpers/item-card";
import { ItemCard } from "../Global/components/item-card";
import { FlatList, RefreshControl } from "react-native";
export default function Albums({ navigation }: AlbumsProps) : React.JSX.Element {

View File

@@ -1,7 +1,7 @@
import { ScrollView, YStack } from "tamagui";
import { useArtistAlbums } from "../../api/queries/artist";
import { FlatList } from "react-native";
import { ItemCard } from "../Global/helpers/item-card";
import { ItemCard } from "../Global/components/item-card";
import { NativeStackNavigationProp } from "@react-navigation/native-stack";
import { StackParamList } from "../types";
import { H2 } from "../Global/helpers/text";
@@ -9,7 +9,7 @@ import { useState } from "react";
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
import { useSafeAreaFrame } from "react-native-safe-area-context";
import FavoriteButton from "../Global/components/favorite-button";
import BlurhashedImage from "../Global/helpers/blurhashed-image";
import BlurhashedImage from "../Global/components/blurhashed-image";
interface ArtistProps {
artist: BaseItemDto

View File

@@ -2,7 +2,7 @@ import { useFavoriteArtists } from "../../api/queries/favorites";
import { SafeAreaView, useSafeAreaFrame } from "react-native-safe-area-context";
import React from "react";
import { FlatList, RefreshControl } from "react-native";
import { ItemCard } from "../Global/helpers/item-card";
import { ItemCard } from "../Global/components/item-card";
import { ArtistsProps } from "../types";
export default function Artists({ navigation }: ArtistsProps): React.JSX.Element {

View File

@@ -4,7 +4,7 @@ import { H5, Card as TamaguiCard, View } from "tamagui";
import { BaseItemDto, ImageType } from "@jellyfin/sdk/lib/generated-client/models";
import invert from "invert-color"
import { Blurhash } from "react-native-blurhash"
import { Text } from "./text";
import { Text } from "../helpers/text";
import BlurhashedImage from "./blurhashed-image";
interface CardProps extends TamaguiCardProps {

View File

@@ -5,7 +5,7 @@ import { NativeStackNavigationProp } from "@react-navigation/native-stack";
import { Separator, Spacer, useTheme, View, XStack, YStack } from "tamagui";
import { Text } from "../helpers/text";
import { useSafeAreaFrame } from "react-native-safe-area-context";
import BlurhashedImage from "../helpers/blurhashed-image";
import BlurhashedImage from "./blurhashed-image";
import Icon from "../helpers/icon";
import { QueuingType } from "../../../enums/queuing-type";
import { RunTimeTicks } from "../helpers/time-codes";
@@ -79,28 +79,27 @@ export default function Item({
justifyContent="flex-start"
flex={3}
>
<Text bold>{ item.Name ?? ""}</Text>
<Text
bold
lineBreakStrategyIOS="standard"
numberOfLines={1}
>
{ item.Name ?? ""}
</Text>
{ (item.Type === 'Audio' || item.Type === 'MusicAlbum') && (
<Text>{ item.AlbumArtist ?? "Untitled Artist" }</Text>
<Text
lineBreakStrategyIOS="standard"
numberOfLines={1}
>
{ item.AlbumArtist ?? "Untitled Artist" }
</Text>
)}
</YStack>
{/* Runtime ticks for Songs */}
<YStack
justifyContent="center"
alignItems="flex-end"
flex={1}
>
{ item.Type ==='Audio' ? (
<RunTimeTicks>{item.RunTimeTicks}</RunTimeTicks>
) : (
<Spacer />
)}
</YStack>
<XStack
justifyContent="center"
justifyContent="space-between"
alignItems="flex-end"
flex={1}
>
@@ -113,6 +112,12 @@ export default function Item({
) : (
<Spacer />
)}
{/* Runtime ticks for Songs */}
{ item.Type ==='Audio' ? (
<RunTimeTicks>{item.RunTimeTicks}</RunTimeTicks>
) : (
<Spacer />
)}
<Icon
small

View File

@@ -9,7 +9,7 @@ import Icon from "../helpers/icon";
import { NativeStackNavigationProp } from "@react-navigation/native-stack";
import { StackParamList } from "../../../components/types";
import { QueuingType } from "../../../enums/queuing-type";
import BlurhashedImage from "../helpers/blurhashed-image";
import BlurhashedImage from "./blurhashed-image";
interface TrackProps {
track: BaseItemDto;

View File

@@ -1,6 +1,6 @@
import { NativeStackNavigationProp } from "@react-navigation/native-stack";
import { useUserPlaylists } from "../../../api/queries/playlist";
import { ItemCard } from "../../../components/Global/helpers/item-card";
import { ItemCard } from "../../Global/components/item-card";
import { H2 } from "../../../components/Global/helpers/text";
import { StackParamList } from "../../../components/types";
import React from "react";

View File

@@ -4,7 +4,7 @@ import { useHomeContext } from "../provider";
import { H2 } from "../../Global/helpers/text";
import { StackParamList } from "../../types";
import { FlatList } from "react-native";
import { ItemCard } from "../../Global/helpers/item-card";
import { ItemCard } from "../../Global/components/item-card";
import { NativeStackNavigationProp } from "@react-navigation/native-stack";
export default function RecentArtists({ navigation }: { navigation: NativeStackNavigationProp<StackParamList>}): React.JSX.Element {

View File

@@ -2,7 +2,7 @@ import React from "react";
import { ScrollView, View } from "tamagui";
import { useHomeContext } from "../provider";
import { H2 } from "../../Global/helpers/text";
import { ItemCard } from "../../Global/helpers/item-card";
import { ItemCard } from "../../Global/components/item-card";
import { usePlayerContext } from "../../../player/provider";
import { StackParamList } from "../../../components/types";
import { NativeStackNavigationProp } from "@react-navigation/native-stack";

View File

@@ -4,7 +4,7 @@ import { useSafeAreaFrame } from "react-native-safe-area-context";
import { StackParamList } from "../types";
import TrackOptions from "./helpers/TrackOptions";
import { ScrollView, Spacer, useTheme, View, XStack, YStack } from "tamagui";
import BlurhashedImage from "../Global/helpers/blurhashed-image";
import BlurhashedImage from "../Global/components/blurhashed-image";
import { Text } from "../Global/helpers/text";
import FavoriteButton from "../Global/components/favorite-button";
import { useEffect } from "react";

View File

@@ -9,7 +9,7 @@ import TextTicker from 'react-native-text-ticker';
import PlayPauseButton from "./helpers/buttons";
import { useSafeAreaFrame } from "react-native-safe-area-context";
import { TextTickerConfig } from "./component.config";
import BlurhashedImage from "../Global/helpers/blurhashed-image";
import BlurhashedImage from "../Global/components/blurhashed-image";
export function Miniplayer({ navigation }: { navigation : NavigationHelpers<ParamListBase, BottomTabNavigationEventMap> }) : React.JSX.Element {

View File

@@ -10,7 +10,7 @@ import PlayPauseButton from "../helpers/buttons";
import { H5, Text } from "../../../components/Global/helpers/text";
import Icon from "../../../components/Global/helpers/icon";
import FavoriteButton from "../../Global/components/favorite-button";
import BlurhashedImage from "../../../components/Global/helpers/blurhashed-image";
import BlurhashedImage from "../../Global/components/blurhashed-image";
import TextTicker from "react-native-text-ticker";
import { TextTickerConfig } from "../component.config";

View File

@@ -10,7 +10,7 @@ import Track from "../Global/components/track";
import { FlatList } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import { useEffect } from "react";
import BlurhashedImage from "../Global/helpers/blurhashed-image";
import BlurhashedImage from "../Global/components/blurhashed-image";
interface PlaylistProps {
playlist: BaseItemDto;