mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
fix user info sidebar last access timestamp (#12047)
This commit is contained in:
@@ -57,13 +57,16 @@ export default defineComponent({
|
||||
const lastAccessDate = ref('');
|
||||
|
||||
watch(
|
||||
() => props,
|
||||
[() => props.user, () => props.isNew],
|
||||
async () => {
|
||||
if (!props.user) return;
|
||||
lastAccessDate.value = await localizedFormat(
|
||||
new Date(props.user.last_access),
|
||||
String(t('date-fns_date_short'))
|
||||
);
|
||||
|
||||
if (props.user.last_access) {
|
||||
lastAccessDate.value = await localizedFormat(
|
||||
new Date(props.user.last_access),
|
||||
String(t('date-fns_date_short'))
|
||||
);
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user