about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRahul Yadav <52163880+rahulyadav5524@users.noreply.github.com>2023-12-30 14:46:27 +0530
committerGitHub <noreply@github.com>2023-12-30 14:46:27 +0530
commitd9e68d160411a8baf7c69161a38943aabac7283d (patch)
tree81d2c06d40d293496b0c582734b2a040cf893108
parent1f037a0b4351eda47bae41a8e6004dc0f452afb7 (diff)
downloadvoidsky-d9e68d160411a8baf7c69161a38943aabac7283d.tar.zst
Show setting header in web
-rw-r--r--src/view/screens/Settings.tsx26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx
index d48112dae..16efdf364 100644
--- a/src/view/screens/Settings.tsx
+++ b/src/view/screens/Settings.tsx
@@ -147,7 +147,7 @@ export function SettingsScreen({}: Props) {
   const setRequireAltTextEnabled = useSetRequireAltTextEnabled()
   const onboardingDispatch = useOnboardingDispatch()
   const navigation = useNavigation<NavigationProp>()
-  const {isMobile} = useWebMediaQueries()
+  const {isMobile, isTabletOrDesktop} = useWebMediaQueries()
   const {screen, track} = useAnalytics()
   const {openModal} = useModalControls()
   const {isSwitchingAccounts, accounts, currentAccount} = useSession()
@@ -273,11 +273,17 @@ export function SettingsScreen({}: Props) {
   }, [])
 
   return (
-    <View style={[s.hContentRegion]} testID="settingsScreen">
-      <ViewHeader title={_(msg`Settings`)} />
+    <CenteredView
+      style={[
+        s.hContentRegion,
+        pal.border,
+        isTabletOrDesktop ? styles.desktopContainer : pal.viewLight,
+      ]}
+      testID="settingsScreen">
+      <ViewHeader title={_(msg`Settings`)} showOnDesktop />
       <ScrollView
         style={[s.hContentRegion]}
-        contentContainerStyle={isMobile && pal.viewLight}
+        contentContainerStyle={[isMobile && pal.viewLight, styles.noBorder]}
         scrollIndicatorInsets={{right: 1}}>
         <View style={styles.spacer20} />
         {currentAccount ? (
@@ -752,7 +758,7 @@ export function SettingsScreen({}: Props) {
         </View>
         <View style={s.footerSpacer} />
       </ScrollView>
-    </View>
+    </CenteredView>
   )
 }
 
@@ -897,4 +903,14 @@ const styles = StyleSheet.create({
     alignItems: 'center',
     paddingLeft: 18,
   },
+  desktopContainer: {
+    borderLeftWidth: 1,
+    borderRightWidth: 1,
+  },
+  noBorder: {
+    borderBottomWidth: 0,
+    borderTopWidth: 0,
+    borderRightWidth: 0,
+    borderLeftWidth: 0,
+  },
 })