From 6bd05aa6f10680b8f0e9ece8af5c2dcd0578df01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=A8=E9=9C=96=E9=93=83?= Date: Thu, 21 May 2026 23:23:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=20Tailwind=20CSS=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=20ResultView=20=E5=92=8C=20LiveClock=20=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/Timestamp/LiveClock.tsx | 31 +++++------ pages/Timestamp/ResultView.tsx | 94 ++++++++++++++++------------------ 2 files changed, 59 insertions(+), 66 deletions(-) diff --git a/pages/Timestamp/LiveClock.tsx b/pages/Timestamp/LiveClock.tsx index 38f4aff..c5cbb47 100644 --- a/pages/Timestamp/LiveClock.tsx +++ b/pages/Timestamp/LiveClock.tsx @@ -1,6 +1,5 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; -import { Box, IconButton, Tooltip, Typography } from '@mui/material'; -import AccessTimeIcon from '@mui/icons-material/AccessTime'; +import { Clock } from 'lucide-react'; import CopyButton from '@/components/CopyButton'; import { useSnackbar } from '@/components/GlobalSnackbar'; import type { UnitType } from '@/config/pageTheme'; @@ -38,29 +37,27 @@ const LiveClock = React.memo(({ unit, onUseNow }: LiveClockProps) => { }, [now, showMessage, t]); return ( - - +
+ {t('timestamp:currentTs')} - - + + {displayVal} - - - - - - + + - +
); }); diff --git a/pages/Timestamp/ResultView.tsx b/pages/Timestamp/ResultView.tsx index 9faa5b6..3065cde 100644 --- a/pages/Timestamp/ResultView.tsx +++ b/pages/Timestamp/ResultView.tsx @@ -1,5 +1,4 @@ import React, { useMemo } from 'react'; -import { Box, Fade, Stack, Typography } from '@mui/material'; import dayjs from '@/utils/dayjs'; import CopyButton from '@/components/CopyButton'; import type { UnitType } from '@/config/pageTheme'; @@ -38,60 +37,57 @@ const ResultView = React.memo( if (!result) { if (!showEmptyPlaceholder) return null; return ( - {t('timestamp:resultEmpty')} +
+ {t('timestamp:resultEmpty')} +
); } return ( - - - - {t('timestamp:resultLabel')} - +
+ + {t('timestamp:resultLabel')} + - - - {result} - - - +
+ + {result} + + +
- - {[ - { label: t('timestamp:relativeTime'), value: extraInfo?.relative }, - { label: t('timestamp:iso8601'), value: extraInfo?.iso }, - { label: t('timestamp:utcTime'), value: extraInfo?.utc }, - ].map((item) => ( - - - {item.label} - - - - {item.value} - - {item.value && ( - - )} - - - ))} - - - +
+ {[ + { label: t('timestamp:relativeTime'), value: extraInfo?.relative }, + { label: t('timestamp:iso8601'), value: extraInfo?.iso }, + { label: t('timestamp:utcTime'), value: extraInfo?.utc }, + ].map((item) => ( +
+ + {item.label} + +
+ + {item.value} + + {item.value && ( + + )} +
+
+ ))} +
+
); }, );