mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-03 07:03:30 +00:00
Merge branch 'hn.validator-onboarding' of https://github.com/nimbus-gui/nimbus-gui into hn.validator-onboarding
This commit is contained in:
commit
037048af86
@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
/* LAYOUT RIGHT ELEMENT WITH IMAGE TAKING UP THE WHOLE HIGHT OF THE VIEWPORT */
|
/* LAYOUT RIGHT ELEMENT WITH IMAGE TAKING UP THE WHOLE HIGHT OF THE VIEWPORT */
|
||||||
.layout-right {
|
.layout-right {
|
||||||
flex: 0 0 44.6%;
|
flex: 0 0 45%;
|
||||||
max-width: 45%;
|
max-width: 45%;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
@ -1,23 +1,7 @@
|
|||||||
import { Button, Shadow } from '@status-im/components'
|
import { YStack } from 'tamagui'
|
||||||
import { Stack } from 'tamagui'
|
|
||||||
|
|
||||||
const Activation = () => {
|
const Activation = () => {
|
||||||
return (
|
return <YStack></YStack>
|
||||||
<>
|
|
||||||
<Shadow
|
|
||||||
variant="$1"
|
|
||||||
style={{
|
|
||||||
borderRadius: '16px',
|
|
||||||
border: 'none',
|
|
||||||
backgroundColor: '#fff',
|
|
||||||
padding: '16px 32px',
|
|
||||||
}}
|
|
||||||
></Shadow>
|
|
||||||
<Stack style={{ alignItems: 'end', width: '100%', marginTop: '16px' }}>
|
|
||||||
<Button>Continue</Button>
|
|
||||||
</Stack>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Activation
|
export default Activation
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { Button, Text } from '@status-im/components'
|
import { Text } from '@status-im/components'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import { Stack, XStack, YStack } from 'tamagui'
|
import { Stack, XStack, YStack } from 'tamagui'
|
||||||
import AdvisoriesContent from './AdvisoriesContent'
|
import AdvisoriesContent from './AdvisoriesContent'
|
||||||
import ValidatorBoxWrapper from '../ValidatorBoxWrapper/ValidatorBoxWrapper'
|
|
||||||
|
|
||||||
type AdvisoryTopicsType = {
|
type AdvisoryTopicsType = {
|
||||||
[key: string]: string
|
[key: string]: string
|
||||||
@ -24,41 +23,35 @@ const Advicsories = () => {
|
|||||||
const [selectedTitle, setSelectedTitle] = useState('Bad Behaviour')
|
const [selectedTitle, setSelectedTitle] = useState('Bad Behaviour')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<XStack
|
||||||
<ValidatorBoxWrapper>
|
justifyContent={'space-between'}
|
||||||
<XStack justifyContent={'space-between'} space={'$10'} style={{ padding: '16px 32px' }}>
|
className="layout-left"
|
||||||
<YStack justifyContent={'space-between'} space={'$2'}>
|
space={10}
|
||||||
<Stack marginBottom="$6">
|
style={{ padding: '16px 32px' }}
|
||||||
<Text size={27} weight={'semibold'}>
|
>
|
||||||
Advisories
|
<YStack>
|
||||||
</Text>
|
<Stack>
|
||||||
</Stack>
|
<Text size={27}>Advisories</Text>
|
||||||
{Object.keys(advisoryTopics).map((title, index) => (
|
</Stack>
|
||||||
<Stack
|
{Object.keys(advisoryTopics).map((title, index) => (
|
||||||
key={title}
|
<Stack key={title} onPress={() => setSelectedTitle(title)} style={{ cursor: 'pointer' }}>
|
||||||
onPress={() => setSelectedTitle(title)}
|
<Text
|
||||||
style={{ cursor: 'pointer' }}
|
size={15}
|
||||||
>
|
weight={selectedTitle === title && 'semibold'}
|
||||||
<Text
|
color={selectedTitle === title ? 'blue' : undefined}
|
||||||
size={15}
|
>
|
||||||
weight={selectedTitle === title && 'semibold'}
|
{unicodeNumbers[index]} {title}
|
||||||
color={selectedTitle === title ? 'blue' : undefined}
|
</Text>
|
||||||
>
|
</Stack>
|
||||||
{unicodeNumbers[index]} {title}
|
))}
|
||||||
</Text>
|
</YStack>
|
||||||
</Stack>
|
<YStack>
|
||||||
))}
|
<AdvisoriesContent
|
||||||
</YStack>
|
title={selectedTitle}
|
||||||
<AdvisoriesContent
|
content={advisoryTopics[selectedTitle]}
|
||||||
title={selectedTitle}
|
></AdvisoriesContent>
|
||||||
content={advisoryTopics[selectedTitle]}
|
</YStack>
|
||||||
></AdvisoriesContent>
|
</XStack>
|
||||||
</XStack>
|
|
||||||
</ValidatorBoxWrapper>
|
|
||||||
<Stack style={{ alignItems: 'end', width: '100%', marginTop: '16px' }}>
|
|
||||||
<Button>Continue</Button>
|
|
||||||
</Stack>
|
|
||||||
</>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,23 +1,7 @@
|
|||||||
import { Button, Shadow } from '@status-im/components'
|
import { YStack } from 'tamagui'
|
||||||
import { Stack } from 'tamagui'
|
|
||||||
|
|
||||||
const KeyGeneration = () => {
|
const KeyGeneration = () => {
|
||||||
return (
|
return <YStack space={'$2'}></YStack>
|
||||||
<>
|
|
||||||
<Shadow
|
|
||||||
variant="$1"
|
|
||||||
style={{
|
|
||||||
borderRadius: '16px',
|
|
||||||
border: 'none',
|
|
||||||
backgroundColor: '#fff',
|
|
||||||
padding: '16px 32px',
|
|
||||||
}}
|
|
||||||
></Shadow>
|
|
||||||
<Stack style={{ alignItems: 'end', width: '100%', marginTop: '16px' }}>
|
|
||||||
<Button>Continue</Button>
|
|
||||||
</Stack>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default KeyGeneration
|
export default KeyGeneration
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Stack, Text as TextTam, XStack, YStack } from 'tamagui'
|
import { Stack, Text as TextTam, XStack, YStack } from 'tamagui'
|
||||||
import { Button, Shadow, Text } from '@status-im/components'
|
import { Text } from '@status-im/components'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
import OverviewCard from './OverviewCard'
|
import OverviewCard from './OverviewCard'
|
||||||
import { ArrowRightIcon } from '@status-im/icons'
|
import { ArrowRightIcon } from '@status-im/icons'
|
||||||
@ -7,63 +7,49 @@ import { ArrowRightIcon } from '@status-im/icons'
|
|||||||
const Overview = () => {
|
const Overview = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Shadow
|
<YStack className="layout-left" space={'$5'}>
|
||||||
variant="$2"
|
<TextTam fontSize={27} fontWeight={'600'} style={{ marginBottom: '5px' }}>
|
||||||
style={{
|
Overview
|
||||||
borderRadius: '16px',
|
</TextTam>
|
||||||
border: 'none',
|
<Text size={27}>
|
||||||
flexDirection: 'row',
|
Becoming a validator is a big responsibility with important preparation steps. Only start
|
||||||
backgroundColor: '#fff',
|
the deposit process when youre ready.
|
||||||
zIndex: 999,
|
</Text>
|
||||||
}}
|
<Text size={15} color="#939BA1">
|
||||||
>
|
By running a validator, you'll be responsible for securing the network and receive
|
||||||
<YStack className="layout-left" space={'$5'} style={{ padding: '16px 32px' }}>
|
continuous payouts for actions that help the network reach consensus.
|
||||||
<TextTam fontSize={27} fontWeight={'600'} style={{ marginBottom: '5px' }}>
|
</Text>
|
||||||
Overview
|
<Text size={15} color="#939BA1">
|
||||||
</TextTam>
|
Since the successful transition to proof-of-stake via The Merge, Ethereum is fully secured
|
||||||
<Text size={27}>
|
by proof-of-stake validators. By running a validator, you'll be helping to secure the
|
||||||
Becoming a validator is a big responsibility with important preparation steps. Only
|
Ethereum network.
|
||||||
start the deposit process when youre ready.
|
</Text>
|
||||||
|
<Stack style={{ margin: '2% 0 4%', maxWidth: 'fit-content' }}>
|
||||||
|
<Text size={15}>
|
||||||
|
<XStack space={'$1'} style={{ alignItems: 'center' }}>
|
||||||
|
<Link style={{ color: '#2A4CF4' }} to={'/'}>
|
||||||
|
Learn more
|
||||||
|
</Link>
|
||||||
|
<ArrowRightIcon size={16} color="#2A4CF4" />
|
||||||
|
</XStack>
|
||||||
</Text>
|
</Text>
|
||||||
<Text size={15} color="#939BA1">
|
</Stack>
|
||||||
By running a validator, you'll be responsible for securing the network and receive
|
<XStack space={'$5'}>
|
||||||
continuous payouts for actions that help the network reach consensus.
|
<OverviewCard text={'Current APR'} value={'4.40%'} />
|
||||||
</Text>
|
<OverviewCard text={'Total ETH Staked'} value={'9,451,123'} />
|
||||||
<Text size={15} color="#939BA1">
|
<OverviewCard text={'Estimated Activation Time'} value={'32 Days'} />
|
||||||
Since the successful transition to proof-of-stake via The Merge, Ethereum is fully
|
<OverviewCard text={'Validator Queue'} value={'92603'} />
|
||||||
secured by proof-of-stake validators. By running a validator, you'll be helping to
|
</XStack>
|
||||||
secure the Ethereum network.
|
</YStack>
|
||||||
</Text>
|
<section className="layout-right">
|
||||||
<Stack style={{ margin: '2% 0 4%', maxWidth: 'fit-content' }}>
|
<div className="image-container">
|
||||||
<Text size={15}>
|
<img
|
||||||
<XStack space={'$1'} style={{ alignItems: 'center' }}>
|
src="./background-images/sync-status-background.png"
|
||||||
<Link style={{ color: '#2A4CF4' }} to={'/'}>
|
alt="background"
|
||||||
Learn more
|
className="background-img"
|
||||||
</Link>
|
/>
|
||||||
<ArrowRightIcon size={16} color="#2A4CF4" />
|
</div>
|
||||||
</XStack>
|
</section>
|
||||||
</Text>
|
|
||||||
</Stack>
|
|
||||||
<XStack space={'$5'}>
|
|
||||||
<OverviewCard text={'Current APR'} value={'4.40%'} />
|
|
||||||
<OverviewCard text={'Total ETH Staked'} value={'9,451,123'} />
|
|
||||||
<OverviewCard text={'Estimated Activation Time'} value={'32 Days'} />
|
|
||||||
<OverviewCard text={'Validator Queue'} value={'92603'} />
|
|
||||||
</XStack>
|
|
||||||
</YStack>
|
|
||||||
<section className="layout-right">
|
|
||||||
<div className="image-container">
|
|
||||||
<img
|
|
||||||
src="./background-images/sync-status-background.png"
|
|
||||||
alt="background"
|
|
||||||
className="background-img"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</Shadow>
|
|
||||||
<Stack style={{ alignItems: 'end', width: '100%', marginTop: '16px', zIndex: 999 }}>
|
|
||||||
<Button>Continue</Button>
|
|
||||||
</Stack>
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ const ValidatorBoxWrapper = ({ children }: ValidatorBoxWrapperProps) => {
|
|||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
backgroundColor: '#fff',
|
backgroundColor: '#fff',
|
||||||
zIndex: 999,
|
zIndex: 999,
|
||||||
|
padding: '16px 32px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { YStack } from 'tamagui'
|
import { Stack, YStack } from 'tamagui'
|
||||||
import FormStepper from './FormStepper/FormStepper'
|
import FormStepper from './FormStepper/FormStepper'
|
||||||
import Titles from '../../components/General/Titles'
|
import Titles from '../../components/General/Titles'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
@ -8,14 +8,26 @@ import Advicsories from './Advicsories/Advicsories'
|
|||||||
import ValidatorSetup from './ValidatorSetup/ValidatorSetup'
|
import ValidatorSetup from './ValidatorSetup/ValidatorSetup'
|
||||||
import Activation from './Activation/Activation'
|
import Activation from './Activation/Activation'
|
||||||
import './layoutGradient.css'
|
import './layoutGradient.css'
|
||||||
|
import ValidatorBoxWrapper from './ValidatorBoxWrapper/ValidatorBoxWrapper'
|
||||||
|
import { Button } from '@status-im/components'
|
||||||
|
import { useNavigate } from 'react-router-dom'
|
||||||
|
|
||||||
const ValidatorOnboarding = () => {
|
const ValidatorOnboarding = () => {
|
||||||
const [activeStep, setActiveStep] = useState(0)
|
const [activeStep, setActiveStep] = useState(0)
|
||||||
|
const navigate = useNavigate()
|
||||||
|
|
||||||
const changeActiveStep = (step: number) => {
|
const changeActiveStep = (step: number) => {
|
||||||
setActiveStep(step)
|
setActiveStep(step)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const continueHandler = () => {
|
||||||
|
if (activeStep < 4) {
|
||||||
|
setActiveStep(activeStep + 1)
|
||||||
|
} else {
|
||||||
|
navigate('/')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="gradient-wrapper">
|
<div className="gradient-wrapper">
|
||||||
<YStack
|
<YStack
|
||||||
@ -33,11 +45,18 @@ const ValidatorOnboarding = () => {
|
|||||||
subtitle="Earn Rewards for securing the Ethereum Network"
|
subtitle="Earn Rewards for securing the Ethereum Network"
|
||||||
/>
|
/>
|
||||||
<FormStepper activeStep={activeStep} changeActiveStep={changeActiveStep} />
|
<FormStepper activeStep={activeStep} changeActiveStep={changeActiveStep} />
|
||||||
{activeStep === 0 && <Overview />}
|
<ValidatorBoxWrapper>
|
||||||
{activeStep === 1 && <Advicsories />}
|
{activeStep === 0 && <Overview />}
|
||||||
{activeStep === 2 && <ValidatorSetup />}
|
{activeStep === 1 && <Advicsories />}
|
||||||
{activeStep === 3 && <KeyGeneration />}
|
{activeStep === 2 && <ValidatorSetup />}
|
||||||
{activeStep === 4 && <Activation />}
|
{activeStep === 3 && <KeyGeneration />}
|
||||||
|
{activeStep === 4 && <Activation />}
|
||||||
|
</ValidatorBoxWrapper>
|
||||||
|
<Stack style={{ alignItems: 'end', width: '100%', marginTop: '16px', zIndex: 999 }}>
|
||||||
|
<Button onPress={continueHandler}>
|
||||||
|
{activeStep < 4 ? 'Continue' : 'Continue to Dashboard'}
|
||||||
|
</Button>
|
||||||
|
</Stack>
|
||||||
</YStack>
|
</YStack>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
@ -1,23 +1,7 @@
|
|||||||
import { Button, Shadow } from '@status-im/components'
|
import { YStack } from 'tamagui'
|
||||||
import { Stack } from 'tamagui'
|
|
||||||
|
|
||||||
const ValidatorSetup = () => {
|
const ValidatorSetup = () => {
|
||||||
return (
|
return <YStack></YStack>
|
||||||
<>
|
|
||||||
<Shadow
|
|
||||||
variant="$1"
|
|
||||||
style={{
|
|
||||||
borderRadius: '16px',
|
|
||||||
border: 'none',
|
|
||||||
backgroundColor: '#fff',
|
|
||||||
padding: '16px 32px',
|
|
||||||
}}
|
|
||||||
></Shadow>
|
|
||||||
<Stack style={{ alignItems: 'end', width: '100%', marginTop: '16px' }}>
|
|
||||||
<Button>Continue</Button>
|
|
||||||
</Stack>
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ValidatorSetup
|
export default ValidatorSetup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user