File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,12 @@ import { RecoilRoot } from 'recoil';
8
8
import { SnackbarProvider } from 'notistack' ;
9
9
import Zoom from '@mui/material/Zoom' ;
10
10
import dayjs from 'dayjs' ;
11
+ import relativeTime from 'dayjs/plugin/relativeTime' ;
11
12
import 'dayjs/locale/zh-cn' ;
12
13
import App from './app' ;
13
14
14
15
dayjs . locale ( 'zh-cn' ) ;
16
+ dayjs . extend ( relativeTime ) ;
15
17
16
18
// 某些第三方模块(react-pin-input)大量打印 debug 日志
17
19
if ( process . env . NODE_ENV === 'production' ) {
Original file line number Diff line number Diff line change @@ -20,14 +20,11 @@ import Typography from '@mui/material/Typography';
20
20
import Chip from '@mui/material/Chip' ;
21
21
import { useSnackbar } from 'notistack' ;
22
22
import dayjs from 'dayjs' ;
23
- import relativeTime from 'dayjs/plugin/relativeTime' ;
24
23
import SearchInput from '~/comp/search-input' ;
25
24
import Markdown from '~/comp/markdown' ;
26
25
import titleState from "~/state/title" ;
27
26
import { post , put } from '~/rest' ;
28
27
29
- dayjs . extend ( relativeTime ) ;
30
-
31
28
export default function Event ( ) {
32
29
const { enqueueSnackbar } = useSnackbar ( ) ;
33
30
const setTitle = useSetRecoilState ( titleState ) ;
Original file line number Diff line number Diff line change @@ -153,7 +153,8 @@ export default function List() {
153
153
< TableCell align = 'center' > 姓名</ TableCell >
154
154
< TableCell align = 'center' > 访问控制</ TableCell >
155
155
< TableCell align = 'center' > 创建时间</ TableCell >
156
- < TableCell align = 'center' > 登录时间 / 次数</ TableCell >
156
+ < TableCell align = 'center' > 最后登录时间</ TableCell >
157
+ < TableCell align = 'center' > 登录次数</ TableCell >
157
158
< TableCell as = 'td' align = 'right' colSpan = { 2 } padding = 'checkbox' />
158
159
</ TableRow >
159
160
</ TableHead >
@@ -172,12 +173,9 @@ export default function List() {
172
173
< Typography variant = 'body2' > { u . acl_name } </ Typography >
173
174
}
174
175
</ TableCell >
175
- < TableCell align = "center" >
176
- { dayjs ( u . create_at ) . format ( 'YY-MM-DD HH:mm:ss' ) }
177
- </ TableCell >
178
- < TableCell align = "center" >
179
- { dayjs ( u . signin_at ) . format ( 'YY-MM-DD HH:mm:ss' ) } / { u . n_signin }
180
- </ TableCell >
176
+ < TableCell align = "center" > { dayjs ( u . create_at ) . fromNow ( ) } </ TableCell >
177
+ < TableCell align = "center" > { dayjs ( u . signin_at ) . fromNow ( ) } </ TableCell >
178
+ < TableCell align = "center" > { u . n_signin } </ TableCell >
181
179
< TableCell align = "right" padding = 'none' >
182
180
{ u . deleted &&
183
181
< RemoveCircleOutlineIcon color = 'error' fontSize = 'small'
You can’t perform that action at this time.
0 commit comments