11import React from "react" ;
2- import { Layout , Button } from "@ui-kitten/components" ;
3- import { View } from "react-native" ;
2+ import { Layout , Button , Text } from "@ui-kitten/components" ;
3+ import { View , TouchableOpacity , Linking } from "react-native" ;
44import ServerForm from "../components/ServerForm" ;
55import { useAppContext } from "../components/AppContext" ;
66import Header from "../components/Header" ;
7-
87import { BasicAuth } from "../interfaces/basicAuth" ;
98import { useTranslation } from "react-i18next" ;
9+ import { APP_VERSION , GITHUB_RELEASES_URL } from "../utils/constants" ;
1010
1111function navigateToMain ( navigation ) {
1212 navigation . navigate ( "Main" ) ;
@@ -31,6 +31,10 @@ function SettingsScreen({ navigation }) {
3131 [ serverUrl , saveServer ] ,
3232 ) ;
3333
34+ const openGitHubReleases = ( ) => {
35+ Linking . openURL ( GITHUB_RELEASES_URL ) ;
36+ } ;
37+
3438 return (
3539 < Layout style = { { flex : 1 , paddingBottom : 32 } } >
3640 < Header
@@ -50,6 +54,20 @@ function SettingsScreen({ navigation }) {
5054 { t ( "servers.removeServer" ) }
5155 </ Button >
5256 </ View >
57+ < View
58+ style = { {
59+ flex : 1 ,
60+ justifyContent : "flex-end" ,
61+ alignItems : "center" ,
62+ paddingBottom : 8 ,
63+ } }
64+ >
65+ < TouchableOpacity onPress = { openGitHubReleases } >
66+ < Text appearance = "hint" category = "c1" >
67+ { APP_VERSION }
68+ </ Text >
69+ </ TouchableOpacity >
70+ </ View >
5371 </ Layout >
5472 ) ;
5573}
0 commit comments