|
|
@ -1,5 +1,6 @@ |
|
|
|
<script lang="ts"> |
|
|
|
import type { IconName, iconNames } from "../external/icons"; |
|
|
|
import { formatTime } from "../utils/time"; |
|
|
|
import DaysLeft from "./DaysLeft.svelte"; |
|
|
|
import Icon from "./Icon.svelte"; |
|
|
|
import LinkHook from "./LinkHook.svelte"; |
|
|
@ -14,6 +15,7 @@ |
|
|
|
startTime?: string |
|
|
|
endTime?: string |
|
|
|
createdTime?: string |
|
|
|
loggedTime?: string |
|
|
|
|
|
|
|
active?: boolean |
|
|
|
completedAmount?: number |
|
|
@ -30,9 +32,11 @@ |
|
|
|
|
|
|
|
let iconName: IconName; |
|
|
|
let displayName: string; |
|
|
|
let displayTime: string; |
|
|
|
|
|
|
|
$: iconName = entry.task?.icon || entry.icon; |
|
|
|
$: displayName = entry.name || entry.task?.name || ""; |
|
|
|
$: displayTime = entry.loggedTime ? formatTime(entry.loggedTime) : ""; |
|
|
|
</script> |
|
|
|
|
|
|
|
<div class="child-entry"> |
|
|
@ -50,6 +54,11 @@ |
|
|
|
<DaysLeft startTime={entry.startTime || entry.createdTime} endTime={entry.endTime} /> |
|
|
|
</div> |
|
|
|
{/if} |
|
|
|
{#if (displayTime != null)} |
|
|
|
<div class="times"> |
|
|
|
{displayTime} |
|
|
|
</div> |
|
|
|
{/if} |
|
|
|
</div> |
|
|
|
<div class="entry-body"> |
|
|
|
<Markdown source={entry.description} /> |
|
|
|