Minor layout fixes

This commit is contained in:
Ilja 2022-02-15 13:22:26 +02:00
parent e43eab7b72
commit a9280ef124
4 changed files with 31 additions and 13 deletions

View File

@ -1,21 +1,18 @@
* { * {
box-sizing: border-box; box-sizing: border-box;
-ms-overflow-style: none;
scrollbar-width: none;
} }
body, ::-webkit-scrollbar {
html { display: none;
position: fixed;
height: calc(100vh - calc(100vh - 100%));
width: 100vw;
overflow: hidden;
} }
.routeTransition { .routeTransition {
width: 100%;
height: 100%;
display: flex; display: flex;
flex: 1; flex: 1;
flex-direction: column; flex-direction: column;
overflow: hidden;
} }
.container { .container {

View File

@ -36,7 +36,7 @@ export default function Layout({ children, initialized }: Props) {
justifyContent: initialized ? 'normal' : 'center', justifyContent: initialized ? 'normal' : 'center',
alignItems: initialized ? 'normal' : 'center', alignItems: initialized ? 'normal' : 'center',
borderRadius: 0, borderRadius: 0,
outline: 'none',
paddingBottom: 5, paddingBottom: 5,
'@xs': { '@xs': {
borderRadius: '$lg', borderRadius: '$lg',
@ -63,9 +63,11 @@ export default function Layout({ children, initialized }: Props) {
<Card.Footer <Card.Footer
css={{ css={{
height: '50px', height: '85px',
minHeight: '50px', minHeight: '85px',
position: 'sticky', position: 'sticky',
justifyContent: 'flex-end',
alignItems: 'flex-end',
bottom: 0, bottom: 0,
left: 0 left: 0
}} }}

View File

@ -1,16 +1,35 @@
import AccountCard from '@/components/AccountCard' import AccountCard from '@/components/AccountCard'
import PageHeader from '@/components/PageHeader' import PageHeader from '@/components/PageHeader'
import { EIP155_CHAINS } from '@/data/EIP155Data' import { EIP155_CHAINS, EIP155_TEST_CHAINS } from '@/data/EIP155Data'
import SettingsStore from '@/store/SettingsStore'
import { wallet } from '@/utils/WalletUtil' import { wallet } from '@/utils/WalletUtil'
import { Text } from '@nextui-org/react'
import { Fragment } from 'react' import { Fragment } from 'react'
import { useSnapshot } from 'valtio'
export default function HomePage() { export default function HomePage() {
const { testNets } = useSnapshot(SettingsStore.state)
return ( return (
<Fragment> <Fragment>
<PageHeader>Accounts</PageHeader> <PageHeader>Accounts</PageHeader>
<Text h4 css={{ marginBottom: '$5' }}>
Mainnets
</Text>
{Object.values(EIP155_CHAINS).map(({ name, logo, rgb }) => ( {Object.values(EIP155_CHAINS).map(({ name, logo, rgb }) => (
<AccountCard key={name} name={name} logo={logo} rgb={rgb} address={wallet.address} /> <AccountCard key={name} name={name} logo={logo} rgb={rgb} address={wallet.address} />
))} ))}
{testNets ? (
<Fragment>
<Text h4 css={{ marginBottom: '$5' }}>
Testnets
</Text>
{Object.values(EIP155_TEST_CHAINS).map(({ name, logo, rgb }) => (
<AccountCard key={name} name={name} logo={logo} rgb={rgb} address={wallet.address} />
))}
</Fragment>
) : null}
</Fragment> </Fragment>
) )
} }

View File

@ -17,7 +17,7 @@ export default function SettingsPage() {
<Text h4 css={{ marginBottom: '$5' }}> <Text h4 css={{ marginBottom: '$5' }}>
Mnemonic Mnemonic
</Text> </Text>
<Card bordered borderWeight="light"> <Card bordered borderWeight="light" css={{ minHeight: '75px' }}>
<Text css={{ fontFamily: '$mono' }}>{wallet.mnemonic.phrase}</Text> <Text css={{ fontFamily: '$mono' }}>{wallet.mnemonic.phrase}</Text>
</Card> </Card>