Skip to content

Commit f4a38f5

Browse files
committed
refactor: update icons and card styles in nodes metrics components
1 parent cefe304 commit f4a38f5

File tree

3 files changed

+11
-37
lines changed

3 files changed

+11
-37
lines changed

src/pages/dashboard/nodes-metrics/ui/components/nodes-metrics.page.component.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useTranslation } from 'react-i18next'
2-
import { PiChartLine } from 'react-icons/pi'
2+
import { PiSpeedometer } from 'react-icons/pi'
33

44
import { EditNodeByUuidModalWidget } from '@widgets/dashboard/nodes/edit-node-by-uuid-modal'
55
import { NodeMetricsWidget } from '@widgets/dashboard/nodes/nodes-metrics'
@@ -13,10 +13,7 @@ export default function NodesMetricsPageComponent(props: IProps) {
1313

1414
return (
1515
<Page title={t('constants.nodes-metrics')}>
16-
<PageHeaderShared
17-
icon={<PiChartLine size={24} />}
18-
title={t('constants.nodes-metrics')}
19-
/>
16+
<PageHeaderShared icon={<PiSpeedometer size={24} />} title="Metrics Overview" />
2017

2118
{isLoading ? <LoadingScreen height="80vh" /> : <NodeMetricsWidget />}
2219

src/widgets/dashboard/nodes/nodes-metrics/node-details-card.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,12 @@ export const NodeDetailsCard = memo(
171171

172172
<Grid align="flex-start" justify="flex-start">
173173
<Grid.Col span={{ base: 12, lg: 6 }}>
174-
<Card p="md" style={{ backgroundColor: 'rgba(16, 185, 129, 0.1)' }}>
174+
<Card
175+
p="md"
176+
style={{
177+
background: 'rgba(16, 185, 129, 0.1)'
178+
}}
179+
>
175180
<Group align="center" gap="xs" mb="xs" wrap="nowrap">
176181
<PiArrowDownDuotone
177182
color="var(--mantine-color-teal-4)"
@@ -270,7 +275,7 @@ export const NodeDetailsCard = memo(
270275
</Card>
271276
</Grid.Col>
272277
<Grid.Col span={{ base: 12, lg: 6 }}>
273-
<Card p="md" style={{ backgroundColor: 'rgba(59, 130, 246, 0.1)' }}>
278+
<Card p="md" style={{ background: 'rgba(59, 130, 246, 0.1)' }}>
274279
<Group align="center" gap="xs" mb="xs" wrap="nowrap">
275280
<PiArrowUpDuotone
276281
color="var(--mantine-color-blue-4)"

src/widgets/dashboard/nodes/nodes-metrics/node-metrics.widget.tsx

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,20 @@ import {
1111
SimpleGrid,
1212
Stack,
1313
Text,
14-
ThemeIcon,
15-
Title
14+
ThemeIcon
1615
} from '@mantine/core'
1716
import {
1817
PiGlobeSimple,
1918
PiInfo,
2019
PiProhibitDuotone,
2120
PiPulseDuotone,
22-
PiSpeedometer,
2321
PiUsersDuotone
2422
} from 'react-icons/pi'
2523
import { GetNodesMetricsCommand } from '@remnawave/backend-contract'
2624
import { VirtuosoMasonry } from '@virtuoso.dev/masonry'
27-
import { TbServer, TbServer2 } from 'react-icons/tb'
2825
import { memo, useCallback, useMemo } from 'react'
2926
import { useMediaQuery } from '@mantine/hooks'
27+
import { TbServer } from 'react-icons/tb'
3028

3129
import { MODALS, useModalsStoreOpenWithData } from '@entities/dashboard/modal-store'
3230
import { MetricCard } from '@shared/ui/metrics/metric-card'
@@ -208,23 +206,6 @@ export const NodeMetricsWidget = () => {
208206
</Paper>
209207

210208
<Box>
211-
<Group align="center" gap="md" mb="lg" wrap="nowrap">
212-
<ThemeIcon color="indigo" size="lg" variant="light">
213-
<PiSpeedometer size="24px" />
214-
</ThemeIcon>
215-
<Title
216-
c="white"
217-
order={2}
218-
style={{
219-
whiteSpace: 'nowrap',
220-
overflow: 'hidden',
221-
textOverflow: 'ellipsis'
222-
}}
223-
>
224-
Metrics Overview
225-
</Title>
226-
</Group>
227-
228209
<SimpleGrid cols={{ sm: 1, md: 2, lg: 4 }} spacing="md">
229210
<StatCard
230211
color="indigo"
@@ -258,15 +239,6 @@ export const NodeMetricsWidget = () => {
258239
</Box>
259240

260241
<Box>
261-
<Group align="center" gap="md" mb="lg">
262-
<ThemeIcon color="teal" size="lg" variant="light">
263-
<TbServer2 size="24px" />
264-
</ThemeIcon>
265-
<Title c="white" order={2}>
266-
Node Details
267-
</Title>
268-
</Group>
269-
270242
<VirtuosoMasonry
271243
columnCount={isMobile ? 1 : 2}
272244
data={nodeMetrics?.nodes}

0 commit comments

Comments
 (0)