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

pull/61/head
lyc8503 2024-08-21 11:00:53 +08:00
parent 5b6fbdd68a
commit 79ea2fba2c
1 changed files with 2 additions and 1 deletions

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>
)}