Skip to content

Commit fee90ee

Browse files
committed
feat: enhance data usage column display and add nowrap to connected node column
- Added nowrap property to the connected node column for improved layout. - Updated data usage column to display strategy and lifetime used traffic more clearly, including conditional formatting for total used traffic.
1 parent 9decf70 commit fee90ee

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

src/entities/dashboard/users/ui/table-columns/connected-node/connected-node.column.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export function ConnectedNodeColumnEntity(props: IProps) {
1414
flex: 1,
1515
minWidth: 0
1616
}}
17+
wrap="nowrap"
1718
>
1819
{lastConnectedNode?.countryCode && lastConnectedNode.countryCode !== 'XX' && (
1920
<ReactCountryFlag

src/entities/dashboard/users/ui/table-columns/data-usage/data-usage.column.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,25 +29,32 @@ export function DataUsageColumnEntity(props: IProps) {
2929
<Group justify="space-between">
3030
<Text c="red.5" fw={700} fz="xs">
3131
{usedTrafficPercentage.toFixed(2)}%
32+
<Text c="dimmed" component="span" fz="xs">
33+
{' '}
34+
{strategy}
35+
</Text>
3236
</Text>
3337
<Text c="teal.5" fw={700} fz="xs">
38+
<Text c="dimmed" component="span" fw={550} fz="xs" size="xs">
39+
Σ {lifetimeUsedTraffic}
40+
</Text>{' '}
3441
{(100 - usedTrafficPercentage).toFixed(2)}%
3542
</Text>
3643
</Group>
3744
<Progress
3845
color={usedTrafficPercentage > 100 ? 'orange.7' : 'teal.9'}
3946
radius="xs"
4047
size="md"
41-
striped
4248
value={usedTrafficPercentage}
4349
/>
4450

4551
<Group gap="xs" justify="space-between" mt={2}>
46-
<Text c="dimmed" fw={'550'} size="xs">
47-
{totalUsedTraffic} {limitBytes === '0' ? '' : `/ ${limitBytes}`} {strategy}
52+
<Text c="dimmed" fw={550} size="xs">
53+
{totalUsedTraffic === '0' ? '0 GiB' : totalUsedTraffic}
4854
</Text>
49-
<Text c="dimmed" fw={'550'} size="xs">
50-
Σ {lifetimeUsedTraffic}
55+
56+
<Text c="dimmed" fw={550} size="xs">
57+
{limitBytes === '0' ? '∞' : `${limitBytes}`}
5158
</Text>
5259
</Group>
5360
</Box>

0 commit comments

Comments
 (0)