about summary refs log tree commit diff
path: root/src/view/screens/Settings.tsx
diff options
context:
space:
mode:
authorOllie H <renahlee@outlook.com>2023-05-02 21:00:18 -0700
committerGitHub <noreply@github.com>2023-05-02 23:00:18 -0500
commit95f8360d19938d00aaf9036a76616a7b82093703 (patch)
tree30c405a73df2d3f2cfeda6e4f4d044e5903ac12c /src/view/screens/Settings.tsx
parentaf905947bc4835cfff6f748851c95ac75cb7fb23 (diff)
downloadvoidsky-95f8360d19938d00aaf9036a76616a7b82093703.tar.zst
Add keyboard shortcuts: new, escape, and hard break (#552)
* Add keyboard shortcuts: new, escape, and hard break

* Add preferences modal

* Remove code accidentally re-added due to rebase

* Fix incorrect copy and lint

* Put stuff back so diffs are clearer

* Re-add invite codes to settings

* Address comments

* Tune the copy

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src/view/screens/Settings.tsx')
-rw-r--r--src/view/screens/Settings.tsx22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx
index 4d21f8e2c..705c37b30 100644
--- a/src/view/screens/Settings.tsx
+++ b/src/view/screens/Settings.tsx
@@ -34,8 +34,8 @@ import {useCustomPalette} from 'lib/hooks/useCustomPalette'
 import {AccountData} from 'state/models/session'
 import {useAnalytics} from 'lib/analytics'
 import {NavigationProp} from 'lib/routes/types'
-import {pluralize} from 'lib/strings/helpers'
 import {isDesktopWeb} from 'platform/detection'
+import {pluralize} from 'lib/strings/helpers'
 
 type Props = NativeStackScreenProps<CommonNavigatorParams, 'Settings'>
 export const SettingsScreen = withAuthRequired(
@@ -54,6 +54,7 @@ export const SettingsScreen = withAuthRequired(
       light: {color: colors.blue3},
       dark: {color: colors.blue2},
     })
+
     const dangerBg = useCustomPalette<ViewStyle>({
       light: {backgroundColor: colors.red1},
       dark: {backgroundColor: colors.red7},
@@ -140,13 +141,12 @@ export const SettingsScreen = withAuthRequired(
     }, [store])
 
     return (
-      <View style={s.hContentRegion} testID="settingsScreen">
+      <View style={[s.hContentRegion]} testID="settingsScreen">
         <ViewHeader title="Settings" />
         <ScrollView
-          style={s.hContentRegion}
+          style={[s.hContentRegion]}
           contentContainerStyle={!isDesktopWeb && pal.viewLight}
           scrollIndicatorInsets={{right: 1}}>
-          <View style={styles.spacer20} />
           <View style={[s.flexRow, styles.heading]}>
             <Text type="xl-bold" style={pal.text}>
               Signed in as
@@ -161,9 +161,7 @@ export const SettingsScreen = withAuthRequired(
             <Link
               href={`/profile/${store.me.handle}`}
               title="Your profile"
-              noFeedback
-              accessibilityLabel={`Signed in as ${store.me.handle}`}
-              accessibilityHint="Double tap to sign out">
+              noFeedback>
               <View style={[pal.view, styles.linkCard]}>
                 <View style={styles.avi}>
                   <UserAvatar size={40} avatar={store.me.avatar} />
@@ -231,9 +229,7 @@ export const SettingsScreen = withAuthRequired(
               Add account
             </Text>
           </TouchableOpacity>
-
           <View style={styles.spacer20} />
-
           <Text type="xl-bold" style={[pal.text, styles.heading]}>
             Invite a friend
           </Text>
@@ -301,9 +297,7 @@ export const SettingsScreen = withAuthRequired(
               Blocked accounts
             </Text>
           </Link>
-
           <View style={styles.spacer20} />
-
           <Text type="xl-bold" style={[pal.text, styles.heading]}>
             Advanced
           </Text>
@@ -338,9 +332,7 @@ export const SettingsScreen = withAuthRequired(
               Change my handle
             </Text>
           </TouchableOpacity>
-
           <View style={styles.spacer20} />
-
           <Text type="xl-bold" style={[pal.text, styles.heading]}>
             Danger zone
           </Text>
@@ -355,16 +347,14 @@ export const SettingsScreen = withAuthRequired(
               <FontAwesomeIcon
                 icon={['far', 'trash-can']}
                 style={dangerText as FontAwesomeIconStyle}
-                size={21}
+                size={18}
               />
             </View>
             <Text type="lg" style={dangerText}>
               Delete my account
             </Text>
           </TouchableOpacity>
-
           <View style={styles.spacer20} />
-
           <Text type="xl-bold" style={[pal.text, styles.heading]}>
             Developer tools
           </Text>