feat: Refactor settings management into a dedicated page with new configuration options, including live stream source and remote input settings

This commit is contained in:
zimplexing
2025-07-11 17:23:36 +08:00
parent fc8da352fb
commit 03d80c42cd
14 changed files with 607 additions and 215 deletions

18
hooks/useAnimation.ts Normal file
View File

@@ -0,0 +1,18 @@
import { useRef, useEffect } from 'react';
import { Animated } from 'react-native';
export const useButtonAnimation = (isFocused: boolean, size: number = 1.1) => {
const scaleValue = useRef(new Animated.Value(1)).current;
useEffect(() => {
Animated.spring(scaleValue, {
toValue: isFocused ? size : 1,
friction: 5,
useNativeDriver: true,
}).start();
}, [ isFocused, scaleValue, size]);
return {
transform: [{ scale: scaleValue }],
};
};