change display format of the container uptime (#3706)

* change display format of the container uptime

Display `day, hour, min` if days is more than 0, otherwise default to existing `hour, min, sec`. Removes pads to make it more clean in this new format.

* clean the return
This commit is contained in:
Alex 2021-10-25 00:41:01 +03:00 committed by GitHub
parent c4ab318d5a
commit 4dca4f0aa9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View file

@ -92,7 +92,7 @@ const ServerDetailsBlock = () => {
/>
 {!status ? 'Connecting...' : (isInstalling ? 'Installing' : (isTransferring) ? 'Transferring' : status)}
{stats.uptime > 0 &&
<span css={tw`ml-2`}>
<span css={tw`ml-2 lowercase`}>
(<UptimeDuration uptime={stats.uptime / 1000}/>)
</span>
}