This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
<script lang="ts">
|
||||
import type { IconName, iconNames } from "../external/icons";
|
||||
import { formatTime } from "../utils/time";
|
||||
import { formatTime } from "../utils/time";
|
||||
import DaysLeft from "./DaysLeft.svelte";
|
||||
import Icon from "./Icon.svelte";
|
||||
import LinkHook from "./LinkHook.svelte";
|
||||
import Markdown from "./Markdown.svelte";
|
||||
|
||||
interface ActualParent {
|
||||
id: string
|
||||
name: string
|
||||
}
|
||||
|
||||
interface EntryCommon {
|
||||
id: string
|
||||
name?: string
|
||||
@@ -29,6 +34,8 @@ import { formatTime } from "../utils/time";
|
||||
}
|
||||
|
||||
export let entry: EntryCommon = null;
|
||||
export let actualParent: ActualParent = null;
|
||||
export let hideParentName: boolean = false;
|
||||
|
||||
let iconName: IconName;
|
||||
let displayName: string;
|
||||
@@ -48,6 +55,16 @@ import { formatTime } from "../utils/time";
|
||||
<Icon name={iconName} />
|
||||
</div>
|
||||
</slot>
|
||||
{#if (actualParent != null)}
|
||||
{#if !hideParentName}
|
||||
<div class="actual-parent-icon">
|
||||
<Icon block name="link" />
|
||||
</div>
|
||||
<div class="actual-parent">
|
||||
<a href={`/questlog#${actualParent.id}`}>{actualParent.name}</a>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
<div class="name">{displayName}</div>
|
||||
{#if (entry.endTime != null)}
|
||||
<div class="times">
|
||||
@@ -95,6 +112,31 @@ import { formatTime } from "../utils/time";
|
||||
background: #333;
|
||||
}
|
||||
|
||||
div.actual-parent-icon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 1em;
|
||||
padding: 0.3em 0;
|
||||
padding-bottom: 0.1em;
|
||||
|
||||
margin-right: 0.5em;
|
||||
color: #555;
|
||||
}
|
||||
div.actual-parent {
|
||||
font-size: 1em;
|
||||
font-weight: 100;
|
||||
margin: auto 0;
|
||||
vertical-align: middle;
|
||||
padding: 0.125em 0;
|
||||
padding-right: 1ch;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
div.actual-parent :global(div.icon) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
div.name {
|
||||
font-size: 1em;
|
||||
font-weight: 100;
|
||||
|
||||
Reference in New Issue
Block a user