@samitouri / QOSami-HFS / commits / 0d965e26

admin/monitoring: show-less after show-more

Massimo Melina committed Mar 18, 2024 at 13:58 UTC 0d965e26ca379f50886472303eaca34354892d90
1 file changed +2 -2
admin/src/MonitorPage.ts
+2 -2
@@ -3,7 +3,7 @@
3 import _ from "lodash"
4 import { createElement as h, useMemo, Fragment, useState } from "react"
5 import { apiCall, useApiEvents, useApiEx, useApiList } from "./api"
6 -import { LinkOff, Lock, Block, FolderZip, Upload, Download, ChevronRight } from '@mui/icons-material'
6 +import { LinkOff, Lock, Block, FolderZip, Upload, Download, ChevronRight, ChevronLeft } from '@mui/icons-material'
7 import { Box, Chip, ChipProps } from '@mui/material'
8 import { DataTable } from './DataTable'
9 import { formatBytes, ipForUrl, manipulateConfig, CFG, formatSpeed, with_, createDurationFormatter, formatTimestamp,
@@ -45,7 +45,7 @@ function MoreInfo() {
45 (allInfo || sm) && pair('got', { render: formatBytes, minWidth: '4em' }),
46 pair('outSpeed', { label: "Output speed", render: formatSpeedK }),
47 (allInfo || md) && pair('inSpeed', { label: "Input speed", render: formatSpeedK }),
48 - !xl && !allInfo && h(IconBtn, { size: 'small', icon: ChevronRight, title: "Show more", onClick: () => setAllInfo(true) }),
48 + !xl && h(IconBtn, { size: 'small', icon: allInfo ? ChevronLeft : ChevronRight, title: "Show more", onClick: () => setAllInfo(x => !x) }),
49 )
50
51 type Color = ChipProps['color']