refactored Item, Task and Log entry to share code. TaskEntry is still a bit messy, but that's because of the weird icon stuffs.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-01-17 12:48:29 +01:00
parent b01fca8065
commit 033abaa5bb
5 changed files with 199 additions and 288 deletions
+34
View File
@@ -0,0 +1,34 @@
<script lang="ts">
import type Item from "../models/item";
import Icon from "./Icon.svelte";
export let item: Item = null;
</script>
<div class="item">
<div class="item-icon">
<Icon name={item.icon} />
</div>
<div class="item-name">
<a href="/items#{item.groupId}">{item.name} ({item.groupWeight})</a>
</div>
</div>
<style>
div.item {
display: flex;
flex-direction: row;
margin-top: 0.25em;
margin-bottom: 0em;
font-size: 0.75em;
}
div.item a {
color: inherit;
}
div.item div.item-icon {
padding: 0.25em 0.5ch 0.25em 0;
}
div.item div.item-name {
padding: 0.125em;
}
</style>