fix #54: show date in popup and add touchscreen support

This commit is contained in:
lyc8503 committed 2024-08-21 11:08:01 +08:00
1 parent 5b6fbdd68a
commit 79ea2fba2c
1 file changed
+2 -1
+2 -1
View File
@@ -47,12 +47,13 @@ export default function DetailBar({
<Tooltip
multiline
key={i}
events={{ hover: true, focus: false, touch: true }}
label={
Number.isNaN(Number(dayPercent)) ? (
'No Data'
) : (
<>
<div>{dayPercent + '%'}</div>
<div>{dayPercent + '% at ' + new Date(dayStart * 1000).toLocaleDateString()}</div>
{dayDownTime > 0 && (
<div>{`Down for ${moment.preciseDiff(moment(0), moment(dayDownTime * 1000))}`}</div>
)}