parent
60aa919b14
commit
937265e828
@ -101,6 +101,12 @@
|
|||||||
delete_scan = original_data;
|
delete_scan = original_data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function format_laptime(laptime){
|
||||||
|
if(laptime == 0 || laptime == null){return $_('first-scan-of-the-day')}
|
||||||
|
if(laptime < 60){return `${laptime}s`}
|
||||||
|
if(laptime < 3600){return `${Math.floor(laptime / 60)}min ${laptime - (Math.floor(laptime / 60)*60)}s`}
|
||||||
|
return `${Math.floor(laptime / 3600)}h ${laptime - (Math.floor(laptime / 3600)*3600)}min ${laptime - (Math.floor(laptime / 3600)*3600) - (Math.floor(laptime / 60)*60)}`
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#await promise}
|
{#await promise}
|
||||||
@ -210,6 +216,10 @@
|
|||||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">{editable.track.name}
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-gray-100 text-gray-800">{editable.track.name}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="w-full inline-flex pb-3">
|
||||||
|
<label for="valid" class="block font-semibold text-gray-700">Laptime: {format_laptime(editable.laptime)}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class=" w-full">
|
<div class=" w-full">
|
||||||
<label
|
<label
|
||||||
|
Loading…
x
Reference in New Issue
Block a user