mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-03-02 03:50:40 +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
c37f3cc065
@ -32,3 +32,14 @@
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.custom-step::after {
|
||||||
|
content: attr(data-subtitle);
|
||||||
|
position: absolute;
|
||||||
|
top: calc(100% + 4px);
|
||||||
|
left: 30%;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #A2A9B0;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
@ -13,37 +13,47 @@ const FormStepper = ({ activeStep, changeActiveStep }: FormStepperProps) => {
|
|||||||
nonLinear={true}
|
nonLinear={true}
|
||||||
styleConfig={stepStyle}
|
styleConfig={stepStyle}
|
||||||
connectorStyleConfig={customConnectorStyle}
|
connectorStyleConfig={customConnectorStyle}
|
||||||
style={{ fontSize: '14px', zIndex: 999, width: '100%', padding: 0, marginBottom: '1rem' }}
|
style={{ fontSize: '14px', zIndex: 999, width: '100%', padding: 0, marginBottom: '2rem' }}
|
||||||
>
|
>
|
||||||
<Step
|
<Step
|
||||||
className="custom-step"
|
|
||||||
label={'Overview'}
|
label={'Overview'}
|
||||||
|
className="custom-step"
|
||||||
onClick={() => changeActiveStep(0)}
|
onClick={() => changeActiveStep(0)}
|
||||||
completed={activeStep >= 0}
|
completed={activeStep >= 0}
|
||||||
|
data-subtitle="Get Started"
|
||||||
|
data-step="Overview"
|
||||||
/>
|
/>
|
||||||
<Step
|
<Step
|
||||||
className="custom-step"
|
|
||||||
label="Advicsories"
|
label="Advicsories"
|
||||||
|
className="custom-step"
|
||||||
onClick={() => changeActiveStep(1)}
|
onClick={() => changeActiveStep(1)}
|
||||||
completed={activeStep > 0}
|
completed={activeStep > 0}
|
||||||
|
data-subtitle="Understand your Duties"
|
||||||
|
data-step="Advicsories"
|
||||||
/>
|
/>
|
||||||
<Step
|
<Step
|
||||||
label="Validator Setup"
|
label="Validator Setup"
|
||||||
className="custom-step"
|
className="custom-step"
|
||||||
onClick={() => changeActiveStep(2)}
|
onClick={() => changeActiveStep(2)}
|
||||||
completed={activeStep > 1}
|
completed={activeStep > 1}
|
||||||
|
data-subtitle="Clients, Nodes & Validators"
|
||||||
|
data-step="Validator Setup"
|
||||||
/>
|
/>
|
||||||
<Step
|
<Step
|
||||||
label="Key Generation"
|
label="Key Generation"
|
||||||
className="custom-step"
|
className="custom-step"
|
||||||
onClick={() => changeActiveStep(3)}
|
onClick={() => changeActiveStep(3)}
|
||||||
completed={activeStep > 2}
|
completed={activeStep > 2}
|
||||||
|
data-subtitle="Secure your Keypairs"
|
||||||
|
data-step="Key Generation"
|
||||||
/>
|
/>
|
||||||
<Step
|
<Step
|
||||||
label="Activation"
|
label="Activation"
|
||||||
className="custom-step"
|
className="custom-step"
|
||||||
onClick={() => changeActiveStep(4)}
|
onClick={() => changeActiveStep(4)}
|
||||||
completed={activeStep > 3}
|
completed={activeStep > 3}
|
||||||
|
data-subtitle="Complete Setup"
|
||||||
|
data-step="Activation"
|
||||||
/>
|
/>
|
||||||
</Stepper>
|
</Stepper>
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { XStack } from 'tamagui'
|
import { XStack } from 'tamagui'
|
||||||
import SyncCard from './SyncCard'
|
import KeyGenerationSyncCard from './KeyGenerationSyncCard'
|
||||||
import KeyGenerationTitle from './KeyGenerationTitle'
|
import KeyGenerationTitle from './KeyGenerationTitle'
|
||||||
|
|
||||||
const KeyGenerationHeader = () => {
|
const KeyGenerationHeader = () => {
|
||||||
@ -7,8 +7,18 @@ const KeyGenerationHeader = () => {
|
|||||||
<XStack style={{ width: '100%', alignItems: 'center', justifyContent: 'space-between' }}>
|
<XStack style={{ width: '100%', alignItems: 'center', justifyContent: 'space-between' }}>
|
||||||
<KeyGenerationTitle />
|
<KeyGenerationTitle />
|
||||||
<XStack space={'$2'}>
|
<XStack space={'$2'}>
|
||||||
<SyncCard synced={123.524} total={172.503} title="Execution Sync Status" />
|
<KeyGenerationSyncCard
|
||||||
<SyncCard synced={123.524} total={172.503} title="Consensus Sync Status" />
|
synced={123.524}
|
||||||
|
total={172.503}
|
||||||
|
title="Execution Sync Status"
|
||||||
|
color="#2a4af5"
|
||||||
|
/>
|
||||||
|
<KeyGenerationSyncCard
|
||||||
|
synced={123.524}
|
||||||
|
total={172.503}
|
||||||
|
title="Consensus Sync Status"
|
||||||
|
color="#ff6161"
|
||||||
|
/>
|
||||||
</XStack>
|
</XStack>
|
||||||
</XStack>
|
</XStack>
|
||||||
)
|
)
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import type { Meta, StoryObj } from '@storybook/react'
|
import type { Meta, StoryObj } from '@storybook/react'
|
||||||
|
|
||||||
import SyncCard from './SyncCard'
|
import KeyGenerationSyncCard from './KeyGenerationSyncCard'
|
||||||
|
|
||||||
const meta = {
|
const meta = {
|
||||||
title: 'ValidatorOnboarding/SyncCard',
|
title: 'ValidatorOnboarding/KeyGenerationSyncCard',
|
||||||
component: SyncCard,
|
component: KeyGenerationSyncCard,
|
||||||
parameters: {
|
parameters: {
|
||||||
layout: 'centered',
|
layout: 'centered',
|
||||||
},
|
},
|
||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
argTypes: {},
|
argTypes: {},
|
||||||
} satisfies Meta<typeof SyncCard>
|
} satisfies Meta<typeof KeyGenerationSyncCard>
|
||||||
|
|
||||||
export default meta
|
export default meta
|
||||||
type Story = StoryObj<typeof meta>
|
type Story = StoryObj<typeof meta>
|
||||||
@ -20,5 +20,6 @@ export const Page: Story = {
|
|||||||
synced: 123.524,
|
synced: 123.524,
|
||||||
total: 172.503,
|
total: 172.503,
|
||||||
title: 'Execution Sync Status',
|
title: 'Execution Sync Status',
|
||||||
|
color: '#2a4af5',
|
||||||
},
|
},
|
||||||
}
|
}
|
@ -3,30 +3,14 @@ import StandardGauge from '../../../components/Charts/StandardGauge'
|
|||||||
import { ClearIcon } from '@status-im/icons'
|
import { ClearIcon } from '@status-im/icons'
|
||||||
import { Text } from '@status-im/components'
|
import { Text } from '@status-im/components'
|
||||||
|
|
||||||
type SyncCardProps = {
|
type KeyGenerationSyncCardProps = {
|
||||||
synced: number
|
synced: number
|
||||||
total: number
|
total: number
|
||||||
title: string
|
title: string
|
||||||
|
color: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const SyncCard = ({ synced, total, title }: SyncCardProps) => {
|
const KeyGenerationSyncCard = ({ synced, total, title, color }: KeyGenerationSyncCardProps) => {
|
||||||
const data = () => {
|
|
||||||
return [
|
|
||||||
{
|
|
||||||
id: 'storage',
|
|
||||||
label: 'Used',
|
|
||||||
value: synced,
|
|
||||||
color: '#2a4af5',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'storage',
|
|
||||||
label: 'Free',
|
|
||||||
value: total - synced || 1,
|
|
||||||
color: '#E7EAEE',
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<XStack
|
<XStack
|
||||||
space={'$2'}
|
space={'$2'}
|
||||||
@ -39,7 +23,22 @@ const SyncCard = ({ synced, total, title }: SyncCardProps) => {
|
|||||||
width: '35px',
|
width: '35px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<StandardGauge data={data()} />
|
<StandardGauge
|
||||||
|
data={[
|
||||||
|
{
|
||||||
|
id: title,
|
||||||
|
label: title,
|
||||||
|
value: synced,
|
||||||
|
color: color,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'free',
|
||||||
|
label: 'free',
|
||||||
|
value: total - synced || 1,
|
||||||
|
color: '#E7EAEE',
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<YStack>
|
<YStack>
|
||||||
<Text size={11} color="#84888e" weight={'semibold'}>
|
<Text size={11} color="#84888e" weight={'semibold'}>
|
||||||
@ -49,9 +48,9 @@ const SyncCard = ({ synced, total, title }: SyncCardProps) => {
|
|||||||
{synced} / {total}
|
{synced} / {total}
|
||||||
</Text>
|
</Text>
|
||||||
</YStack>
|
</YStack>
|
||||||
<ClearIcon size={20} />
|
<ClearIcon size={20} color="#A1ABBD" />
|
||||||
</XStack>
|
</XStack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default SyncCard
|
export default KeyGenerationSyncCard
|
Loading…
x
Reference in New Issue
Block a user