From d9e68d160411a8baf7c69161a38943aabac7283d Mon Sep 17 00:00:00 2001 From: Rahul Yadav <52163880+rahulyadav5524@users.noreply.github.com> Date: Sat, 30 Dec 2023 14:46:27 +0530 Subject: [PATCH 1/7] Show setting header in web --- src/view/screens/Settings.tsx | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index d48112da..16efdf36 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() - 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 ( - - + + {currentAccount ? ( @@ -752,7 +758,7 @@ export function SettingsScreen({}: Props) { - + ) } @@ -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, + }, }) From 454973f3ccbf95895c80d5d7174e43c504c30da7 Mon Sep 17 00:00:00 2001 From: Rahul Yadav <52163880+rahulyadav5524@users.noreply.github.com> Date: Thu, 4 Jan 2024 23:56:58 +0530 Subject: [PATCH 2/7] fixed lint issue --- src/view/screens/Settings.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index 16efdf36..11c82e6c 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -18,7 +18,7 @@ import { import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types' import * as AppInfo from 'lib/app-info' import {s, colors} from 'lib/styles' -import {ScrollView} from '../com/util/Views' +import {CenteredView, ScrollView} from '../com/util/Views' import {ViewHeader} from '../com/util/ViewHeader' import {Link, TextLink} from '../com/util/Link' import {Text} from '../com/util/text/Text' From abc65a9347835d827368cc06bf25b40eed7e5d5d Mon Sep 17 00:00:00 2001 From: Rahul Yadav <52163880+rahulyadav5524@users.noreply.github.com> Date: Sun, 7 Jan 2024 19:47:36 +0530 Subject: [PATCH 3/7] Fixed scroll issue --- src/view/screens/Settings.tsx | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index 11c82e6c..56890a24 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -273,17 +273,24 @@ export function SettingsScreen({}: Props) { }, []) return ( - - + + + + + {_(msg`Settings`)} + + + {currentAccount ? ( @@ -758,7 +765,7 @@ export function SettingsScreen({}: Props) { - + ) } From 218fdde8d97cfb0f16e965cae3372ed3451c7b64 Mon Sep 17 00:00:00 2001 From: Rahul Yadav <52163880+rahulyadav5524@users.noreply.github.com> Date: Sun, 7 Jan 2024 19:50:12 +0530 Subject: [PATCH 4/7] Removed unused code --- src/view/screens/Settings.tsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index 56890a24..5b4f6493 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -290,7 +290,7 @@ export function SettingsScreen({}: Props) { {currentAccount ? ( @@ -910,14 +910,4 @@ const styles = StyleSheet.create({ alignItems: 'center', paddingLeft: 18, }, - desktopContainer: { - borderLeftWidth: 1, - borderRightWidth: 1, - }, - noBorder: { - borderBottomWidth: 0, - borderTopWidth: 0, - borderRightWidth: 0, - borderLeftWidth: 0, - }, }) From 66e5cccb87928a97c744ba9381380a8182f7530e Mon Sep 17 00:00:00 2001 From: Rahul Yadav <52163880+rahulyadav5524@users.noreply.github.com> Date: Sun, 7 Jan 2024 19:53:00 +0530 Subject: [PATCH 5/7] Removed unused code --- src/view/screens/Settings.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index 5b4f6493..f47511cb 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -18,7 +18,7 @@ import { import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types' import * as AppInfo from 'lib/app-info' import {s, colors} from 'lib/styles' -import {CenteredView, ScrollView} from '../com/util/Views' +import {ScrollView} from '../com/util/Views' import {ViewHeader} from '../com/util/ViewHeader' import {Link, TextLink} from '../com/util/Link' import {Text} from '../com/util/text/Text' @@ -147,7 +147,7 @@ export function SettingsScreen({}: Props) { const setRequireAltTextEnabled = useSetRequireAltTextEnabled() const onboardingDispatch = useOnboardingDispatch() const navigation = useNavigation() - const {isMobile, isTabletOrDesktop} = useWebMediaQueries() + const {isMobile} = useWebMediaQueries() const {screen, track} = useAnalytics() const {openModal} = useModalControls() const {isSwitchingAccounts, accounts, currentAccount} = useSession() From 9fabf28cab2dcfd5ba8796bd38424b136dd49ef0 Mon Sep 17 00:00:00 2001 From: Rahul Yadav <52163880+rahulyadav5524@users.noreply.github.com> Date: Sun, 7 Jan 2024 20:17:45 +0530 Subject: [PATCH 6/7] Fixed import issue --- src/view/screens/Settings.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index f47511cb..284f568a 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -19,7 +19,6 @@ import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types' import * as AppInfo from 'lib/app-info' import {s, colors} from 'lib/styles' import {ScrollView} from '../com/util/Views' -import {ViewHeader} from '../com/util/ViewHeader' import {Link, TextLink} from '../com/util/Link' import {Text} from '../com/util/text/Text' import * as Toast from '../com/util/Toast' @@ -36,6 +35,7 @@ import {HandIcon, HashtagIcon} from 'lib/icons' import Clipboard from '@react-native-clipboard/clipboard' import {makeProfileLink} from 'lib/routes/links' import {AccountDropdownBtn} from 'view/com/util/AccountDropdownBtn' +import {SimpleViewHeader} from 'view/com/util/SimpleViewHeader' import {RQKEY as RQKEY_PROFILE} from '#/state/queries/profile' import {useModalControls} from '#/state/modals' import { From e3e13a362f68444055e479f0d4979b01f5905fd4 Mon Sep 17 00:00:00 2001 From: Rahul Yadav <52163880+rahulyadav5524@users.noreply.github.com> Date: Sun, 7 Jan 2024 20:21:15 +0530 Subject: [PATCH 7/7] Fixed same issue --- src/view/screens/Settings.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index 284f568a..f85ce44b 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -276,7 +276,6 @@ export function SettingsScreen({}: Props) {