feat: [StreamyfinPlugin] Jellyseerr, Search Engine, & Download settings

- Added DisabledSetting.tsx component
- Added DownloadMethod enum
- cleanup
This commit is contained in:
herrrta
2025-01-10 22:20:10 -05:00
parent 9dfcc01f17
commit 2c6823eb53
12 changed files with 193 additions and 179 deletions

View File

@@ -0,0 +1,26 @@
import {View, ViewProps} from "react-native";
import {Text} from "@/components/common/Text";
const DisabledSetting: React.FC<{disabled: boolean, showText?: boolean, text?: string} & ViewProps> = ({
disabled = false,
showText = true,
text,
children,
...props
}) => (
<View
pointerEvents={disabled ? "none" : "auto"}
style={{
opacity: disabled ? 0.5 : 1,
}}
>
<View {...props}>
{disabled && showText &&
<Text className="text-center text-red-700 my-4">{text ?? "Currently disabled by admin."}</Text>
}
{children}
</View>
</View>
)
export default DisabledSetting;