mirror of
https://github.com/aljazceru/hypergolic.git
synced 2026-01-20 22:04:25 +01:00
problem: can't view rocket events
This commit is contained in:
19
src/components/RocketCard.svelte
Normal file
19
src/components/RocketCard.svelte
Normal file
@@ -0,0 +1,19 @@
|
||||
<script lang="ts">
|
||||
import { Button } from '$lib/components/ui/button/index.js';
|
||||
import * as Card from '$lib/components/ui/card/index.js';
|
||||
import type { NDKEvent } from '@nostr-dev-kit/ndk';
|
||||
|
||||
export let rocketEvent: NDKEvent;
|
||||
</script>
|
||||
|
||||
<Card.Root class="w-[350px]">
|
||||
<Card.Header>
|
||||
<Card.Title>{rocketEvent.getMatchingTags('d')[0][1]}</Card.Title>
|
||||
<Card.Description>{rocketEvent.getMatchingTags('mission')[0][1]}</Card.Description>
|
||||
</Card.Header>
|
||||
<Card.Content></Card.Content>
|
||||
<Card.Footer class="flex justify-between">
|
||||
<Button on:click={()=>{console.log(rocketEvent.rawEvent())}} variant="outline">Print to Console</Button>
|
||||
<Button>View Full Rocket</Button>
|
||||
</Card.Footer>
|
||||
</Card.Root>
|
||||
20
src/components/Todo.svelte
Normal file
20
src/components/Todo.svelte
Normal file
@@ -0,0 +1,20 @@
|
||||
<script lang="ts">
|
||||
import Terminal from 'lucide-svelte/icons/terminal';
|
||||
import * as Alert from '$lib/components/ui/alert/index.js';
|
||||
export let text:string[];
|
||||
</script>
|
||||
|
||||
<Alert.Root>
|
||||
<Terminal class="h-4 w-4" />
|
||||
<Alert.Title>Todo:</Alert.Title>
|
||||
<Alert.Description>
|
||||
{#if text.length > 1}
|
||||
<ul class="list-disc">
|
||||
{#each text as t}<li>{t}</li>{/each}
|
||||
</ul>
|
||||
{:else}
|
||||
{text}
|
||||
{/if}
|
||||
|
||||
</Alert.Description>
|
||||
</Alert.Root>
|
||||
Reference in New Issue
Block a user