增加环境变量更新时间 (#887)

This commit is contained in:
Miniers 2021-11-12 21:55:03 +08:00 committed by GitHub
parent bee1f9968e
commit 3b3dd4c26d

View File

@ -136,6 +136,29 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
key: 'remarks',
align: 'center' as const,
},
{
title: '更新时间',
dataIndex: 'timestamp',
key: 'timestamp',
align: 'center' as const,
width: 164,
ellipsis: {
showTitle: false,
},
render: (text: string, record: any) => {
const language = navigator.language || navigator.languages[0];
const date = new Date(text)
.toLocaleString(language, {
hour12: false,
})
.replace(' 24:', ' 00:')
return (
<Tooltip placement="topLeft" title={date}>
<span>{date}</span>
</Tooltip>
);
},
},
{
title: '状态',
key: 'status',