Add policy links to left nav and settings page (#2300)

zio/stable
Paul Frazee 2023-12-24 14:29:23 -08:00 committed by GitHub
parent b199405134
commit d2a4d580a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 2 deletions

View File

@ -20,7 +20,7 @@ import * as AppInfo from 'lib/app-info'
import {s, colors} from 'lib/styles' import {s, colors} from 'lib/styles'
import {ScrollView} from '../com/util/Views' import {ScrollView} from '../com/util/Views'
import {ViewHeader} from '../com/util/ViewHeader' import {ViewHeader} from '../com/util/ViewHeader'
import {Link} from '../com/util/Link' import {Link, TextLink} from '../com/util/Link'
import {Text} from '../com/util/text/Text' import {Text} from '../com/util/text/Text'
import * as Toast from '../com/util/Toast' import * as Toast from '../com/util/Toast'
import {UserAvatar} from '../com/util/UserAvatar' import {UserAvatar} from '../com/util/UserAvatar'
@ -721,7 +721,7 @@ export function SettingsScreen({}: Props) {
</Text> </Text>
</TouchableOpacity> </TouchableOpacity>
<Text type="sm" style={[pal.textLight]}> <Text type="sm" style={[pal.textLight]}>
&middot; &nbsp; &nbsp; &middot; &nbsp;
</Text> </Text>
<TouchableOpacity <TouchableOpacity
accessibilityRole="button" accessibilityRole="button"
@ -731,6 +731,25 @@ export function SettingsScreen({}: Props) {
</Text> </Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View
style={[
{flexWrap: 'wrap', gap: 12, paddingHorizontal: 18},
s.flexRow,
]}>
<TextLink
type="md"
style={pal.link}
href="https://blueskyweb.xyz/support/tos"
text={_(msg`Terms of Service`)}
/>
<TextLink
type="md"
style={pal.link}
href="https://blueskyweb.xyz/support/privacy-policy"
text={_(msg`Privacy Policy`)}
/>
</View>
<View style={s.footerSpacer} /> <View style={s.footerSpacer} />
</ScrollView> </ScrollView>
</View> </View>

View File

@ -51,6 +51,7 @@ import {useUnreadNotifications} from '#/state/queries/notifications/unread'
import {emitSoftReset} from '#/state/events' import {emitSoftReset} from '#/state/events'
import {useInviteCodesQuery} from '#/state/queries/invites' import {useInviteCodesQuery} from '#/state/queries/invites'
import {NavSignupCard} from '#/view/shell/NavSignupCard' import {NavSignupCard} from '#/view/shell/NavSignupCard'
import {TextLink} from '../com/util/Link'
let DrawerProfileCard = ({ let DrawerProfileCard = ({
account, account,
@ -106,6 +107,7 @@ export {DrawerProfileCard}
let DrawerContent = ({}: {}): React.ReactNode => { let DrawerContent = ({}: {}): React.ReactNode => {
const theme = useTheme() const theme = useTheme()
const pal = usePalette('default') const pal = usePalette('default')
const {_} = useLingui()
const setDrawerOpen = useSetDrawerOpen() const setDrawerOpen = useSetDrawerOpen()
const navigation = useNavigation<NavigationProp>() const navigation = useNavigation<NavigationProp>()
const {track} = useAnalytics() const {track} = useAnalytics()
@ -244,6 +246,23 @@ let DrawerContent = ({}: {}): React.ReactNode => {
<SearchMenuItem isActive={isAtSearch} onPress={onPressSearch} /> <SearchMenuItem isActive={isAtSearch} onPress={onPressSearch} />
)} )}
<View style={styles.smallSpacer} />
<View style={[{flexWrap: 'wrap', gap: 12}, s.flexCol]}>
<TextLink
type="md"
style={pal.link}
href="https://blueskyweb.xyz/support/tos"
text={_(msg`Terms of Service`)}
/>
<TextLink
type="md"
style={pal.link}
href="https://blueskyweb.xyz/support/privacy-policy"
text={_(msg`Privacy Policy`)}
/>
</View>
<View style={styles.smallSpacer} /> <View style={styles.smallSpacer} />
<View style={styles.smallSpacer} /> <View style={styles.smallSpacer} />
</ScrollView> </ScrollView>