1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-26 10:50:29 +02:00

feat(web): Implemented device last seen date and time with user locale support (#7863)

* Implemented last seen date and time with user locale support

* Run Prettier

* Prettier and Linter

* Updated last seen to be in line with suggestions

* Reworked datestamp
This commit is contained in:
DeclanE 2024-03-12 15:31:46 +00:00 committed by GitHub
parent 72f9295490
commit 412c9bc76d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,6 @@
</script>
<div class="flex w-full flex-row">
<!-- TODO: Device Image -->
<div class="hidden items-center justify-center pr-2 text-immich-primary dark:text-immich-dark-primary sm:flex">
{#if device.deviceOS === 'Android'}
<Icon path={mdiAndroid} size="40" />
@ -58,6 +57,10 @@
<div class="text-sm">
<span class="">Last seen</span>
<span>{DateTime.fromISO(device.updatedAt, { locale: $locale }).toRelativeCalendar(options)}</span>
<span class="text-xs text-gray-500 dark:text-gray-400"> - </span>
<span class="text-xs text-gray-500 dark:text-gray-400">
{DateTime.fromISO(device.updatedAt, { locale: $locale }).toLocaleString(DateTime.DATETIME_MED)}
</span>
</div>
</div>
{#if !device.current}