mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-01-15 23:59:08 +00:00
fix: update textContentType for username input to oneTimeCode (#587)
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
|
||||
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client";
|
||||
import { useFavorite } from "@/hooks/useFavorite";
|
||||
import { View } from "react-native";
|
||||
import {View, ViewProps} from "react-native";
|
||||
import { RoundButton } from "@/components/RoundButton";
|
||||
import {FC} from "react";
|
||||
|
||||
interface Props extends ViewProps {
|
||||
item: BaseItemDto;
|
||||
}
|
||||
|
||||
export const AddToFavorites = ({ item, ...props }) => {
|
||||
const { isFavorite, toggleFavorite, _} = useFavorite(item);
|
||||
|
||||
export const AddToFavorites:FC<Props> = ({ item, ...props }) => {
|
||||
const { isFavorite, toggleFavorite } = useFavorite(item);
|
||||
|
||||
return (
|
||||
<View {...props}>
|
||||
<RoundButton
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { useImageColors } from "@/hooks/useImageColors";
|
||||
import { apiAtom } from "@/providers/JellyfinProvider";
|
||||
import { getItemImage } from "@/utils/getItemImage";
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
import { Image, ImageProps, ImageSource } from "expo-image";
|
||||
import { Image, ImageProps } from "expo-image";
|
||||
import { useAtom } from "jotai";
|
||||
import { useMemo } from "react";
|
||||
import { View } from "react-native";
|
||||
import {FC, useMemo} from "react";
|
||||
import { View, ViewProps } from "react-native";
|
||||
|
||||
interface Props extends ImageProps {
|
||||
item: BaseItemDto;
|
||||
@@ -25,7 +24,7 @@ interface Props extends ImageProps {
|
||||
onError?: () => void;
|
||||
}
|
||||
|
||||
export const ItemImage: React.FC<Props> = ({
|
||||
export const ItemImage: FC<Props> = ({
|
||||
item,
|
||||
variant = "Primary",
|
||||
quality = 90,
|
||||
@@ -53,7 +52,7 @@ export const ItemImage: React.FC<Props> = ({
|
||||
if (!source?.uri)
|
||||
return (
|
||||
<View
|
||||
{...props}
|
||||
{...props as ViewProps}
|
||||
className="flex flex-col items-center justify-center border border-neutral-800 bg-neutral-900"
|
||||
>
|
||||
<Ionicons
|
||||
|
||||
@@ -2,24 +2,24 @@ import React, { useEffect, useRef } from "react";
|
||||
import { View, StyleSheet, Platform } from "react-native";
|
||||
import { useSharedValue } from "react-native-reanimated";
|
||||
import { Slider } from "react-native-awesome-slider";
|
||||
// import { VolumeManager } from "react-native-volume-manager";
|
||||
const VolumeManager = !Platform.isTV
|
||||
? require("react-native-volume-manager")
|
||||
: null;
|
||||
const VolumeManager = Platform.isTV ? null : require("react-native-volume-manager");
|
||||
import { Ionicons } from "@expo/vector-icons";
|
||||
import { VolumeResult } from "react-native-volume-manager";
|
||||
|
||||
interface AudioSliderProps {
|
||||
setVisibility: (show: boolean) => void;
|
||||
}
|
||||
|
||||
const AudioSlider: React.FC<AudioSliderProps> = ({ setVisibility }) => {
|
||||
if (Platform.isTV) return;
|
||||
if (Platform.isTV) {
|
||||
return;
|
||||
}
|
||||
|
||||
const volume = useSharedValue<number>(50); // Explicitly type as number
|
||||
const min = useSharedValue<number>(0); // Explicitly type as number
|
||||
const max = useSharedValue<number>(100); // Explicitly type as number
|
||||
|
||||
const timeoutRef = useRef<NodeJS.Timeout | null>(null); // Use a ref to store the timeout ID
|
||||
const timeoutRef = useRef<number | null>(null); // Use a ref to store the timeout ID
|
||||
|
||||
useEffect(() => {
|
||||
const fetchInitialVolume = async () => {
|
||||
@@ -50,7 +50,7 @@ const AudioSlider: React.FC<AudioSliderProps> = ({ setVisibility }) => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const volumeListener = VolumeManager.addVolumeListener((result) => {
|
||||
const volumeListener = VolumeManager.addVolumeListener((result: VolumeResult) => {
|
||||
volume.value = result.volume * 100;
|
||||
setVisibility(true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user