1
- import { StatusBar } from 'expo-status-bar' ;
2
- import { Platform , StyleSheet } from 'react-native' ;
1
+ import { AppI18n } from "@/localize" ;
2
+ import { APP_THEME } from "@/theme" ;
3
+ import { StatusBar } from "expo-status-bar" ;
4
+ import { Platform , StyleSheet , Linking , Pressable } from "react-native" ;
3
5
4
- import { Text , View } from ' ../components/Themed' ;
6
+ import { Text , View } from " ../components/Themed" ;
5
7
6
8
export default function ModalScreen ( ) {
9
+ const latestVersionUrl =
10
+ "https://github.com/xianshenglu/cloudflare-ip-tester-app/releases/latest/download/app-universal-release-signed.apk" ;
7
11
return (
8
12
< View style = { styles . container } >
9
- < Text style = { styles . title } > Modal </ Text >
13
+ < Text style = { styles . title } > Help </ Text >
10
14
< View
11
15
style = { styles . separator }
12
16
lightColor = "#eee"
13
17
darkColor = "rgba(255,255,255,0.1)"
14
18
/>
15
19
{ /* <TestPage path="/screens/ModalScreen.tsx" /> */ }
20
+ < Pressable onPress = { ( ) => Linking . openURL ( latestVersionUrl ) } >
21
+ < Text style = { { color : APP_THEME . colors . primary , fontSize : 16 } } >
22
+ { AppI18n . t ( "update.downloadLatestVersion" ) }
23
+ </ Text >
24
+ </ Pressable >
16
25
17
26
{ /* Use a light status bar on iOS to account for the black space above the modal */ }
18
27
< StatusBar style = { Platform . OS === "ios" ? "light" : "auto" } />
@@ -23,16 +32,16 @@ export default function ModalScreen() {
23
32
const styles = StyleSheet . create ( {
24
33
container : {
25
34
flex : 1 ,
26
- alignItems : ' center' ,
27
- justifyContent : ' center' ,
35
+ alignItems : " center" ,
36
+ justifyContent : " center" ,
28
37
} ,
29
38
title : {
30
39
fontSize : 20 ,
31
- fontWeight : ' bold' ,
40
+ fontWeight : " bold" ,
32
41
} ,
33
42
separator : {
34
43
marginVertical : 30 ,
35
44
height : 1 ,
36
- width : ' 80%' ,
45
+ width : " 80%" ,
37
46
} ,
38
47
} ) ;
0 commit comments