mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

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

at new-image-api 106 lines 3.1 kB view raw
1import {View} from 'react-native' 2import {msg, Trans} from '@lingui/macro' 3import {useLingui} from '@lingui/react' 4 5import {FEEDBACK_FORM_URL, HELP_DESK_URL} from '#/lib/constants' 6import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' 7import {useKawaiiMode} from '#/state/preferences/kawaii' 8import {useSession} from '#/state/session' 9import {DesktopFeeds} from '#/view/shell/desktop/Feeds' 10import {DesktopSearch} from '#/view/shell/desktop/Search' 11import {atoms as a, useGutters, useTheme, web} from '#/alf' 12import {InlineLinkText} from '#/components/Link' 13import {ProgressGuideList} from '#/components/ProgressGuide/List' 14import {Text} from '#/components/Typography' 15 16export function DesktopRightNav({routeName}: {routeName: string}) { 17 const t = useTheme() 18 const {_} = useLingui() 19 const {hasSession, currentAccount} = useSession() 20 const kawaii = useKawaiiMode() 21 const gutters = useGutters(['base', 0, 'base', 'wide']) 22 23 const {isTablet} = useWebMediaQueries() 24 if (isTablet) { 25 return null 26 } 27 28 return ( 29 <View 30 style={[ 31 gutters, 32 web({ 33 position: 'fixed', 34 left: '50%', 35 transform: [ 36 { 37 translateX: 300, 38 }, 39 ...a.scrollbar_offset.transform, 40 ], 41 width: 300 + gutters.paddingLeft, 42 maxHeight: '100%', 43 overflowY: 'auto', 44 }), 45 ]}> 46 {routeName !== 'Search' && ( 47 <View style={[a.pb_lg]}> 48 <DesktopSearch /> 49 </View> 50 )} 51 {hasSession && ( 52 <> 53 <ProgressGuideList style={[a.pb_xl]} /> 54 <View 55 style={[a.pb_lg, a.mb_lg, a.border_b, t.atoms.border_contrast_low]}> 56 <DesktopFeeds /> 57 </View> 58 </> 59 )} 60 61 <Text style={[a.leading_snug, t.atoms.text_contrast_low]}> 62 {hasSession && ( 63 <> 64 <InlineLinkText 65 to={FEEDBACK_FORM_URL({ 66 email: currentAccount?.email, 67 handle: currentAccount?.handle, 68 })} 69 label={_(msg`Feedback`)}> 70 {_(msg`Feedback`)} 71 </InlineLinkText> 72 {' • '} 73 </> 74 )} 75 <InlineLinkText 76 to="https://bsky.social/about/support/privacy-policy" 77 label={_(msg`Privacy`)}> 78 {_(msg`Privacy`)} 79 </InlineLinkText> 80 {' • '} 81 <InlineLinkText 82 to="https://bsky.social/about/support/tos" 83 label={_(msg`Terms`)}> 84 {_(msg`Terms`)} 85 </InlineLinkText> 86 {' • '} 87 <InlineLinkText label={_(msg`Help`)} to={HELP_DESK_URL}> 88 {_(msg`Help`)} 89 </InlineLinkText> 90 </Text> 91 92 {kawaii && ( 93 <Text style={[t.atoms.text_contrast_medium, {marginTop: 12}]}> 94 <Trans> 95 Logo by{' '} 96 <InlineLinkText 97 label={_(msg`Logo by @sawaratsuki.bsky.social`)} 98 to="/profile/sawaratsuki.bsky.social"> 99 @sawaratsuki.bsky.social 100 </InlineLinkText> 101 </Trans> 102 </Text> 103 )} 104 </View> 105 ) 106}