|
@ -1,5 +1,5 @@ |
|
|
<script lang="ts"> |
|
|
<script lang="ts"> |
|
|
import EveryMinute from "./EveryMinute.svelte"; |
|
|
|
|
|
|
|
|
import EveryMinute from "./EveryMinute.svelte"; |
|
|
|
|
|
|
|
|
export let startTime: Date | string = new Date(); |
|
|
export let startTime: Date | string = new Date(); |
|
|
export let endTime: Date | string = new Date(); |
|
|
export let endTime: Date | string = new Date(); |
|
@ -19,10 +19,6 @@ import EveryMinute from "./EveryMinute.svelte"; |
|
|
return `${time.getFullYear()}-${pad(time.getMonth()+1)}-${pad(time.getDate())}` |
|
|
return `${time.getFullYear()}-${pad(time.getMonth()+1)}-${pad(time.getDate())}` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function onMinute(e: {detail: Date}) { |
|
|
|
|
|
now = e.detail; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$: { |
|
|
$: { |
|
|
overdue = false; |
|
|
overdue = false; |
|
|
unit = "days"; |
|
|
unit = "days"; |
|
@ -69,7 +65,7 @@ import EveryMinute from "./EveryMinute.svelte"; |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<EveryMinute on:minute={onMinute} /> |
|
|
|
|
|
|
|
|
<EveryMinute bind:now={now} /> |
|
|
<span title={titleTimeStr}> |
|
|
<span title={titleTimeStr}> |
|
|
{#if (overdue)} |
|
|
{#if (overdue)} |
|
|
<span class="overdue">{amountStr} {unit} ago</span> |
|
|
<span class="overdue">{amountStr} {unit} ago</span> |
|
|