Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[APP-28] add status page link (#987)

* add status page to mobile

* add status page URL to super slow loading screen

* store STATUS_PAGE_URL in constants.ts

authored by

Ansh and committed by
GitHub
b06304a2 831b367e

+51 -9
+2
src/lib/constants.ts
··· 132 132 return PROD_LINK_META_PROXY 133 133 } 134 134 } 135 + 136 + export const STATUS_PAGE_URL = 'https://status.bsky.app/'
+19 -2
src/view/com/auth/withAuthRequired.tsx
··· 1 1 import React from 'react' 2 - import {ActivityIndicator, StyleSheet} from 'react-native' 2 + import { 3 + ActivityIndicator, 4 + Linking, 5 + StyleSheet, 6 + TouchableOpacity, 7 + } from 'react-native' 3 8 import {observer} from 'mobx-react-lite' 4 9 import {useStores} from 'state/index' 5 10 import {CenteredView} from '../util/Views' 6 11 import {LoggedOut} from './LoggedOut' 7 12 import {Text} from '../util/text/Text' 8 13 import {usePalette} from 'lib/hooks/usePalette' 14 + import {STATUS_PAGE_URL} from 'lib/constants' 9 15 10 16 export const withAuthRequired = <P extends object>( 11 17 Component: React.ComponentType<P>, ··· 26 32 27 33 const [isTakingTooLong, setIsTakingTooLong] = React.useState(false) 28 34 React.useEffect(() => { 29 - const t = setTimeout(() => setIsTakingTooLong(true), 15e3) 35 + const t = setTimeout(() => setIsTakingTooLong(true), 15e3) // 15 seconds 30 36 return () => clearTimeout(t) 31 37 }, [setIsTakingTooLong]) 32 38 ··· 38 44 ? "This is taking too long. There may be a problem with your internet or with the service, but we're going to try a couple more times..." 39 45 : 'Connecting...'} 40 46 </Text> 47 + {isTakingTooLong ? ( 48 + <TouchableOpacity 49 + onPress={() => { 50 + Linking.openURL(STATUS_PAGE_URL) 51 + }} 52 + accessibilityRole="button"> 53 + <Text type="2xl" style={[styles.loadingText, pal.link]}> 54 + Check Bluesky status page 55 + </Text> 56 + </TouchableOpacity> 57 + ) : null} 41 58 </CenteredView> 42 59 ) 43 60 }
+30 -7
src/view/screens/Settings.tsx
··· 1 1 import React from 'react' 2 2 import { 3 3 ActivityIndicator, 4 + Linking, 4 5 Platform, 5 6 StyleSheet, 6 7 TextStyle, ··· 47 48 // remove after backend testing finishes 48 49 // -prf 49 50 import {useDebugHeaderSetting} from 'lib/api/debug-appview-proxy-header' 51 + import {STATUS_PAGE_URL} from 'lib/constants' 50 52 51 53 type Props = NativeStackScreenProps<CommonNavigatorParams, 'Settings'> 52 54 export const SettingsScreen = withAuthRequired( ··· 186 188 const onPressSavedFeeds = React.useCallback(() => { 187 189 navigation.navigate('SavedFeeds') 188 190 }, [navigation]) 191 + 192 + const onPressStatusPage = React.useCallback(() => { 193 + Linking.openURL(STATUS_PAGE_URL) 194 + }, []) 189 195 190 196 return ( 191 197 <View style={[s.hContentRegion]} testID="settingsScreen"> ··· 529 535 </TouchableOpacity> 530 536 </> 531 537 ) : null} 532 - <TouchableOpacity 533 - accessibilityRole="button" 534 - onPress={onPressBuildInfo}> 535 - <Text type="sm" style={[styles.buildInfo, pal.textLight]}> 536 - Build version {AppInfo.appVersion} {AppInfo.updateChannel} 538 + <View style={[styles.footer]}> 539 + <TouchableOpacity 540 + accessibilityRole="button" 541 + onPress={onPressBuildInfo}> 542 + <Text type="sm" style={[styles.buildInfo, pal.textLight]}> 543 + Build version {AppInfo.appVersion} {AppInfo.updateChannel} 544 + </Text> 545 + </TouchableOpacity> 546 + <Text type="sm" style={[pal.textLight]}> 547 + &middot; &nbsp; 537 548 </Text> 538 - </TouchableOpacity> 549 + <TouchableOpacity 550 + accessibilityRole="button" 551 + onPress={onPressStatusPage}> 552 + <Text type="sm" style={[styles.buildInfo, pal.textLight]}> 553 + Status page 554 + </Text> 555 + </TouchableOpacity> 556 + </View> 539 557 <View style={s.footerSpacer} /> 540 558 </ScrollView> 541 559 </View> ··· 621 639 }, 622 640 buildInfo: { 623 641 paddingVertical: 8, 624 - paddingHorizontal: 18, 625 642 }, 626 643 627 644 colorModeText: { ··· 644 661 }, 645 662 toggleBtn: { 646 663 paddingHorizontal: 0, 664 + }, 665 + footer: { 666 + flex: 1, 667 + flexDirection: 'row', 668 + alignItems: 'center', 669 + paddingLeft: 18, 647 670 }, 648 671 })