diff --git a/README.md b/README.md index cada8e4..3fc0f6c 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,9 @@ The commit message MUST be a short summary of the problem being solved, usually ## Style Guide Avoid uneccessary whitespace changes. Whitespace changes make it difficult to see what code was really changed. +## UX Library +https://www.shadcn-svelte.com/docs + ## Getting Paid If you want to get paid for working on this project, demonstrate your capability by solving some problems and adhering to the instructions in this readme. After you have 2-3 PR's merged, DM gsovereignty on nostr to have a conversation about paid work. diff --git a/src/components/CreateNewRocket.svelte b/src/components/CreateNewRocket.svelte new file mode 100644 index 0000000..f45e3e4 --- /dev/null +++ b/src/components/CreateNewRocket.svelte @@ -0,0 +1,68 @@ + + + + Create a Rocket + + + Name Your Rocket + {#if !currentUser} + + + Heads up! + You need a nostr signing extension to use Nostrocket! + + {/if} + Choose a name for your new Rocket and click Publish + +
+
+ + +
+
+ + + + +
+
diff --git a/src/components/Login.svelte b/src/components/Login.svelte new file mode 100644 index 0000000..3085d6c --- /dev/null +++ b/src/components/Login.svelte @@ -0,0 +1,35 @@ + +{#if !$ndk.signer} + +{/if} \ No newline at end of file diff --git a/src/components/RocketCard.svelte b/src/components/RocketCard.svelte index ae384c2..b802540 100644 --- a/src/components/RocketCard.svelte +++ b/src/components/RocketCard.svelte @@ -3,30 +3,19 @@ import { base } from '$app/paths'; import { Button } from '$lib/components/ui/button/index.js'; import * as Card from '$lib/components/ui/card/index.js'; + import { getMission, getRocketURL } from '@/helpers'; import type { NDKEvent } from '@nostr-dev-kit/ndk'; import { ChevronRight } from 'lucide-svelte'; export let rocketEvent: NDKEvent; //$page.url.searchParams.get("tab") - function getRocketURL(e:NDKEvent):string { - let ignitionID = undefined; - if (e.getMatchingTags('ignition') && e.getMatchingTags('ignition')[0] && e.getMatchingTags('ignition')[0][1]) { - ignitionID = e.getMatchingTags('ignition')[0][1] - } - if (!ignitionID) { - ignitionID = e.id - } - let d = e.getMatchingTags('d')[0][1] - let p = e.pubkey - return `${ignitionID}?d=${d}&p=${p}` - } {rocketEvent.getMatchingTags('d')[0][1]} - {rocketEvent.getMatchingTags('mission')[0][1]} + {getMission(rocketEvent)} diff --git a/src/layouts/SidePanelLayout.svelte b/src/layouts/SidePanelLayout.svelte index a961031..f856611 100644 --- a/src/layouts/SidePanelLayout.svelte +++ b/src/layouts/SidePanelLayout.svelte @@ -12,6 +12,7 @@ import NewMenu from '../components/Menu.svelte'; import RocketPillCard from '../components/RocketPillCard.svelte'; import { base } from '$app/paths'; + import Login from '../components/Login.svelte'; export let title = ''; @@ -86,6 +87,7 @@ + +