Rearrange shell buttons to merge notifications into menu and bring back forward

zio/stable
Paul Frazee 2022-10-11 09:19:09 -05:00
parent a1428ca59a
commit 8dc8200f07
2 changed files with 16 additions and 19 deletions

View File

@ -157,7 +157,7 @@ const styles = StyleSheet.create({
borderRadius: 15, borderRadius: 15,
width: 30, width: 30,
height: 30, height: 30,
marginRight: 5, marginRight: 8,
}, },
profileText: { profileText: {
fontSize: 15, fontSize: 15,

View File

@ -108,14 +108,13 @@ export const MobileShell: React.FC = observer(() => {
const onDismissLocationNavigator = () => setLocationMenuActive(false) const onDismissLocationNavigator = () => setLocationMenuActive(false)
const onPressBack = () => store.nav.tab.goBack() const onPressBack = () => store.nav.tab.goBack()
// const onPressForward = () => store.nav.tab.goForward() const onPressForward = () => store.nav.tab.goForward()
const onPressHome = () => store.nav.navigate('/') const onPressHome = () => store.nav.navigate('/')
const onPressMenu = () => setMainMenuActive(true) const onPressMenu = () => setMainMenuActive(true)
const onPressNotifications = () => store.nav.navigate('/notifications') const onPressTabs = () => setTabsSelectorActive(true)
const onPressTabs = () => setTabsSelectorActive(true) //store.shell.openModal(new TabsSelectorModel())
const onLongPressBack = () => createBackMenu(store.nav.tab) const onLongPressBack = () => createBackMenu(store.nav.tab)
// const onLongPressForward = () => createForwardMenu(store.nav.tab) const onLongPressForward = () => createForwardMenu(store.nav.tab)
const goBack = () => store.nav.tab.goBack() const goBack = () => store.nav.tab.goBack()
const swipeGesture = Gesture.Pan() const swipeGesture = Gesture.Pan()
@ -195,26 +194,23 @@ export const MobileShell: React.FC = observer(() => {
</GestureDetector> </GestureDetector>
</SafeAreaView> </SafeAreaView>
<View style={styles.bottomBar}> <View style={styles.bottomBar}>
<Btn icon="house" onPress={onPressHome} />
<Btn <Btn
icon="angle-left" icon="angle-left"
inactive={!store.nav.tab.canGoBack} inactive={!store.nav.tab.canGoBack}
onPress={onPressBack} onPress={onPressBack}
onLongPress={onLongPressBack} onLongPress={onLongPressBack}
/> />
{ <Btn
undefined /*<Btn icon="menu"
onPress={onPressMenu}
notificationCount={store.me.notificationCount}
/>
<Btn
icon="angle-right" icon="angle-right"
inactive={!store.nav.tab.canGoForward} inactive={!store.nav.tab.canGoForward}
onPress={onPressForward} onPress={onPressForward}
onLongPress={onLongPressForward} onLongPress={onLongPressForward}
/>*/
}
<Btn icon="house" onPress={onPressHome} />
<Btn icon="menu" onPress={onPressMenu} />
<Btn
icon={['far', 'bell']}
onPress={onPressNotifications}
notificationCount={store.me.notificationCount}
/> />
<Btn icon={['far', 'clone']} onPress={onPressTabs} /> <Btn icon={['far', 'clone']} onPress={onPressTabs} />
</View> </View>
@ -368,11 +364,12 @@ const styles = StyleSheet.create({
}, },
ctrlCount: { ctrlCount: {
position: 'absolute', position: 'absolute',
left: 46, left: 52,
top: 10, top: 10,
backgroundColor: colors.pink3, backgroundColor: colors.red3,
paddingHorizontal: 3, paddingHorizontal: 4,
borderRadius: 3, paddingBottom: 1,
borderRadius: 8,
}, },
ctrlCountLabel: { ctrlCountLabel: {
fontSize: 12, fontSize: 12,