mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-03 07:03:30 +00:00
format
This commit is contained in:
parent
287ede45f6
commit
5672514787
@ -40,7 +40,7 @@ const CPUCard = ({ load }: CPUCardProps) => {
|
|||||||
const message = currentLoad < 80 ? 'Good' : 'Poor'
|
const message = currentLoad < 80 ? 'Good' : 'Poor'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardCardWrapper padding="0" height="156px" minWidth="200px" >
|
<DashboardCardWrapper padding="0" height="156px" minWidth="200px">
|
||||||
<YStack
|
<YStack
|
||||||
style={{
|
style={{
|
||||||
borderRadius: '16px',
|
borderRadius: '16px',
|
||||||
|
@ -9,7 +9,7 @@ const ConsensusUptimeCard = () => {
|
|||||||
const monthlyActivity = [3, 0, 5, 4, 6, 7, 8, 9, 10, 1, 2, 3]
|
const monthlyActivity = [3, 0, 5, 4, 6, 7, 8, 9, 10, 1, 2, 3]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardCardWrapper >
|
<DashboardCardWrapper>
|
||||||
<YStack space={'$3'}>
|
<YStack space={'$3'}>
|
||||||
<YStack>
|
<YStack>
|
||||||
<Text size={15} weight={'semibold'}>
|
<Text size={15} weight={'semibold'}>
|
||||||
|
@ -66,7 +66,13 @@ const DashboardContent = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
<BasicInfoCards />
|
<BasicInfoCards />
|
||||||
{/* SECOND ROW ENDS HERE! */}
|
{/* SECOND ROW ENDS HERE! */}
|
||||||
{windowWidth < 1375 ? windowWidth < 850 ? DashboardContentLayoutPhone(windowWidth) : DashboardContentLayout(windowWidth) : (
|
{windowWidth < 1375 ? (
|
||||||
|
windowWidth < 850 ? (
|
||||||
|
DashboardContentLayoutPhone(windowWidth)
|
||||||
|
) : (
|
||||||
|
DashboardContentLayout(windowWidth)
|
||||||
|
)
|
||||||
|
) : (
|
||||||
<Stack
|
<Stack
|
||||||
style={{
|
style={{
|
||||||
display: 'grid',
|
display: 'grid',
|
||||||
@ -75,24 +81,20 @@ const DashboardContent = () => {
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<YStack >
|
<YStack>
|
||||||
|
<XStack>
|
||||||
<XStack >
|
|
||||||
|
|
||||||
<ConsensusUptimeCard />
|
<ConsensusUptimeCard />
|
||||||
<ExecutionUptime />
|
<ExecutionUptime />
|
||||||
</XStack>
|
</XStack>
|
||||||
|
|
||||||
<DeviceUptime />
|
<DeviceUptime />
|
||||||
</YStack>
|
</YStack>
|
||||||
<YStack space={'$4'} >
|
<YStack space={'$4'}>
|
||||||
<XStack space={'$4'} >
|
<XStack space={'$4'}>
|
||||||
|
|
||||||
<StorageCard maxStorage={100} storage={82} />
|
<StorageCard maxStorage={100} storage={82} />
|
||||||
<CPUCard load={[12, 31, 3, 2, 24, 98]} />
|
<CPUCard load={[12, 31, 3, 2, 24, 98]} />
|
||||||
</XStack>
|
</XStack>
|
||||||
<XStack space='$4'>
|
<XStack space="$4">
|
||||||
|
|
||||||
<MemoryCard currentMemory={[21, 33, 3, 42, 35]} maxMemory={50} />
|
<MemoryCard currentMemory={[21, 33, 3, 42, 35]} maxMemory={50} />
|
||||||
|
|
||||||
<NetworkCard
|
<NetworkCard
|
||||||
@ -107,36 +109,36 @@ const DashboardContent = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
const DashboardContentLayout = (windowWidth: number) => {
|
const DashboardContentLayout = (windowWidth: number) => {
|
||||||
return (<Stack
|
return (
|
||||||
style={{
|
<Stack
|
||||||
display: 'grid',
|
style={{
|
||||||
gridTemplateColumns: '1fr 1fr',
|
display: 'grid',
|
||||||
gap: '8px',
|
gridTemplateColumns: '1fr 1fr',
|
||||||
|
gap: '8px',
|
||||||
|
|
||||||
width: '101%',
|
width: '101%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<YStack>
|
<YStack>
|
||||||
|
<XStack>
|
||||||
|
<ConsensusUptimeCard />
|
||||||
|
<ExecutionUptime />
|
||||||
|
</XStack>
|
||||||
|
|
||||||
<XStack>
|
<DeviceUptime />
|
||||||
|
</YStack>
|
||||||
|
|
||||||
<ConsensusUptimeCard />
|
<StorageCard maxStorage={100} storage={82} />
|
||||||
<ExecutionUptime />
|
<CPUCard load={[12, 31, 3, 2, 24, 98]} />
|
||||||
</XStack>
|
|
||||||
|
|
||||||
<DeviceUptime />
|
<MemoryCard currentMemory={[21, 33, 3, 42, 35]} maxMemory={50} />
|
||||||
</YStack>
|
|
||||||
|
|
||||||
<StorageCard maxStorage={100} storage={82} />
|
<NetworkCard
|
||||||
<CPUCard load={[12, 31, 3, 2, 24, 98]} />
|
downloadRate={[12, 31, 22, 12, 23, 23, 90]}
|
||||||
|
uploadRate={[31, 22, 32, 132, 32, 45, 65]}
|
||||||
<MemoryCard currentMemory={[21, 33, 3, 42, 35]} maxMemory={50} />
|
/>
|
||||||
|
</Stack>
|
||||||
<NetworkCard
|
)
|
||||||
downloadRate={[12, 31, 22, 12, 23, 23, 90]}
|
|
||||||
uploadRate={[31, 22, 32, 132, 32, 45, 65]}
|
|
||||||
/>
|
|
||||||
</Stack>)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const DashboardContentLayoutPhone = (windowWidth: number) => {
|
const DashboardContentLayoutPhone = (windowWidth: number) => {
|
||||||
@ -150,14 +152,11 @@ const DashboardContentLayoutPhone = (windowWidth: number) => {
|
|||||||
width: '101%',
|
width: '101%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
<ConsensusUptimeCard />
|
<ConsensusUptimeCard />
|
||||||
<ExecutionUptime />
|
<ExecutionUptime />
|
||||||
|
|
||||||
<DeviceUptime />
|
<DeviceUptime />
|
||||||
|
|
||||||
|
|
||||||
<StorageCard maxStorage={100} storage={82} />
|
<StorageCard maxStorage={100} storage={82} />
|
||||||
<CPUCard load={[12, 31, 3, 2, 24, 98]} />
|
<CPUCard load={[12, 31, 3, 2, 24, 98]} />
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ const DeviceUptime = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardCardWrapper >
|
<DashboardCardWrapper>
|
||||||
<YStack space={'$3'}>
|
<YStack space={'$3'}>
|
||||||
<XStack justifyContent={'space-between'}>
|
<XStack justifyContent={'space-between'}>
|
||||||
<YStack>
|
<YStack>
|
||||||
|
@ -8,7 +8,7 @@ import DashboardCardWrapper from '../DashboardCardWrapper'
|
|||||||
const ExecutionUptime = () => {
|
const ExecutionUptime = () => {
|
||||||
const monthlyActivity = [3, 0, 5, 4, 6, 7, 0, 9, 10, 1, 2, 3]
|
const monthlyActivity = [3, 0, 5, 4, 6, 7, 0, 9, 10, 1, 2, 3]
|
||||||
return (
|
return (
|
||||||
<DashboardCardWrapper >
|
<DashboardCardWrapper>
|
||||||
<YStack space={'$3'} minHeight={'156px'} padding={'$3'}>
|
<YStack space={'$3'} minHeight={'156px'} padding={'$3'}>
|
||||||
<YStack>
|
<YStack>
|
||||||
<Text size={15} weight={'semibold'}>
|
<Text size={15} weight={'semibold'}>
|
||||||
|
@ -42,7 +42,7 @@ const MemoryCard = ({ currentMemory, maxMemory }: MemoryCardProps) => {
|
|||||||
const message = currentLoad < maxMemory ? 'Good' : 'Poor'
|
const message = currentLoad < maxMemory ? 'Good' : 'Poor'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardCardWrapper padding="0" height="156px" minWidth="200px" >
|
<DashboardCardWrapper padding="0" height="156px" minWidth="200px">
|
||||||
<YStack
|
<YStack
|
||||||
style={{
|
style={{
|
||||||
borderRadius: '16px',
|
borderRadius: '16px',
|
||||||
|
@ -48,7 +48,7 @@ const NetworkCard = ({ uploadRate, downloadRate }: NetworkCardProps) => {
|
|||||||
const message = currentLoad > 60 ? 'Good' : 'Poor'
|
const message = currentLoad > 60 ? 'Good' : 'Poor'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardCardWrapper padding="0" height="156px" minWidth="200px" >
|
<DashboardCardWrapper padding="0" height="156px" minWidth="200px">
|
||||||
<YStack
|
<YStack
|
||||||
style={{
|
style={{
|
||||||
borderRadius: '16px',
|
borderRadius: '16px',
|
||||||
|
@ -35,7 +35,7 @@ const StorageCard = ({ storage, maxStorage }: StorageCardProps) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DashboardCardWrapper padding="0" height="156px" minWidth="200px" >
|
<DashboardCardWrapper padding="0" height="156px" minWidth="200px">
|
||||||
<YStack
|
<YStack
|
||||||
style={{
|
style={{
|
||||||
borderRadius: '16px',
|
borderRadius: '16px',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user