mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 18:13:25 +00:00
settings cleanup
This commit is contained in:
@@ -13,11 +13,11 @@ import {
|
|||||||
import { useToastController } from "@tamagui/toast";
|
import { useToastController } from "@tamagui/toast";
|
||||||
import {
|
import {
|
||||||
Adapt,
|
Adapt,
|
||||||
Label,
|
|
||||||
ScrollView,
|
ScrollView,
|
||||||
Select,
|
Select,
|
||||||
Separator,
|
Separator,
|
||||||
Sheet,
|
Sheet,
|
||||||
|
Text,
|
||||||
useTheme,
|
useTheme,
|
||||||
View,
|
View,
|
||||||
XStack,
|
XStack,
|
||||||
@@ -85,14 +85,14 @@ export default function SettingsScreen() {
|
|||||||
return (
|
return (
|
||||||
<ScreenLayout>
|
<ScreenLayout>
|
||||||
<View padding={4}>
|
<View padding={4}>
|
||||||
<YStack>
|
<YStack gap={4}>
|
||||||
<XStack width={200} alignItems="center" gap="$4">
|
<XStack width={200} alignItems="center" gap="$4">
|
||||||
<Label minWidth={110}>Theme</Label>
|
<Text minWidth={110}>Theme</Text>
|
||||||
<Separator minHeight={20} vertical />
|
<Separator minHeight={20} vertical />
|
||||||
<ThemeSelector />
|
<ThemeSelector />
|
||||||
</XStack>
|
</XStack>
|
||||||
<XStack width={200} alignItems="center" gap="$4">
|
<XStack width={200} alignItems="center" gap="$4">
|
||||||
<Label minWidth={110}>Gesture controls</Label>
|
<Text minWidth={110}>Gesture controls</Text>
|
||||||
<Separator minHeight={20} vertical />
|
<Separator minHeight={20} vertical />
|
||||||
<MWSwitch
|
<MWSwitch
|
||||||
checked={gestureControls}
|
checked={gestureControls}
|
||||||
@@ -102,16 +102,14 @@ export default function SettingsScreen() {
|
|||||||
</MWSwitch>
|
</MWSwitch>
|
||||||
</XStack>
|
</XStack>
|
||||||
<XStack width={200} alignItems="center" gap="$4">
|
<XStack width={200} alignItems="center" gap="$4">
|
||||||
<Label minWidth={110}>Autoplay</Label>
|
<Text minWidth={110}>Autoplay</Text>
|
||||||
<Separator minHeight={20} vertical />
|
<Separator minHeight={20} vertical />
|
||||||
<MWSwitch checked={autoPlay} onCheckedChange={setAutoPlay}>
|
<MWSwitch checked={autoPlay} onCheckedChange={setAutoPlay}>
|
||||||
<MWSwitch.Thumb animation="quicker" />
|
<MWSwitch.Thumb animation="quicker" />
|
||||||
</MWSwitch>
|
</MWSwitch>
|
||||||
</XStack>
|
</XStack>
|
||||||
<XStack width={200} alignItems="center" gap="$4">
|
<XStack width={200} alignItems="center" gap="$4">
|
||||||
<Label minWidth={110}>
|
<Text minWidth={110}>v{Application.nativeApplicationVersion}</Text>
|
||||||
v{Application.nativeApplicationVersion}
|
|
||||||
</Label>
|
|
||||||
<Separator minHeight={20} vertical />
|
<Separator minHeight={20} vertical />
|
||||||
<MWButton
|
<MWButton
|
||||||
type="secondary"
|
type="secondary"
|
||||||
@@ -229,7 +227,7 @@ export function ThemeSelector(props: SelectProps) {
|
|||||||
<FontAwesome name="chevron-down" color={theme.inputIconColor.val} />
|
<FontAwesome name="chevron-down" color={theme.inputIconColor.val} />
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Select.Value />
|
<Select.Value fontWeight="$semibold" textTransform="capitalize" />
|
||||||
</MWSelect.Trigger>
|
</MWSelect.Trigger>
|
||||||
|
|
||||||
<Adapt platform="native">
|
<Adapt platform="native">
|
||||||
@@ -286,8 +284,11 @@ export function ThemeSelector(props: SelectProps) {
|
|||||||
i === themeOptions.length - 1 ? "$8" : 0
|
i === themeOptions.length - 1 ? "$8" : 0
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Select.ItemText>
|
<Select.ItemText
|
||||||
{item.charAt(0).toUpperCase() + item.slice(1)}
|
textTransform="capitalize"
|
||||||
|
fontWeight="$semibold"
|
||||||
|
>
|
||||||
|
{item}
|
||||||
</Select.ItemText>
|
</Select.ItemText>
|
||||||
<Select.ItemIndicator ml="auto">
|
<Select.ItemIndicator ml="auto">
|
||||||
<MaterialIcons
|
<MaterialIcons
|
||||||
|
Reference in New Issue
Block a user