From 6bec1396795baba31792cca5f41d58930feeee6b Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 31 Aug 2022 20:43:36 -0500 Subject: [PATCH] Add avi and context menu to shell topbar --- src/view/com/util/FloatingActionButton.tsx | 2 +- src/view/shell/mobile/index.tsx | 48 ++++++++++++++++++---- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/src/view/com/util/FloatingActionButton.tsx b/src/view/com/util/FloatingActionButton.tsx index acfc4866..382bf66b 100644 --- a/src/view/com/util/FloatingActionButton.tsx +++ b/src/view/com/util/FloatingActionButton.tsx @@ -31,7 +31,7 @@ const styles = StyleSheet.create({ position: 'absolute', zIndex: zIndex.FAB, right: 20, - bottom: 20, + bottom: 10, width: 50, height: 50, borderRadius: 25, diff --git a/src/view/shell/mobile/index.tsx b/src/view/shell/mobile/index.tsx index c53de080..69e3a66f 100644 --- a/src/view/shell/mobile/index.tsx +++ b/src/view/shell/mobile/index.tsx @@ -2,6 +2,7 @@ import React, {useRef} from 'react' import {observer} from 'mobx-react-lite' import { GestureResponderEvent, + Image, SafeAreaView, StyleSheet, Text, @@ -17,15 +18,26 @@ import {match, MatchResult} from '../../routes' import {TabsSelectorModal} from './tabs-selector' import {createBackMenu, createForwardMenu} from './history-menu' import {colors} from '../../lib/styles' +import {AVIS} from '../../lib/assets' + +const locationIconNeedsNudgeUp = (icon: IconProp) => icon === 'house' const Location = ({icon, title}: {icon: IconProp; title?: string}) => { + const nudgeUp = locationIconNeedsNudgeUp(icon) return ( {title ? ( - + ) : ( @@ -90,10 +102,14 @@ export const MobileShell: React.FC = observer(() => { return ( + + + + @@ -191,22 +207,34 @@ const styles = StyleSheet.create({ paddingTop: 40, paddingBottom: 5, }, + avi: { + width: 28, + height: 28, + marginRight: 8, + borderRadius: 14, + }, location: { flex: 1, flexDirection: 'row', - borderRadius: 4, + borderRadius: 6, paddingLeft: 10, paddingRight: 6, paddingTop: 6, paddingBottom: 6, - backgroundColor: '#F8F3F3', + backgroundColor: colors.gray1, + // justifyContent: 'center', }, locationIcon: { - color: colors.pink3, - marginRight: 8, + color: colors.gray5, + marginTop: 3, + marginRight: 6, + }, + locationIconNudgeUp: { + marginTop: 2, }, locationIconLight: { - color: colors.gray3, + color: colors.gray5, + marginTop: 2, marginRight: 8, }, locationText: { @@ -215,6 +243,12 @@ const styles = StyleSheet.create({ locationTextLight: { color: colors.gray4, }, + topBarBtn: { + marginLeft: 8, + justifyContent: 'center', + borderRadius: 6, + paddingHorizontal: 6, + }, bottomBar: { flexDirection: 'row', backgroundColor: colors.white,