From 584554a1d59cbe04b494b4577294963d4e2d570f Mon Sep 17 00:00:00 2001 From: Hristo Nedelkov Date: Tue, 15 Aug 2023 10:33:02 +0300 Subject: [PATCH] Implement cards --- public/icons/token.svg | 10 +++ public/icons/vector.svg | 3 + src/components/SyncStatusCardConsensus.tsx | 76 ++++++++++++++++++ src/components/SyncStatusCardExecution.tsx | 77 +++++++++++++++++++ .../DeviceHealthCheck/DeviceSyncStatus.tsx | 4 + 5 files changed, 170 insertions(+) create mode 100644 public/icons/token.svg create mode 100644 public/icons/vector.svg create mode 100644 src/components/SyncStatusCardConsensus.tsx create mode 100644 src/components/SyncStatusCardExecution.tsx diff --git a/public/icons/token.svg b/public/icons/token.svg new file mode 100644 index 00000000..cf171b59 --- /dev/null +++ b/public/icons/token.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/icons/vector.svg b/public/icons/vector.svg new file mode 100644 index 00000000..fb59ff83 --- /dev/null +++ b/public/icons/vector.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/components/SyncStatusCardConsensus.tsx b/src/components/SyncStatusCardConsensus.tsx new file mode 100644 index 00000000..056ae9bf --- /dev/null +++ b/src/components/SyncStatusCardConsensus.tsx @@ -0,0 +1,76 @@ +import IconText from './IconText' +import { Separator, XStack, YStack } from 'tamagui' +import StandardGauge from './StandardGauge' +import { Shadow, Text } from '@status-im/components' +import Icon from './Icon' +interface DeviceStorageHealthProps { + synced: number + total: number +} +const SyncStatusCardConsensus: React.FC = ({ synced, total }) => { + const message = synced === total ? 'Synced all data' : 'Syncing' + + const data = () => { + return [ + { + id: 'storage', + label: 'Used', + value: synced, + color: '#E95460', + }, + { + id: 'storage', + label: 'Free', + value: total - synced, + color: '#E7EAEE', + }, + ] + } + + return ( + + + +
+ +
+ + + Execution Client + + + +
+ + + + + {message} + + 123,424 / 170,000 + +
+
+ ) +} + +export default SyncStatusCardConsensus diff --git a/src/components/SyncStatusCardExecution.tsx b/src/components/SyncStatusCardExecution.tsx new file mode 100644 index 00000000..aa5eea80 --- /dev/null +++ b/src/components/SyncStatusCardExecution.tsx @@ -0,0 +1,77 @@ +import IconText from './IconText' +import { Paragraph, Separator, XStack, YStack } from 'tamagui' +import StandardGauge from './StandardGauge' +import { Shadow, Text } from '@status-im/components' +interface DeviceStorageHealthProps { + synced: number + total: number +} +const SyncStatusCardExecution: React.FC = ({ synced, total }) => { + const message = synced === total ? 'Synced all data' : 'Syncing' + + const data = () => { + return [ + { + id: 'storage', + label: 'Used', + value: synced, + color: '#E95460', + }, + { + id: 'storage', + label: 'Free', + value: total - synced, + color: '#E7EAEE', + }, + ] + } + + return ( + + + +
+ +
+ + + Execution Client + + + Geth + + +
+ + + + + {message} + + 123,424 / 170,000 + +
+
+ ) +} + +export default SyncStatusCardExecution diff --git a/src/pages/DeviceHealthCheck/DeviceSyncStatus.tsx b/src/pages/DeviceHealthCheck/DeviceSyncStatus.tsx index 7b3fbc9b..e639b2b5 100644 --- a/src/pages/DeviceHealthCheck/DeviceSyncStatus.tsx +++ b/src/pages/DeviceHealthCheck/DeviceSyncStatus.tsx @@ -3,6 +3,8 @@ import LayoutComponent from '../../components/LayoutComponent' import NimbusLogo from '../../components/NimbusLogo' import Titles from '../../components/Titles' import { Button } from '@status-im/components' +import SyncStatusCardExecution from '../../components/SyncStatusCardExecution' +import SyncStatusCardConsensus from '../../components/SyncStatusCardConsensus' const DeviceSyncStatus = () => { return ( @@ -34,6 +36,8 @@ const DeviceSyncStatusContent = () => { isAdvancedSettings={true} /> + +