Display date instead of timestamp at admin panel
This commit is contained in:
parent
0d4a187bed
commit
1a76f8d5f3
|
@ -31,8 +31,8 @@ const type = {
|
|||
<td>{type[token.type] ?? `Other`}</td>
|
||||
<td>{token.username}</td>
|
||||
<td>{token.entropy}</td>
|
||||
<td>{token.createdAt.getTime()}</td>
|
||||
<td>{token.expiresAt?.getTime() ?? "null"}</td>
|
||||
<td>{token.createdAt.toISOString().slice(0, 19).replace(/-/g, "/").replace("T", " ")}</td>
|
||||
<td>{token.expiresAt?.toISOString().slice(0, 19).replace(/-/g, "/").replace("T", " ") ?? "null"}</td>
|
||||
<td>{token.createdFrom}</td>
|
||||
<td>{token.expiresAt !== null && Date.now() > token.expiresAt.getTime() ? <span style="color: red;">Expired {Math.floor((Date.now() - token.expiresAt.getTime()) / 1000 / 60)} minutes ago</span> : Date.now() < token.createdAt.getTime() ? <span style="color: cyan;">TimeTravelException (check in {Math.floor((token.createdAt.getTime() - Date.now()) / 1000 / 60)} minutes)</span> : <span style="color: lime;">Valid for{token.expiresAt === null ? "ever" : ` ${Math.floor((token.expiresAt.getTime() - Date.now()) / 1000 / 60)} minutes`}</span>}</td>
|
||||
</tr>)}
|
||||
|
|
Loading…
Reference in New Issue