feat: differentiate okay/avoid preferences more
This commit is contained in:
parent
86f272a365
commit
b1e267cb29
5 changed files with 24 additions and 14 deletions
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts">
|
||||
import type { Field } from "$lib/api/entities";
|
||||
|
||||
import StatusIcon from "./StatusIcon.svelte";
|
||||
import StatusLine from "./StatusLine.svelte";
|
||||
|
||||
export let field: Field;
|
||||
</script>
|
||||
|
@ -10,7 +10,7 @@
|
|||
<h3>{field.name}</h3>
|
||||
<ul class="list-unstyled fs-5">
|
||||
{#each field.entries as entry}
|
||||
<li><StatusIcon status={entry.status} /> {entry.value}</li>
|
||||
<li><StatusLine status={entry.status}>{entry.value}</StatusLine></li>
|
||||
{/each}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
</script>
|
||||
|
||||
{#if shouldLink}
|
||||
<a href="/pronouns/{link}">{pronounText}</a>
|
||||
<a class="text-reset" href="/pronouns/{link}">{pronounText}</a>
|
||||
{:else}
|
||||
{pronounText}
|
||||
{/if}
|
||||
|
|
14
frontend/src/lib/components/StatusLine.svelte
Normal file
14
frontend/src/lib/components/StatusLine.svelte
Normal file
|
@ -0,0 +1,14 @@
|
|||
<script lang="ts">
|
||||
import { WordStatus } from "$lib/api/entities";
|
||||
import StatusIcon from "$lib/components/StatusIcon.svelte";
|
||||
|
||||
export let status: WordStatus;
|
||||
</script>
|
||||
|
||||
{#if status === WordStatus.Favourite}
|
||||
<strong class="fs-5"><StatusIcon {status} /> <slot /></strong>
|
||||
{:else if status === WordStatus.Avoid}
|
||||
<span class="fs-6 text-muted"><StatusIcon {status} /> <slot /></span>
|
||||
{:else}
|
||||
<StatusIcon {status} /> <slot />
|
||||
{/if}
|
Loading…
Add table
Add a link
Reference in a new issue