diff options
Diffstat (limited to 'src/view/screens/Settings.tsx')
-rw-r--r-- | src/view/screens/Settings.tsx | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index 7a8c25c81..7356db54b 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -1,6 +1,7 @@ import React from 'react' import { ActivityIndicator, + Linking, Platform, StyleSheet, TextStyle, @@ -47,6 +48,7 @@ import {reset as resetNavigation} from '../../Navigation' // remove after backend testing finishes // -prf import {useDebugHeaderSetting} from 'lib/api/debug-appview-proxy-header' +import {STATUS_PAGE_URL} from 'lib/constants' type Props = NativeStackScreenProps<CommonNavigatorParams, 'Settings'> export const SettingsScreen = withAuthRequired( @@ -187,6 +189,10 @@ export const SettingsScreen = withAuthRequired( navigation.navigate('SavedFeeds') }, [navigation]) + const onPressStatusPage = React.useCallback(() => { + Linking.openURL(STATUS_PAGE_URL) + }, []) + return ( <View style={[s.hContentRegion]} testID="settingsScreen"> <ViewHeader title="Settings" /> @@ -529,13 +535,25 @@ export const SettingsScreen = withAuthRequired( </TouchableOpacity> </> ) : null} - <TouchableOpacity - accessibilityRole="button" - onPress={onPressBuildInfo}> - <Text type="sm" style={[styles.buildInfo, pal.textLight]}> - Build version {AppInfo.appVersion} {AppInfo.updateChannel} + <View style={[styles.footer]}> + <TouchableOpacity + accessibilityRole="button" + onPress={onPressBuildInfo}> + <Text type="sm" style={[styles.buildInfo, pal.textLight]}> + Build version {AppInfo.appVersion} {AppInfo.updateChannel} + </Text> + </TouchableOpacity> + <Text type="sm" style={[pal.textLight]}> + · </Text> - </TouchableOpacity> + <TouchableOpacity + accessibilityRole="button" + onPress={onPressStatusPage}> + <Text type="sm" style={[styles.buildInfo, pal.textLight]}> + Status page + </Text> + </TouchableOpacity> + </View> <View style={s.footerSpacer} /> </ScrollView> </View> @@ -621,7 +639,6 @@ const styles = StyleSheet.create({ }, buildInfo: { paddingVertical: 8, - paddingHorizontal: 18, }, colorModeText: { @@ -645,4 +662,10 @@ const styles = StyleSheet.create({ toggleBtn: { paddingHorizontal: 0, }, + footer: { + flex: 1, + flexDirection: 'row', + alignItems: 'center', + paddingLeft: 18, + }, }) |