0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-03-18 02:31:28 -05:00

fix(web): fixed formatting of video length (#16829)

* fix(web): fixed formatting of video time

* shortened the condition
This commit is contained in:
Yaros 2025-03-12 15:18:43 +01:00 committed by GitHub
parent d1c8fe5303
commit 52d90a8280
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -90,7 +90,13 @@
<div class="absolute right-0 top-0 z-20 flex place-items-center gap-1 text-xs font-medium text-white">
{#if showTime}
<span class="pt-2">
{Duration.fromObject({ seconds: remainingSeconds }).toFormat('m:ss')}
{#if remainingSeconds < 60}
{Duration.fromObject({ seconds: remainingSeconds }).toFormat('m:ss')}
{:else if remainingSeconds < 3600}
{Duration.fromObject({ seconds: remainingSeconds }).toFormat('mm:ss')}
{:else}
{Duration.fromObject({ seconds: remainingSeconds }).toFormat('h:mm:ss')}
{/if}
</span>
{/if}