diff --git a/src/i18n/en/screens/tabs.json b/src/i18n/en/screens/tabs.json index 82069b25..399daedc 100644 --- a/src/i18n/en/screens/tabs.json +++ b/src/i18n/en/screens/tabs.json @@ -67,6 +67,9 @@ "settings": { "name": "App Settings" }, + "webSettings": { + "name": "More Account Settings" + }, "switch": { "name": "Switch Account" } diff --git a/src/screens/Tabs/Me/Root/Settings.tsx b/src/screens/Tabs/Me/Root/Settings.tsx index a0078c63..5e08d0f5 100644 --- a/src/screens/Tabs/Me/Root/Settings.tsx +++ b/src/screens/Tabs/Me/Root/Settings.tsx @@ -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() + const instanceActive = useSelector(getInstanceActive) + const url = useSelector(getInstanceUrl) return ( @@ -15,6 +20,19 @@ const Settings: React.FC = () => { title={t('me.stacks.settings.name')} onPress={() => navigation.navigate('Tab-Me-Settings')} /> + {instanceActive !== -1 ? ( + + WebBrowser.openAuthSessionAsync( + `https://${url}/settings/preferences`, + '' + ) + } + /> + ) : null} ) }