From eceef67d466007155718c93e6c2fe2b1afa53175 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Mon, 31 Oct 2022 12:17:58 -0500 Subject: WIP scene UIs --- src/view/shell/mobile/MainMenu.tsx | 92 +++++++++++++++++++++++++++++++------- 1 file changed, 76 insertions(+), 16 deletions(-) (limited to 'src/view/shell/mobile/MainMenu.tsx') diff --git a/src/view/shell/mobile/MainMenu.tsx b/src/view/shell/mobile/MainMenu.tsx index 18b68d5af..ee09d4aa0 100644 --- a/src/view/shell/mobile/MainMenu.tsx +++ b/src/view/shell/mobile/MainMenu.tsx @@ -2,6 +2,7 @@ import React, {useEffect} from 'react' import {observer} from 'mobx-react-lite' import { Image, + ImageSourcePropType, StyleSheet, SafeAreaView, Text, @@ -17,7 +18,7 @@ import Animated, { } from 'react-native-reanimated' import {IconProp} from '@fortawesome/fontawesome-svg-core' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' -import {HomeIcon} from '../../lib/icons' +import {HomeIcon, UserGroupIcon} from '../../lib/icons' import {useStores} from '../../../state' import {s, colors} from '../../lib/styles' import {DEF_AVATER} from '../../lib/assets' @@ -68,7 +69,9 @@ export const MainMenu = observer( onPress={() => onNavigate(url)}> {icon === 'home' ? ( - + + ) : icon === 'user-group' ? ( + ) : ( ) + const MenuItemImage = ({ + img, + label, + url, + count, + }: { + img: ImageSourcePropType + label: string + url: string + count?: number + }) => ( + onNavigate(url)}> + + {count ? ( + + {count} + + ) : undefined} + + {label} + + + ) + if (!active) { return } @@ -118,22 +147,41 @@ export const MainMenu = observer( /> - - + + - - - + + + Scenes + + + + + + + + + + + @@ -168,6 +216,13 @@ const styles = StyleSheet.create({ section: { paddingHorizontal: 10, }, + heading: { + fontSize: 21, + fontWeight: 'bold', + paddingHorizontal: 10, + paddingTop: 6, + paddingBottom: 12, + }, profile: { paddingVertical: 10, @@ -194,16 +249,20 @@ const styles = StyleSheet.create({ menuItems: { flexDirection: 'row', - marginTop: 10, - marginBottom: 10, + marginBottom: 20, }, menuItem: { - width: 80, + width: 82, alignItems: 'center', - marginRight: 6, }, menuItemMargin: { - marginRight: 14, + marginRight: 10, + }, + menuItemImg: { + borderRadius: 30, + width: 60, + height: 60, + marginBottom: 5, }, menuItemIconWrapper: { borderRadius: 6, @@ -219,6 +278,7 @@ const styles = StyleSheet.create({ }, menuItemLabel: { fontSize: 13, + textAlign: 'center', }, menuItemCount: { position: 'absolute', -- cgit 1.4.1