Browse Source

fix: staus icons reflect issue or proposal

status was showing wrong icon type in EventCard
master
DanConwayDev 2 years ago
parent
commit
c623e10e1a
No known key found for this signature in database
GPG Key ID: 68E15486D73F75E1
  1. 3
      src/lib/components/events/content/Status.svelte
  2. 2
      src/lib/components/proposals/StatusSelector.svelte
  3. 2
      src/lib/wrappers/EventCard.svelte

3
src/lib/components/events/content/Status.svelte

@ -1,12 +1,13 @@
<script lang="ts"> <script lang="ts">
import Status from '$lib/components/proposals/Status.svelte' import Status from '$lib/components/proposals/Status.svelte'
export let type: 'proposal' | 'issue' = 'proposal'
export let status: number | undefined export let status: number | undefined
</script> </script>
<div class=""> <div class="">
{#if status} {#if status}
set status to <Status {status} /> set status to <Status {type} {status} />
{:else} {:else}
set status incorrectly set status incorrectly
{/if} {/if}

2
src/lib/components/proposals/StatusSelector.svelte

@ -88,7 +88,7 @@
</script> </script>
{#if loading || !status} {#if loading || !status}
<Status /> <Status {type} />
{:else} {:else}
<div class="dropdown"> <div class="dropdown">
<Status {type} {edit_mode} {status} /> <Status {type} {edit_mode} {status} />

2
src/lib/wrappers/EventCard.svelte

@ -36,7 +36,7 @@
{#if event.kind == patch_kind} {#if event.kind == patch_kind}
<Patch content={event.content} tags={event.tags} /> <Patch content={event.content} tags={event.tags} />
{:else if event.kind && proposal_status_kinds.includes(event.kind)} {:else if event.kind && proposal_status_kinds.includes(event.kind)}
<Status status={event.kind} /> <Status {type} status={event.kind} />
{:else} {:else}
<ParsedContent content={event.content} tags={event.tags} /> <ParsedContent content={event.content} tags={event.tags} />
{/if} {/if}

Loading…
Cancel
Save