From bbc35f63e848a1f5918ad942ed3a81861ac2093f Mon Sep 17 00:00:00 2001 From: Zlatko Fedor Date: Wed, 19 Jan 2022 18:13:46 +0100 Subject: [PATCH] updated welcome page and added buttons for action --- packages/core/src/components/Card/Card.tsx | 16 ++- .../gui/src/components/app/AppSelectMode.tsx | 100 ++++++++++++------ 2 files changed, 80 insertions(+), 36 deletions(-) diff --git a/packages/core/src/components/Card/Card.tsx b/packages/core/src/components/Card/Card.tsx index 54c957d9cd..1db8926bd5 100644 --- a/packages/core/src/components/Card/Card.tsx +++ b/packages/core/src/components/Card/Card.tsx @@ -22,6 +22,14 @@ const StyledCardMaterial = styled(({ cursor, opacity, clickable, fullHeight, ... height: ${({ fullHeight }) => fullHeight ? '100%': 'auto'}; `; +const StyledCardContent = styled(({ fullHeight, ...rest }) => ( + +))` + display: flex; + flex-direction: column; + height: ${({ fullHeight }) => fullHeight ? '100%': 'auto'}; +`; + type Props = { children?: ReactNode; title?: ReactNode; @@ -65,9 +73,9 @@ export default function Card(props: Props) { )} - - - + + + {children} {actions && ( @@ -76,7 +84,7 @@ export default function Card(props: Props) { )} - + ); } diff --git a/packages/gui/src/components/app/AppSelectMode.tsx b/packages/gui/src/components/app/AppSelectMode.tsx index 78e17a676e..f25c0dcd1d 100644 --- a/packages/gui/src/components/app/AppSelectMode.tsx +++ b/packages/gui/src/components/app/AppSelectMode.tsx @@ -1,11 +1,12 @@ import React from 'react'; import { Trans } from '@lingui/macro'; import styled from 'styled-components'; -import { Flex, Logo, Card, useMode, Mode, Tooltip } from '@chia/core'; +import { Button, Flex, Logo, Card, useMode, Mode, Tooltip } from '@chia/core'; import { AccountBalanceWallet as AccountBalanceWalletIcon, Eco as EcoIcon, Settings as SettingsIcon, + Check as CheckIcon, } from '@material-ui/icons'; import { Box, Typography, Container, Grid } from '@material-ui/core'; @@ -14,7 +15,11 @@ const StyledSettingsIcon = styled(SettingsIcon)` `; const StyledCardContent = styled(Box)` - padding: 3rem 0rem; + display: flex; + padding: 0.5rem 0rem; + flex-direction: column; + height: 100%; + flex-grow: 1; `; const StyledContainer = styled(Container)` @@ -54,24 +59,39 @@ export default function AppSelectMode() { handleModeChange(Mode.WALLET)} fullHeight> - - - - - Wallet Mode - + + + - - - Store and Send XCH - - - Manage CAT tokens - - - Trade tokens + + Wallet Mode + + + + + + Store and Send XCH + + + + + + Manage CAT tokens + + + + + + Trade tokens + + + + + @@ -79,27 +99,43 @@ export default function AppSelectMode() { handleModeChange(Mode.FARMING)} fullHeight> - - + + + - - Farming Mode - - - - - Wallet Mode + + Farming Mode + + + + + + + Wallet Mode + + + + - - Create & Manage plots - - - Join farming pools - + + + + Create & Manage plots + + + + + + Join farming pools + + + +