diff --git a/app.json b/app.json index d4699bf9..1cbf6693 100644 --- a/app.json +++ b/app.json @@ -136,6 +136,7 @@ "expo-web-browser", ["./plugins/with-runtime-framework-headers.js"], ["./plugins/withChangeNativeAndroidTextToWhite.js"], + ["./plugins/withAndroidAlertColors.js"], ["./plugins/withAndroidManifest.js"], ["./plugins/withTrustLocalCerts.js"], ["./plugins/withGradleProperties.js"], diff --git a/components/Button.tsx b/components/Button.tsx index 3b5d6351..1471a517 100644 --- a/components/Button.tsx +++ b/components/Button.tsx @@ -15,6 +15,7 @@ import { View, } from "react-native"; import { useHaptic } from "@/hooks/useHaptic"; +import { scaleSize } from "@/utils/scaleSize"; import { Loader } from "./Loader"; const getColorClasses = ( @@ -135,16 +136,26 @@ export const Button: React.FC> = ({ shadowColor: "#ffffff", shadowOffset: { width: 0, height: 0 }, shadowOpacity: focused ? 0.5 : 0, - shadowRadius: focused ? 10 : 0, + shadowRadius: focused ? scaleSize(10) : 0, elevation: focused ? 12 : 0, // Android glow }} > - + {children} diff --git a/components/login/TVAccountCard.tsx b/components/login/TVAccountCard.tsx index bb78639d..d555536d 100644 --- a/components/login/TVAccountCard.tsx +++ b/components/login/TVAccountCard.tsx @@ -3,6 +3,7 @@ import React, { useRef, useState } from "react"; import { useTranslation } from "react-i18next"; import { Animated, Easing, Pressable, View } from "react-native"; import { Text } from "@/components/common/Text"; +import { scaleSize } from "@/utils/scaleSize"; import type { SavedServerAccount } from "@/utils/secureCredentials"; interface TVAccountCardProps { @@ -97,9 +98,9 @@ export const TVAccountCard: React.FC = ({ backgroundColor: isFocused ? "#2a2a2a" : "#262626", borderWidth: 2, borderColor: isFocused ? "#FFFFFF" : "transparent", - borderRadius: 16, - paddingHorizontal: 24, - paddingVertical: 20, + borderRadius: scaleSize(16), + paddingHorizontal: scaleSize(24), + paddingVertical: scaleSize(20), flexDirection: "row", alignItems: "center", }} @@ -107,23 +108,23 @@ export const TVAccountCard: React.FC = ({ {/* Avatar */} - + {/* Account Info */} = ({ {getSecurityText()} @@ -142,7 +143,11 @@ export const TVAccountCard: React.FC = ({ {/* Security Icon */} - + diff --git a/components/login/TVAddIcon.tsx b/components/login/TVAddIcon.tsx index 111c706a..45b5f041 100644 --- a/components/login/TVAddIcon.tsx +++ b/components/login/TVAddIcon.tsx @@ -4,6 +4,7 @@ import { Animated, Pressable, View } from "react-native"; import { Text } from "@/components/common/Text"; import { useTVFocusAnimation } from "@/components/tv/hooks/useTVFocusAnimation"; import { useScaledTVTypography } from "@/constants/TVTypography"; +import { scaleSize } from "@/utils/scaleSize"; export interface TVAddIconProps { label: string; @@ -33,24 +34,24 @@ export const TVAddIcon = React.forwardRef( animatedStyle, { alignItems: "center", - width: 160, + width: scaleSize(160), shadowColor: "#fff", shadowOffset: { width: 0, height: 0 }, shadowOpacity: focused ? 0.5 : 0, - shadowRadius: focused ? 16 : 0, + shadowRadius: focused ? scaleSize(16) : 0, }, ]} > ( > diff --git a/components/login/TVAddServerForm.tsx b/components/login/TVAddServerForm.tsx index de28c64e..8d0168b2 100644 --- a/components/login/TVAddServerForm.tsx +++ b/components/login/TVAddServerForm.tsx @@ -5,6 +5,7 @@ import { Button } from "@/components/Button"; import { Text } from "@/components/common/Text"; import { useScaledTVTypography } from "@/constants/TVTypography"; import { useTVBackPress } from "@/hooks/useTVBackPress"; +import { scaleSize } from "@/utils/scaleSize"; import { TVInput } from "./TVInput"; interface TVAddServerFormProps { @@ -48,7 +49,7 @@ export const TVAddServerForm: React.FC = ({ flexGrow: 1, justifyContent: "center", alignItems: "center", - paddingVertical: 60, + paddingVertical: scaleSize(60), }} showsVerticalScrollIndicator={false} > @@ -56,7 +57,7 @@ export const TVAddServerForm: React.FC = ({ style={{ width: "100%", maxWidth: 800, - paddingHorizontal: 60, + paddingHorizontal: scaleSize(60), }} > {/* Title */} @@ -66,15 +67,20 @@ export const TVAddServerForm: React.FC = ({ fontWeight: "bold", color: "#FFFFFF", textAlign: "left", - marginBottom: 24, - paddingHorizontal: 8, + marginBottom: scaleSize(24), + paddingHorizontal: scaleSize(8), }} > {t("server.enter_url_to_jellyfin_server")} {/* Server URL Input */} - + = ({ {/* Connect Button */} - +