From df712a89d30b645d37e715aa90cdc0c01262d84c Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 1 Mar 2023 10:35:56 -0600 Subject: [PATCH] Fixes to dark mode (#238) --- src/view/com/composer/ComposePost.tsx | 4 ++-- src/view/com/modals/EditProfile.tsx | 4 ++-- src/view/com/modals/ReportAccount.tsx | 9 +++++---- src/view/com/modals/ReportPost.tsx | 11 +++++++---- src/view/screens/Search.tsx | 5 +++-- src/view/screens/Settings.tsx | 14 ++++++++++---- 6 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/view/com/composer/ComposePost.tsx b/src/view/com/composer/ComposePost.tsx index 6f8fe460..0bfe07f5 100644 --- a/src/view/com/composer/ComposePost.tsx +++ b/src/view/com/composer/ComposePost.tsx @@ -379,7 +379,7 @@ export const ComposePost = observer(function ComposePost({ {isProcessing ? ( - {processingState} + {processingState} ) : undefined} {error !== '' && ( @@ -468,7 +468,7 @@ export const ComposePost = observer(function ComposePost({ key={`suggested-${url}`} style={[pal.borderDark, styles.addExtLinkBtn]} onPress={() => onPressAddLinkCard(url)}> - + Add link card: {url} diff --git a/src/view/com/modals/EditProfile.tsx b/src/view/com/modals/EditProfile.tsx index f822fcfd..052681fd 100644 --- a/src/view/com/modals/EditProfile.tsx +++ b/src/view/com/modals/EditProfile.tsx @@ -106,7 +106,7 @@ export function Component({ } return ( - + Edit my profile @@ -130,7 +130,7 @@ export function Component({ )} - Display Name + Display Name (false) const [error, setError] = useState('') const [issue, setIssue] = useState('') @@ -59,9 +61,9 @@ export function Component({did}: {did: string}) { } } return ( - - Report account - + + Report account + What is the issue with this account? @@ -100,7 +102,6 @@ const styles = StyleSheet.create({ textAlign: 'center', fontSize: 17, paddingHorizontal: 22, - color: colors.gray5, marginBottom: 10, }, btn: { diff --git a/src/view/com/modals/ReportPost.tsx b/src/view/com/modals/ReportPost.tsx index 3d47e7ef..3e876c6c 100644 --- a/src/view/com/modals/ReportPost.tsx +++ b/src/view/com/modals/ReportPost.tsx @@ -14,6 +14,7 @@ import {Text} from '../util/text/Text' import * as Toast from '../util/Toast' import {ErrorMessage} from '../util/error/ErrorMessage' import {cleanError} from 'lib/strings/errors' +import {usePalette} from 'lib/hooks/usePalette' const ITEMS: RadioGroupItem[] = [ {key: 'spam', label: 'Spam or excessive repeat posts'}, @@ -32,6 +33,7 @@ export function Component({ postCid: string }) { const store = useStores() + const pal = usePalette('default') const [isProcessing, setIsProcessing] = useState(false) const [error, setError] = useState('') const [issue, setIssue] = useState('') @@ -67,9 +69,11 @@ export function Component({ } } return ( - - Report post - What is the issue with this post? + + Report post + + What is the issue with this post? + {error ? ( @@ -106,7 +110,6 @@ const styles = StyleSheet.create({ textAlign: 'center', fontSize: 17, paddingHorizontal: 22, - color: colors.gray5, marginBottom: 10, }, btn: { diff --git a/src/view/screens/Search.tsx b/src/view/screens/Search.tsx index 2e176d98..93539e29 100644 --- a/src/view/screens/Search.tsx +++ b/src/view/screens/Search.tsx @@ -81,6 +81,7 @@ export const Search = observer(({navIdx, visible, params}: ScreenParams) => { const onPressCancelSearch = () => { setQuery('') autocompleteView.setActive(false) + textInput.current?.blur() } return ( @@ -127,10 +128,10 @@ export const Search = observer(({navIdx, visible, params}: ScreenParams) => { onChangeText={onChangeQuery} /> - {query ? ( + {query || isInputFocused ? ( - Cancel + Cancel ) : undefined} diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index f5db8112..9332b515 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -5,7 +5,10 @@ import { TouchableOpacity, View, } from 'react-native' -import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' +import { + FontAwesomeIcon, + FontAwesomeIconStyle, +} from '@fortawesome/react-native-fontawesome' import {observer} from 'mobx-react-lite' import * as AppInfo from 'lib/app-info' import {useStores} from 'state/index' @@ -151,7 +154,10 @@ export const Settings = observer(function Settings({ isSwitching && styles.dimmed, ]} onPress={isSwitching ? undefined : onPressAddAccount}> - + Add account @@ -160,7 +166,7 @@ export const Settings = observer(function Settings({ - + Danger zone Delete my account - + Developer tools