mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 15:33:26 +00:00
feat: prettier update button
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@movie-web/mobile",
|
"name": "@movie-web/mobile",
|
||||||
"version": "0.0.9",
|
"version": "0.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@@ -1,10 +1,14 @@
|
|||||||
import type { SelectProps } from "tamagui";
|
import type { SelectProps } from "tamagui";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { TouchableOpacity } from "react-native-gesture-handler";
|
import { Platform } from "react-native";
|
||||||
import * as Application from "expo-application";
|
import * as Application from "expo-application";
|
||||||
import * as Brightness from "expo-brightness";
|
import * as Brightness from "expo-brightness";
|
||||||
import * as Linking from "expo-linking";
|
import * as Linking from "expo-linking";
|
||||||
import { FontAwesome, MaterialIcons } from "@expo/vector-icons";
|
import {
|
||||||
|
FontAwesome,
|
||||||
|
MaterialCommunityIcons,
|
||||||
|
MaterialIcons,
|
||||||
|
} from "@expo/vector-icons";
|
||||||
import { useToastController } from "@tamagui/toast";
|
import { useToastController } from "@tamagui/toast";
|
||||||
import {
|
import {
|
||||||
Adapt,
|
Adapt,
|
||||||
@@ -12,7 +16,6 @@ import {
|
|||||||
Select,
|
Select,
|
||||||
Separator,
|
Separator,
|
||||||
Sheet,
|
Sheet,
|
||||||
Text,
|
|
||||||
useTheme,
|
useTheme,
|
||||||
View,
|
View,
|
||||||
XStack,
|
XStack,
|
||||||
@@ -21,6 +24,7 @@ import {
|
|||||||
|
|
||||||
import type { ThemeStoreOption } from "~/stores/theme";
|
import type { ThemeStoreOption } from "~/stores/theme";
|
||||||
import ScreenLayout from "~/components/layout/ScreenLayout";
|
import ScreenLayout from "~/components/layout/ScreenLayout";
|
||||||
|
import { MWButton } from "~/components/ui/Button";
|
||||||
import { MWSelect } from "~/components/ui/Select";
|
import { MWSelect } from "~/components/ui/Select";
|
||||||
import { MWSwitch } from "~/components/ui/Switch";
|
import { MWSwitch } from "~/components/ui/Switch";
|
||||||
import { checkForUpdate } from "~/lib/update";
|
import { checkForUpdate } from "~/lib/update";
|
||||||
@@ -36,6 +40,7 @@ const themeOptions: ThemeStoreOption[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export default function SettingsScreen() {
|
export default function SettingsScreen() {
|
||||||
|
const theme = useTheme();
|
||||||
const { gestureControls, setGestureControls, autoPlay, setAutoPlay } =
|
const { gestureControls, setGestureControls, autoPlay, setAutoPlay } =
|
||||||
usePlayerSettingsStore();
|
usePlayerSettingsStore();
|
||||||
const toastController = useToastController();
|
const toastController = useToastController();
|
||||||
@@ -93,15 +98,27 @@ export default function SettingsScreen() {
|
|||||||
<MWSwitch.Thumb animation="quicker" />
|
<MWSwitch.Thumb animation="quicker" />
|
||||||
</MWSwitch>
|
</MWSwitch>
|
||||||
</XStack>
|
</XStack>
|
||||||
|
<XStack width={200} alignItems="center" gap="$4">
|
||||||
|
<Label minWidth={110}>
|
||||||
|
v{Application.nativeApplicationVersion}
|
||||||
|
</Label>
|
||||||
|
<Separator minHeight={20} vertical />
|
||||||
|
<MWButton
|
||||||
|
type="secondary"
|
||||||
|
icon={
|
||||||
|
<MaterialCommunityIcons
|
||||||
|
name={Platform.select({ ios: "apple", android: "android" })}
|
||||||
|
size={24}
|
||||||
|
color={theme.buttonSecondaryText.val}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
onPress={handleVersionPress}
|
||||||
|
>
|
||||||
|
Update
|
||||||
|
</MWButton>
|
||||||
|
</XStack>
|
||||||
</YStack>
|
</YStack>
|
||||||
</View>
|
</View>
|
||||||
<View justifyContent="center" alignItems="center">
|
|
||||||
<TouchableOpacity onPress={handleVersionPress}>
|
|
||||||
<Text fontSize={14} color="white">
|
|
||||||
v{Application.nativeApplicationVersion}
|
|
||||||
</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
</View>
|
|
||||||
</ScreenLayout>
|
</ScreenLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user