From 9bd05e1e73a238353e35d39a0702772b53b19f56 Mon Sep 17 00:00:00 2001 From: orangecoding Date: Sat, 1 Nov 2025 10:08:13 +0100 Subject: [PATCH] improving processing times label and hide when screen width is too low --- ui/src/views/jobs/ProcessingTimes.jsx | 54 ++++++++++++++++++++++----- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/ui/src/views/jobs/ProcessingTimes.jsx b/ui/src/views/jobs/ProcessingTimes.jsx index 7332576..bc0fd36 100644 --- a/ui/src/views/jobs/ProcessingTimes.jsx +++ b/ui/src/views/jobs/ProcessingTimes.jsx @@ -1,16 +1,32 @@ import React from 'react'; import { format } from '../../services/time/timeService'; import { Button, Card, Col, Row, Toast } from '@douyinfe/semi-ui'; -import { IconPlayCircle } from '@douyinfe/semi-icons'; +import { + IconClock, + IconDoubleChevronLeft, + IconDoubleChevronRight, + IconPlayCircle, + IconSearch, +} from '@douyinfe/semi-icons'; import { xhrPost } from '../../services/xhr.js'; import './ProsessingTimes.less'; +import { useScreenWidth } from '../../hooks/screenWidth.js'; -function InfoCard({ title, value }) { +function InfoCard({ title, value, icon }) { + const { Meta } = Card; return ( - - {value} - +
+ +
); } @@ -18,24 +34,44 @@ export default function ProcessingTimes({ processingTimes = {} }) { if (Object.keys(processingTimes).length === 0) { return null; } + const width = useScreenWidth(); + const invisible = width <= 1180; + + if (invisible) { + return null; + } + return ( - + } + /> {processingTimes.lastRun && ( <> - + } + value={format(processingTimes.lastRun)} + /> - + } + value={format(processingTimes.lastRun + processingTimes.interval * 60000)} + /> )} } value={