-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1644258
commit 32403ca
Showing
3 changed files
with
39 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
<script lang="ts"> | ||
import { base } from "$app/paths"; | ||
import { consensusTipState } from "$lib/stores/nostrocket_state/master_state"; | ||
import type { Rocket } from "$lib/stores/nostrocket_state/types"; | ||
import { AccordionItem, Tag } from "carbon-components-svelte"; | ||
import { StructuredListCell, StructuredListRow, Tag } from "carbon-components-svelte"; | ||
import { Report, Usb } from "carbon-icons-svelte"; | ||
import { get } from "svelte/store"; | ||
export let rocket:Rocket|undefined = undefined | ||
let problemText:string|undefined = undefined | ||
let problemRoute:string = "#" | ||
$: { | ||
if (rocket && !problemText) { | ||
problemText = get(consensusTipState).Problems.get(rocket.ProblemID)?.Title | ||
problemRoute = base+"/problems/"+rocket.ProblemID | ||
} | ||
} | ||
</script> | ||
{#if rocket} | ||
<AccordionItem> | ||
<svelte:fragment slot="title"> | ||
<h3 class="problem-title">{#if !rocket.Consensus}<Tag type="red">UNCONFIRMED</Tag>{/if} | ||
{rocket.Name} | ||
</h3> | ||
|
||
<div class="problem-summary"> | ||
<Tag>{rocket.Problems.size} Problems</Tag> | ||
</div> | ||
</svelte:fragment> | ||
<p> | ||
<a href="{base}/problems/rocket/{rocket.Name}">View Open Problems</a><br /> | ||
{#if rocket.ProblemID}<a href="{base}/problems/{rocket.ProblemID}">View the root problem for this Rocket</a>{:else}No Associated Problem{/if} | ||
<br /> | ||
</p> | ||
<p>Created By: {rocket.CreatedBy}</p> | ||
<a href="{base}/rockets/{rocket.UID}">More...</a> | ||
</AccordionItem> | ||
<StructuredListRow> | ||
<StructuredListCell noWrap><h3>{rocket.Name} <a href="{base}/rockets/{rocket.UID}"><Report /></a></h3></StructuredListCell> | ||
<StructuredListCell>{#if !rocket.Consensus}<Tag type="red">UNCONFIRMED</Tag>{/if} <Tag interactive on:click={()=>{window.location.href=base+"/problems/rocket/"+rocket?.Name}}>{rocket.Problems.size} Problems</Tag></StructuredListCell> | ||
<StructuredListCell> | ||
{#if problemText}<a href="{base}/problems/{rocket.ProblemID}">{problemText}</a>{/if} | ||
</StructuredListCell> | ||
</StructuredListRow> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters