diff --git a/src/view/com/modals/TabsSelector.tsx b/src/view/com/modals/TabsSelector.tsx index 363f6fcd58..43940bd7c1 100644 --- a/src/view/com/modals/TabsSelector.tsx +++ b/src/view/com/modals/TabsSelector.tsx @@ -151,7 +151,12 @@ export const Component = observer(() => { url="/notifications" gradient="purple" /> - + diff --git a/src/view/routes.ts b/src/view/routes.ts index d89dafff89..1f2f3544fd 100644 --- a/src/view/routes.ts +++ b/src/view/routes.ts @@ -10,6 +10,7 @@ import {PostRepostedBy} from './screens/PostRepostedBy' import {Profile} from './screens/Profile' import {ProfileFollowers} from './screens/ProfileFollowers' import {ProfileFollows} from './screens/ProfileFollows' +import {Settings} from './screens/Settings' export type ScreenParams = { params: Record @@ -27,6 +28,7 @@ export const routes: Route[] = [ [Home, 'house', r('/')], [Search, 'magnifying-glass', r('/search')], [Notifications, 'bell', r('/notifications')], + [Settings, 'bell', r('/settings')], [Profile, ['far', 'user'], r('/profile/(?[^/]+)')], [ProfileFollowers, 'users', r('/profile/(?[^/]+)/followers')], [ProfileFollows, 'users', r('/profile/(?[^/]+)/follows')], diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx new file mode 100644 index 0000000000..0f7d6b89bc --- /dev/null +++ b/src/view/screens/Settings.tsx @@ -0,0 +1,68 @@ +import React, {useEffect} from 'react' +import {Image, StyleSheet, Text, TouchableOpacity, View} from 'react-native' +import {observer} from 'mobx-react-lite' +import {useStores} from '../../state' +import {ScreenParams} from '../routes' +import {s, colors} from '../lib/styles' +import {DEF_AVATER} from '../lib/assets' +import {Link} from '../com/util/Link' + +export const Settings = observer(function Settings({visible}: ScreenParams) { + const store = useStores() + + useEffect(() => { + if (!visible) { + return + } + store.nav.setTitle('Settings') + }, [visible, store]) + + const onPressSignout = () => { + store.session.logout() + } + + return ( + + Settings + + Signed in as + + + Sign out + + + + + + + {store.me.displayName} + @{store.me.name} + + + + + ) +}) + +const styles = StyleSheet.create({ + title: { + fontSize: 32, + fontWeight: 'bold', + marginTop: 20, + marginBottom: 14, + }, + profile: { + flexDirection: 'row', + marginVertical: 6, + backgroundColor: colors.white, + borderRadius: 4, + paddingVertical: 10, + paddingHorizontal: 10, + }, + avi: { + width: 40, + height: 40, + borderRadius: 30, + marginRight: 8, + }, +}) diff --git a/todos.txt b/todos.txt index 1273e977b0..5237d93491 100644 --- a/todos.txt +++ b/todos.txt @@ -2,14 +2,22 @@ Paul's todo list - General - Update to RN 0.70 + - Go through every button and make sure it does what it's supposed to +- Onboarding flow + - * +- Private beta + - Users list + - Firehose - Composer - Update the view after creating a post - Profile - - Real badges - - Edit profile: avatar, cover photo + - Disable badges for now + - Disable editing avi or banner - More button - Search view - * +- Notifications view + - * - Linking - Web linking - App linking @@ -20,4 +28,5 @@ Paul's todo list - Follows list - Bugs - Check that sub components arent reloading too much - - Titles are getting screwed up (possibly swipe related) \ No newline at end of file + - Titles are getting screwed up (possibly swipe related) + - Likes, RTs? \ No newline at end of file