mirror of
https://github.com/tooot-app/app
synced 2025-01-08 15:52:06 +01:00
Partially fix #237
This commit is contained in:
parent
46386cb579
commit
0a35aff8ef
@ -67,6 +67,9 @@
|
||||
"settings": {
|
||||
"name": "App Settings"
|
||||
},
|
||||
"webSettings": {
|
||||
"name": "More Account Settings"
|
||||
},
|
||||
"switch": {
|
||||
"name": "Switch Account"
|
||||
}
|
||||
|
@ -1,11 +1,16 @@
|
||||
import { MenuContainer, MenuRow } from '@components/Menu'
|
||||
import { useNavigation } from '@react-navigation/native'
|
||||
import { getInstanceActive, getInstanceUrl } from '@utils/slices/instancesSlice'
|
||||
import * as WebBrowser from 'expo-web-browser'
|
||||
import React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useSelector } from 'react-redux'
|
||||
|
||||
const Settings: React.FC = () => {
|
||||
const { t } = useTranslation('screenTabs')
|
||||
const navigation = useNavigation<any>()
|
||||
const instanceActive = useSelector(getInstanceActive)
|
||||
const url = useSelector(getInstanceUrl)
|
||||
|
||||
return (
|
||||
<MenuContainer>
|
||||
@ -15,6 +20,19 @@ const Settings: React.FC = () => {
|
||||
title={t('me.stacks.settings.name')}
|
||||
onPress={() => navigation.navigate('Tab-Me-Settings')}
|
||||
/>
|
||||
{instanceActive !== -1 ? (
|
||||
<MenuRow
|
||||
iconFront='Sliders'
|
||||
iconBack='ExternalLink'
|
||||
title={t('me.stacks.webSettings.name')}
|
||||
onPress={() =>
|
||||
WebBrowser.openAuthSessionAsync(
|
||||
`https://${url}/settings/preferences`,
|
||||
''
|
||||
)
|
||||
}
|
||||
/>
|
||||
) : null}
|
||||
</MenuContainer>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user