| @@ -28,6 +28,7 @@ account_with_role_fields = { | |||
| 'avatar': fields.String, | |||
| 'email': fields.String, | |||
| 'last_login_at': TimestampField, | |||
| 'last_active_at': TimestampField, | |||
| 'created_at': TimestampField, | |||
| 'role': fields.String, | |||
| 'status': fields.String, | |||
| @@ -105,7 +105,7 @@ const MembersPage = () => { | |||
| <div className='text-xs text-gray-500 leading-[18px]'>{account.email}</div> | |||
| </div> | |||
| </div> | |||
| <div className='shrink-0 flex items-center w-[104px] py-2 text-[13px] text-gray-700'>{dayjs(Number((account.last_login_at || account.created_at)) * 1000).locale(locale === 'zh-Hans' ? 'zh-cn' : 'en').fromNow()}</div> | |||
| <div className='shrink-0 flex items-center w-[104px] py-2 text-[13px] text-gray-700'>{dayjs(Number((account.last_active_at || account.created_at)) * 1000).locale(locale === 'zh-Hans' ? 'zh-cn' : 'en').fromNow()}</div> | |||
| <div className='shrink-0 w-[96px] flex items-center'> | |||
| { | |||
| (owner && account.role !== 'owner') | |||
| @@ -27,6 +27,7 @@ export type UserProfileResponse = { | |||
| interface_theme?: string | |||
| timezone?: string | |||
| last_login_at?: string | |||
| last_active_at?: string | |||
| last_login_ip?: string | |||
| created_at?: string | |||
| } | |||
| @@ -61,7 +62,7 @@ export type TenantInfoResponse = { | |||
| trial_end_reason: null | 'trial_exceeded' | 'using_custom' | |||
| } | |||
| export type Member = Pick<UserProfileResponse, 'id' | 'name' | 'email' | 'last_login_at' | 'created_at'> & { | |||
| export type Member = Pick<UserProfileResponse, 'id' | 'name' | 'email' | 'last_login_at' | 'last_login_at' | 'created_at'> & { | |||
| avatar: string | |||
| status: 'pending' | 'active' | 'banned' | 'closed' | |||
| role: 'owner' | 'admin' | 'editor' | 'normal' | |||