Browse Source

add markdown to task log entries.

main
Gisle Aune 4 years ago
parent
commit
282b304f3f
  1. 2
      svelte-ui/src/components/Markdown.svelte
  2. 22
      svelte-ui/src/components/TaskEntry.svelte

2
svelte-ui/src/components/Markdown.svelte

@ -36,7 +36,7 @@
div.markdown :global(ol), div.markdown :global(ul) { div.markdown :global(ol), div.markdown :global(ul) {
padding: 0.5em; padding: 0.5em;
margin: 0.5em 0;
margin: 0.25em 0;
margin-left: 1ch; margin-left: 1ch;
} }

22
svelte-ui/src/components/TaskEntry.svelte

@ -6,6 +6,7 @@
import DateSpan from "./DateSpan.svelte"; import DateSpan from "./DateSpan.svelte";
import Icon from "./Icon.svelte"; import Icon from "./Icon.svelte";
import ItemLink from "./ItemLink.svelte"; import ItemLink from "./ItemLink.svelte";
import Markdown from "./Markdown.svelte";
import Option from "./Option.svelte"; import Option from "./Option.svelte";
import OptionRow from "./OptionRow.svelte"; import OptionRow from "./OptionRow.svelte";
@ -54,7 +55,9 @@
{#each task.logs as log (log.id)} {#each task.logs as log (log.id)}
<div class="log"> <div class="log">
<div class="log-time"><DateSpan time={log.loggedTime} /></div> <div class="log-time"><DateSpan time={log.loggedTime} /></div>
<div class="log-description">{log.description}</div>
<div class="log-description">
<Markdown source={log.description} />
</div>
</div> </div>
{/each} {/each}
</div> </div>
@ -103,21 +106,4 @@
font-size: 0.75em; font-size: 0.75em;
font-weight: 800; font-weight: 800;
} }
div.item {
display: flex;
flex-direction: row;
margin-top: 0.25em;
margin-bottom: 0em;
font-size: 0.75em;
}
div.item div.item-icon {
padding: 0.25em 0.5ch 0.25em 0;
}
div.item div.item-name {
padding: 0.125em;
}
div.item a {
color: inherit;
}
</style> </style>
Loading…
Cancel
Save