diff --git a/svelte-ui/src/components/DaysLeft.svelte b/svelte-ui/src/components/DaysLeft.svelte
index ad95810..9799daf 100644
--- a/svelte-ui/src/components/DaysLeft.svelte
+++ b/svelte-ui/src/components/DaysLeft.svelte
@@ -3,6 +3,7 @@
export let startTime: Date | string = new Date();
export let endTime: Date | string = new Date();
+ export let compact: boolean = false;
let started = false;
let overdue = false;
@@ -61,6 +62,10 @@
amountStr = amount.toString()
}
+ if (compact) {
+ unit = unit.slice(0, 1);
+ }
+
titleTimeStr = `${formatTime(new Date(startTime))} – ${formatTime(new Date(endTime))}`
}
@@ -68,15 +73,19 @@
{#if (overdue)}
- {amountStr} {unit} ago
+ {amountStr}{compact ? "" : " "}{unit} {!compact ? "ago" : ""}
{:else if (started)}
- {amountStr} {unit} left
+ {amountStr}{compact ? "" : " "}{unit} {!compact ? "left" : ""}
{:else}
- In {amountStr} {unit}
+ In {amountStr}{compact ? "" : " "}{unit}
{/if}
\ No newline at end of file