From 38eb299011672fc840849ae51e67adefef882bec Mon Sep 17 00:00:00 2001 From: Ansh Date: Fri, 21 Apr 2023 16:55:29 -0700 Subject: [APP-522] Create & revoke App Passwords within settings (#505) * create and delete app passwords * add randomly generated name * Tweak copy and layout of app passwords * Improve app passwords on desktop web * Rearrange settings * Change app-passwords route and add to backend * Fix link * Fix some more desktop web * Remove log --------- Co-authored-by: Paul Frazee --- src/view/com/util/ViewHeader.tsx | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'src/view/com/util/ViewHeader.tsx') diff --git a/src/view/com/util/ViewHeader.tsx b/src/view/com/util/ViewHeader.tsx index ad0a5a1d2..816c835cc 100644 --- a/src/view/com/util/ViewHeader.tsx +++ b/src/view/com/util/ViewHeader.tsx @@ -3,6 +3,7 @@ import {observer} from 'mobx-react-lite' import {Animated, StyleSheet, TouchableOpacity, View} from 'react-native' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {useNavigation} from '@react-navigation/native' +import {CenteredView} from './Views' import {UserAvatar} from './UserAvatar' import {Text} from './text/Text' import {useStores} from 'state/index' @@ -18,10 +19,12 @@ export const ViewHeader = observer(function ({ title, canGoBack, hideOnScroll, + showOnDesktop, }: { title: string canGoBack?: boolean hideOnScroll?: boolean + showOnDesktop?: boolean }) { const pal = usePalette('default') const store = useStores() @@ -42,7 +45,10 @@ export const ViewHeader = observer(function ({ }, [track, store]) if (isDesktopWeb) { - return <> + if (showOnDesktop) { + return + } + return null } else { if (typeof canGoBack === 'undefined') { canGoBack = navigation.canGoBack() @@ -76,6 +82,19 @@ export const ViewHeader = observer(function ({ } }) +function DesktopWebHeader({title}: {title: string}) { + const pal = usePalette('default') + return ( + + + + {title} + + + + ) +} + const Container = observer( ({ children, @@ -133,6 +152,10 @@ const styles = StyleSheet.create({ top: 0, width: '100%', }, + desktopHeader: { + borderBottomWidth: 1, + paddingVertical: 12, + }, titleContainer: { marginLeft: 'auto', -- cgit 1.4.1