Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

remove sandbox labels (#2883)

* rm sandbox

* remove comment

authored by

Hailey and committed by
GitHub
a2f462e2 b665f065

+6 -88
-6
src/state/session/index.tsx
··· 7 7 import {logger} from '#/logger' 8 8 import * as persisted from '#/state/persisted' 9 9 import {PUBLIC_BSKY_AGENT} from '#/state/queries' 10 - import {IS_PROD} from '#/lib/constants' 11 10 import {emitSessionDropped} from '../events' 12 11 import {useLoggedOutViewControls} from '#/state/shell/logged-out' 13 12 import {useCloseAllActiveElements} from '#/state/util' ··· 36 35 } 37 36 export type StateContext = SessionState & { 38 37 hasSession: boolean 39 - isSandbox: boolean 40 38 } 41 39 export type ApiContext = { 42 40 createAccount: (props: { ··· 84 82 accounts: [], 85 83 currentAccount: undefined, 86 84 hasSession: false, 87 - isSandbox: false, 88 85 }) 89 86 90 87 const ApiContext = React.createContext<ApiContext>({ ··· 610 607 () => ({ 611 608 ...state, 612 609 hasSession: !!state.currentAccount, 613 - isSandbox: state.currentAccount 614 - ? !IS_PROD(state.currentAccount?.service) 615 - : false, 616 610 }), 617 611 [state], 618 612 )
+3 -12
src/view/com/feeds/FeedPage.tsx
··· 46 46 renderEmptyState: () => JSX.Element 47 47 renderEndOfFeed?: () => JSX.Element 48 48 }) { 49 - const {isSandbox, hasSession} = useSession() 49 + const {hasSession} = useSession() 50 50 const pal = usePalette('default') 51 51 const {_} = useLingui() 52 52 const navigation = useNavigation() ··· 119 119 style={[pal.text, {fontWeight: 'bold'}]} 120 120 text={ 121 121 <> 122 - {isSandbox ? 'SANDBOX' : 'Bluesky'}{' '} 122 + Bluesky{' '} 123 123 {hasNew && ( 124 124 <View 125 125 style={{ ··· 154 154 ) 155 155 } 156 156 return <></> 157 - }, [ 158 - isDesktop, 159 - pal.view, 160 - pal.text, 161 - pal.textLight, 162 - hasNew, 163 - _, 164 - isSandbox, 165 - hasSession, 166 - ]) 157 + }, [isDesktop, pal.view, pal.text, pal.textLight, hasNew, _, hasSession]) 167 158 168 159 return ( 169 160 <View testID={testID} style={s.h100pct}>
+1 -18
src/view/com/pager/FeedsTabBar.web.tsx
··· 37 37 38 38 function FeedsTabBarPublic() { 39 39 const pal = usePalette('default') 40 - const {isSandbox} = useSession() 41 40 42 41 return ( 43 42 <CenteredView sideBorders> ··· 56 55 type="title-lg" 57 56 href="/" 58 57 style={[pal.text, {fontWeight: 'bold'}]} 59 - text={ 60 - <> 61 - {isSandbox ? 'SANDBOX' : 'Bluesky'}{' '} 62 - {/*hasNew && ( 63 - <View 64 - style={{ 65 - top: -8, 66 - backgroundColor: colors.blue3, 67 - width: 8, 68 - height: 8, 69 - borderRadius: 4, 70 - }} 71 - /> 72 - )*/} 73 - </> 74 - } 75 - // onPress={emitSoftReset} 58 + text="Bluesky " 76 59 /> 77 60 </View> 78 61 </CenteredView>
-4
src/view/com/post-thread/PostThreadItem.tsx
··· 27 27 import {PostHider} from '../util/moderation/PostHider' 28 28 import {ContentHider} from '../util/moderation/ContentHider' 29 29 import {PostAlerts} from '../util/moderation/PostAlerts' 30 - import {PostSandboxWarning} from '../util/PostSandboxWarning' 31 30 import {ErrorMessage} from '../util/error/ErrorMessage' 32 31 import {usePalette} from 'lib/hooks/usePalette' 33 32 import {formatCount} from '../util/numeric/format' ··· 247 246 testID={`postThreadItem-by-${post.author.handle}`} 248 247 style={[styles.outer, styles.outerHighlighted, pal.border, pal.view]} 249 248 accessible={false}> 250 - <PostSandboxWarning /> 251 249 <View style={[styles.layout]}> 252 250 <View style={[styles.layoutAvi, {paddingBottom: 8}]}> 253 251 <PreviewableUserAvatar ··· 438 436 ? {marginRight: 4} 439 437 : {marginLeft: 2, marginRight: 2} 440 438 }> 441 - <PostSandboxWarning /> 442 - 443 439 <View 444 440 style={{ 445 441 flexDirection: 'row',
-3
src/view/com/posts/FeedItem.tsx
··· 21 21 import {ContentHider} from '../util/moderation/ContentHider' 22 22 import {PostAlerts} from '../util/moderation/PostAlerts' 23 23 import {RichText} from '../util/text/RichText' 24 - import {PostSandboxWarning} from '../util/PostSandboxWarning' 25 24 import {PreviewableUserAvatar} from '../util/UserAvatar' 26 25 import {s} from 'lib/styles' 27 26 import {usePalette} from 'lib/hooks/usePalette' ··· 160 159 href={href} 161 160 noFeedback 162 161 accessible={false}> 163 - <PostSandboxWarning /> 164 - 165 162 <View style={{flexDirection: 'row', gap: 10, paddingLeft: 8}}> 166 163 <View style={{width: 52}}> 167 164 {isThreadChild && (
-35
src/view/com/util/PostSandboxWarning.tsx
··· 1 - import React from 'react' 2 - import {StyleSheet, View} from 'react-native' 3 - import {Text} from './text/Text' 4 - import {usePalette} from 'lib/hooks/usePalette' 5 - import {useSession} from '#/state/session' 6 - 7 - export function PostSandboxWarning() { 8 - const {isSandbox} = useSession() 9 - const pal = usePalette('default') 10 - if (isSandbox) { 11 - return ( 12 - <View style={styles.container}> 13 - <Text 14 - type="title-2xl" 15 - style={[pal.text, styles.text]} 16 - accessible={false}> 17 - SANDBOX 18 - </Text> 19 - </View> 20 - ) 21 - } 22 - return null 23 - } 24 - 25 - const styles = StyleSheet.create({ 26 - container: { 27 - position: 'absolute', 28 - top: 6, 29 - right: 10, 30 - }, 31 - text: { 32 - fontWeight: 'bold', 33 - opacity: 0.07, 34 - }, 35 - })
+2 -10
src/view/shell/desktop/RightNav.tsx
··· 9 9 import {s} from 'lib/styles' 10 10 import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries' 11 11 import {useLingui} from '@lingui/react' 12 - import {Trans, msg} from '@lingui/macro' 12 + import {msg} from '@lingui/macro' 13 13 import {useSession} from '#/state/session' 14 14 15 15 export function DesktopRightNav({routeName}: {routeName: string}) { 16 16 const pal = usePalette('default') 17 - const palError = usePalette('error') 18 17 const {_} = useLingui() 19 - const {isSandbox, hasSession, currentAccount} = useSession() 18 + const {hasSession, currentAccount} = useSession() 20 19 21 20 const {isTablet} = useWebMediaQueries() 22 21 if (isTablet) { ··· 49 48 paddingTop: hasSession ? 0 : 18, 50 49 }, 51 50 ]}> 52 - {isSandbox ? ( 53 - <View style={[palError.view, styles.messageLine, s.p10]}> 54 - <Text type="md" style={[palError.text, s.bold]}> 55 - <Trans>SANDBOX. Posts and accounts are not permanent.</Trans> 56 - </Text> 57 - </View> 58 - ) : undefined} 59 51 <View style={[{flexWrap: 'wrap'}, s.flexRow]}> 60 52 {hasSession && ( 61 53 <>