From a00672a7c651cf4bb633854f14348675544fb805 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 2 Dec 2024 16:31:19 -0600 Subject: [PATCH] Swap out on all settings screens --- src/components/Layout/index.tsx | 19 +------------------ src/screens/Settings/AboutSettings.tsx | 9 ++++++++- .../Settings/AccessibilitySettings.tsx | 9 ++++++++- src/screens/Settings/AccountSettings.tsx | 14 +++++++------- src/screens/Settings/AppIconSettings.tsx | 11 +++++++++-- src/screens/Settings/AppPasswords.tsx | 9 ++++++++- src/screens/Settings/AppearanceSettings.tsx | 9 ++++++++- .../Settings/ContentAndMediaSettings.tsx | 9 ++++++++- .../Settings/ExternalMediaPreferences.tsx | 13 +++++++++---- .../Settings/FollowingFeedPreferences.tsx | 9 ++++++++- src/screens/Settings/LanguageSettings.tsx | 9 ++++++++- src/screens/Settings/NotificationSettings.tsx | 9 ++++++++- .../Settings/PrivacyAndSecuritySettings.tsx | 9 ++++++++- src/screens/Settings/Settings.tsx | 10 +++++++++- src/screens/Settings/ThreadPreferences.tsx | 11 ++++++++++- 15 files changed, 117 insertions(+), 42 deletions(-) diff --git a/src/components/Layout/index.tsx b/src/components/Layout/index.tsx index 136535f7c7..8922f11624 100644 --- a/src/components/Layout/index.tsx +++ b/src/components/Layout/index.tsx @@ -9,11 +9,9 @@ import Animated, {AnimatedScrollViewProps} from 'react-native-reanimated' import {useSafeAreaInsets} from 'react-native-safe-area-context' import {isWeb} from '#/platform/detection' -import {ViewHeader} from '#/view/com/util/ViewHeader' -import {CenteredView} from '#/view/com/util/Views' import {atoms as a, useBreakpoints, useTheme} from '#/alf' -export * as HeaderNew from './Header' +export * as Header from '#/components/Layout/Header' // Every screen should have a Layout component wrapping it. // This component provides a default padding for the top of the screen. @@ -63,21 +61,6 @@ export const Screen = React.memo(function Screen({ ) }) -export const Header = React.memo(function Header( - props: React.ComponentProps, -) { - const {withinScrollView} = useContext(LayoutContext) - if (!withinScrollView) { - return ( - - - - ) - } else { - return - } -}) - export type ContentProps = AnimatedScrollViewProps & { style?: StyleProp contentContainerStyle?: StyleProp diff --git a/src/screens/Settings/AboutSettings.tsx b/src/screens/Settings/AboutSettings.tsx index 8019a20f90..957dd334e0 100644 --- a/src/screens/Settings/AboutSettings.tsx +++ b/src/screens/Settings/AboutSettings.tsx @@ -21,8 +21,15 @@ export function AboutSettingsScreen({}: Props) { return ( - + + + + + About + + + - + + + + + Accessibility + + + diff --git a/src/screens/Settings/AccountSettings.tsx b/src/screens/Settings/AccountSettings.tsx index b3ae139c2b..935e701e96 100644 --- a/src/screens/Settings/AccountSettings.tsx +++ b/src/screens/Settings/AccountSettings.tsx @@ -39,14 +39,14 @@ export function AccountSettingsScreen({}: Props) { return ( - - - - + + + + Account - - - + + + diff --git a/src/screens/Settings/AppIconSettings.tsx b/src/screens/Settings/AppIconSettings.tsx index 1dd87d45f4..392a67bfb2 100644 --- a/src/screens/Settings/AppIconSettings.tsx +++ b/src/screens/Settings/AppIconSettings.tsx @@ -1,7 +1,7 @@ import React from 'react' import {Alert, View} from 'react-native' import {Image} from 'expo-image' -import {msg} from '@lingui/macro' +import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import * as AppIcon from '@mozzius/expo-dynamic-app-icon' import {NativeStackScreenProps} from '@react-navigation/native-stack' @@ -20,9 +20,16 @@ export function AppIconSettingsScreen({}: Props) { return ( - + + + + + App Icon + + + Defaults {sets.defaults.map(icon => ( diff --git a/src/screens/Settings/AppPasswords.tsx b/src/screens/Settings/AppPasswords.tsx index 1ea0bd1b3d..320017111f 100644 --- a/src/screens/Settings/AppPasswords.tsx +++ b/src/screens/Settings/AppPasswords.tsx @@ -44,8 +44,15 @@ export function AppPasswordsScreen({}: Props) { return ( - + + + + + App Passwords + + + {error ? ( - + + + + + Appearance + + + - + + + + + Content & Media + + + export function ExternalMediaPreferencesScreen({}: Props) { - const {_} = useLingui() return ( - + + + + + External Media Preferences + + + diff --git a/src/screens/Settings/FollowingFeedPreferences.tsx b/src/screens/Settings/FollowingFeedPreferences.tsx index 089491dd0f..0e79f1fd3d 100644 --- a/src/screens/Settings/FollowingFeedPreferences.tsx +++ b/src/screens/Settings/FollowingFeedPreferences.tsx @@ -46,8 +46,15 @@ export function FollowingFeedPreferencesScreen({}: Props) { return ( - + + + + + Following Feed Preferences + + + diff --git a/src/screens/Settings/LanguageSettings.tsx b/src/screens/Settings/LanguageSettings.tsx index a44e2fcec7..88bde14255 100644 --- a/src/screens/Settings/LanguageSettings.tsx +++ b/src/screens/Settings/LanguageSettings.tsx @@ -64,8 +64,15 @@ export function LanguageSettingsScreen({}: Props) { return ( - + + + + + Languages + + + diff --git a/src/screens/Settings/NotificationSettings.tsx b/src/screens/Settings/NotificationSettings.tsx index c5f7078c48..9ca34853c0 100644 --- a/src/screens/Settings/NotificationSettings.tsx +++ b/src/screens/Settings/NotificationSettings.tsx @@ -33,8 +33,15 @@ export function NotificationSettingsScreen({}: Props) { return ( - + + + + + Notification Settings + + + {isQueryError ? ( - + + + + + Privacy and Security + + + - + + + + + Settings + + + + - + + + + + Thread Preferences + + + + +