diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2f3b5be..cedca46 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,7 @@ name: Build and Deploy to Pages on: push: - branches: ["MASTER"] + branches: ['MASTER'] workflow_dispatch: @@ -14,7 +14,7 @@ permissions: # Allow one concurrent deployment concurrency: - group: "pages" + group: 'pages' cancel-in-progress: true jobs: @@ -28,7 +28,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 20 - cache: "npm" + cache: 'npm' - run: npm ci - run: npm run build - name: Upload artifact diff --git a/.lintstagedrc b/.lintstagedrc index 9aa6ceb..c54309a 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,6 +1,6 @@ { - "*.{js,ts,svelte,css,scss,postcss,md,json}": [ - "prettier --write --plugin-search-dir=.", - "prettier --check --plugin-search-dir=." - ], + "*.{js,ts,svelte,css,scss,postcss,md,json}": [ + "prettier --write --plugin-search-dir=.", + "prettier --check --plugin-search-dir=." + ] } diff --git a/README.md b/README.md index 3fc0f6c..49126d6 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # Hypergolic + A nostrocket client ## Pull Requests -Please only solve ONE problem at a time. + +Please only solve ONE problem at a time. Indicate to others that you are working to solve a particular problem by claiming it on nostrocket or commenting on the github issue so that others do not duplicate your work. @@ -11,12 +13,15 @@ Pull request should contain only ONE commit that solves exactly ONE problem. The The commit message MUST be a short summary of the problem being solved, usually this should be the same as title of the problem from the github or nostrocket issue tracker. ## 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. ## Developing diff --git a/components.json b/components.json index e6f140c..a65826c 100644 --- a/components.json +++ b/components.json @@ -11,4 +11,4 @@ "utils": "$lib/utils" }, "typescript": true -} \ No newline at end of file +} diff --git a/src/app.css b/src/app.css index b3822a1..88c8e7a 100644 --- a/src/app.css +++ b/src/app.css @@ -1,58 +1,58 @@ @tailwind base; @tailwind components; @tailwind utilities; - + @layer base { - :root { - --background: 0 0% 100%; - --foreground: 20 14.3% 4.1%; - --card: 0 0% 100%; - --card-foreground: 20 14.3% 4.1%; - --popover: 0 0% 100%; - --popover-foreground: 20 14.3% 4.1%; - --primary: 24.6 95% 53.1%; - --primary-foreground: 60 9.1% 97.8%; - --secondary: 60 4.8% 95.9%; - --secondary-foreground: 24 9.8% 10%; - --muted: 60 4.8% 95.9%; - --muted-foreground: 25 5.3% 44.7%; - --accent: 60 4.8% 95.9%; - --accent-foreground: 24 9.8% 10%; - --destructive: 0 72.22% 50.59%; - --destructive-foreground: 60 9.1% 97.8%; - --border: 20 5.9% 90%; - --input: 20 5.9% 90%; - --ring: 24.6 95% 53.1%; - --radius: 0.5rem; - } - .dark { - --background: 20 14.3% 4.1%; - --foreground: 60 9.1% 97.8%; - --card: 20 14.3% 4.1%; - --card-foreground: 60 9.1% 97.8%; - --popover: 20 14.3% 4.1%; - --popover-foreground: 60 9.1% 97.8%; - --primary: 20.5 90.2% 48.2%; - --primary-foreground: 60 9.1% 97.8%; - --secondary: 12 6.5% 15.1%; - --secondary-foreground: 60 9.1% 97.8%; - --muted: 12 6.5% 15.1%; - --muted-foreground: 24 5.4% 63.9%; - --accent: 12 6.5% 15.1%; - --accent-foreground: 60 9.1% 97.8%; - --destructive: 0 72.2% 50.6%; - --destructive-foreground: 60 9.1% 97.8%; - --border: 12 6.5% 15.1%; - --input: 12 6.5% 15.1%; - --ring: 20.5 90.2% 48.2%; - } + :root { + --background: 0 0% 100%; + --foreground: 20 14.3% 4.1%; + --card: 0 0% 100%; + --card-foreground: 20 14.3% 4.1%; + --popover: 0 0% 100%; + --popover-foreground: 20 14.3% 4.1%; + --primary: 24.6 95% 53.1%; + --primary-foreground: 60 9.1% 97.8%; + --secondary: 60 4.8% 95.9%; + --secondary-foreground: 24 9.8% 10%; + --muted: 60 4.8% 95.9%; + --muted-foreground: 25 5.3% 44.7%; + --accent: 60 4.8% 95.9%; + --accent-foreground: 24 9.8% 10%; + --destructive: 0 72.22% 50.59%; + --destructive-foreground: 60 9.1% 97.8%; + --border: 20 5.9% 90%; + --input: 20 5.9% 90%; + --ring: 24.6 95% 53.1%; + --radius: 0.5rem; + } + .dark { + --background: 20 14.3% 4.1%; + --foreground: 60 9.1% 97.8%; + --card: 20 14.3% 4.1%; + --card-foreground: 60 9.1% 97.8%; + --popover: 20 14.3% 4.1%; + --popover-foreground: 60 9.1% 97.8%; + --primary: 20.5 90.2% 48.2%; + --primary-foreground: 60 9.1% 97.8%; + --secondary: 12 6.5% 15.1%; + --secondary-foreground: 60 9.1% 97.8%; + --muted: 12 6.5% 15.1%; + --muted-foreground: 24 5.4% 63.9%; + --accent: 12 6.5% 15.1%; + --accent-foreground: 60 9.1% 97.8%; + --destructive: 0 72.2% 50.6%; + --destructive-foreground: 60 9.1% 97.8%; + --border: 12 6.5% 15.1%; + --input: 12 6.5% 15.1%; + --ring: 20.5 90.2% 48.2%; + } } - + @layer base { - * { - @apply border-border; - } - body { - @apply bg-background text-foreground; - } -} \ No newline at end of file + * { + @apply border-border; + } + body { + @apply bg-background text-foreground; + } +} diff --git a/src/app.html b/src/app.html index 1076313..84575b7 100644 --- a/src/app.html +++ b/src/app.html @@ -3,10 +3,16 @@ - + %sveltekit.head% - +
%sveltekit.body%
diff --git a/src/components/CreateNewProduct.svelte b/src/components/CreateNewProduct.svelte index 020e3b4..42311a5 100644 --- a/src/components/CreateNewProduct.svelte +++ b/src/components/CreateNewProduct.svelte @@ -15,7 +15,7 @@ import { getRocketURL } from '@/helpers'; import Textarea from '@/components/ui/textarea/textarea.svelte'; - export let rocketEvent:NDKEvent; + export let rocketEvent: NDKEvent; let name: string; let desc: string; @@ -36,10 +36,10 @@ //todo validate d tag e.tags.push(['name', name]); e.tags.push(['description', desc]); - e.tags.push(['cover', image]) - e.tags.push(['a', `31108:${rocketEvent.pubkey}:${rocketEvent.dTag}`]) + e.tags.push(['cover', image]); + e.tags.push(['a', `31108:${rocketEvent.pubkey}:${rocketEvent.dTag}`]); e.tags.push(['ruleset', '334000']); - console.log(e.rawEvent()) + console.log(e.rawEvent()); e.publish().then((x) => { console.log(x); goto(`${base}/rockets/${getRocketURL(e)}`); @@ -48,9 +48,18 @@ - Propose a New Product + Propose a New Product - 5 < 20", "description length > 20", "image url resolves and is image"]} /> + 5 < 20', + 'description length > 20', + 'image url resolves and is image' + ]} + /> {#if !currentUser} diff --git a/src/components/CreateNewRocket.svelte b/src/components/CreateNewRocket.svelte index 52af642..263da03 100644 --- a/src/components/CreateNewRocket.svelte +++ b/src/components/CreateNewRocket.svelte @@ -14,7 +14,7 @@ import { base } from '$app/paths'; import { getRocketURL } from '@/helpers'; - let name:string; + let name: string; function publish(ndk: NDKSvelte, name: string) { if (!ndk.signer) { @@ -25,18 +25,18 @@ if (!author) { throw new Error('no current user'); } - e.author = author; - e.kind = 31108; - e.created_at = Math.floor(new Date().getTime() / 1000); - //todo validate d tag - e.tags.push(["d", name]) - e.tags.push(["ruleset", "334000"]) - e.tags.push(["ignition", "this"]) - e.tags.push(["parent", "this"]) - e.publish().then((x)=>{ - console.log(x) - goto(`${base}/rockets/${getRocketURL(e)}`) - }) + e.author = author; + e.kind = 31108; + e.created_at = Math.floor(new Date().getTime() / 1000); + //todo validate d tag + e.tags.push(['d', name]); + e.tags.push(['ruleset', '334000']); + e.tags.push(['ignition', 'this']); + e.tags.push(['parent', 'this']); + e.publish().then((x) => { + console.log(x); + goto(`${base}/rockets/${getRocketURL(e)}`); + }); } @@ -64,7 +64,12 @@ - + diff --git a/src/components/EmptyList.svelte b/src/components/EmptyList.svelte index 1adfbc0..5d8f129 100644 --- a/src/components/EmptyList.svelte +++ b/src/components/EmptyList.svelte @@ -1,14 +1,11 @@ +
-
-

You have no products

-

- You can start selling as soon as you add a product. -

- -
-
\ No newline at end of file +
+

You have no products

+

You can start selling as soon as you add a product.

+ +
+ diff --git a/src/components/Login.svelte b/src/components/Login.svelte index cd18d9d..3d26654 100644 --- a/src/components/Login.svelte +++ b/src/components/Login.svelte @@ -1,56 +1,57 @@ + {#if !$ndk.signer} - + {:else} - - - - - - My Account - - Settings - Support - - Logout - - + + + + + + My Account + + Settings + Support + + Logout + + {/if} diff --git a/src/components/Menu.svelte b/src/components/Menu.svelte index ee77a98..1a2bdba 100644 --- a/src/components/Menu.svelte +++ b/src/components/Menu.svelte @@ -5,55 +5,37 @@ import Separator from '@/components/ui/separator/separator.svelte'; import { Mail, Package, Pyramid, Rocket, Users } from 'lucide-svelte'; - let iconClass = "h-5 w-5 md:h-4 md:w-4" + let iconClass = 'h-5 w-5 md:h-4 md:w-4'; - let getClass = (menuItem:string) => { + let getClass = (menuItem: string) => { //todo: make this re-run any time our path changes - if ($page.url.pathname.includes(menuItem)) { - return "flex items-center gap-3 rounded-lg bg-muted px-3 py-2 text-primary transition-all hover:text-primary" - } else { - return "flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-primary" - } - - } - - + if ($page.url.pathname.includes(menuItem)) { + return 'flex items-center gap-3 rounded-lg bg-muted px-3 py-2 text-primary transition-all hover:text-primary'; + } else { + return 'flex items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-primary'; + } + }; - + Rockets - + Problem Tracker 6 - + Products - + People - + Inbox diff --git a/src/components/MeritRequestDashboard.svelte b/src/components/MeritRequestDashboard.svelte index ed4ac9f..02a8e39 100644 --- a/src/components/MeritRequestDashboard.svelte +++ b/src/components/MeritRequestDashboard.svelte @@ -21,11 +21,17 @@ - Merit Requests + Merit Requests - {merit.Problem().substring(0,16)}{#if merit.Problem().length > 16}...{/if} + {merit + .Problem() + .substring(0, 16)}{#if merit.Problem().length > 16}...{/if} @@ -33,6 +39,6 @@
- -
+ + diff --git a/src/components/MeritSummaryCard.svelte b/src/components/MeritSummaryCard.svelte index fde2b48..8212625 100644 --- a/src/components/MeritSummaryCard.svelte +++ b/src/components/MeritSummaryCard.svelte @@ -66,14 +66,14 @@ let rocketUpdates = derived([votes, currentUser], ([$votes, $currentUser]) => { let events: NDKEvent[] = []; - if ( - $currentUser && - parsedRocket && - parsedRocket.VotePowerForPubkey($currentUser.pubkey) > 0 - ) { - let votes = new Votes(Array.from($votes, ([_, v])=>(v))) - let result = votes.Results().Result(parsedRocket) - if (result && result == "ratify" && !parsedRocket.ApprovedMeritRequests().get(votes.Request)) { + if ($currentUser && parsedRocket && parsedRocket.VotePowerForPubkey($currentUser.pubkey) > 0) { + let votes = new Votes(Array.from($votes, ([_, v]) => v)); + let result = votes.Results().Result(parsedRocket); + if ( + result && + result == 'ratify' && + !parsedRocket.ApprovedMeritRequests().get(votes.Request) + ) { //todo: parsedRocket.AppendAMR(votes.ConstructProof()) // } @@ -81,8 +81,11 @@ return events; }); - rocketUpdates.subscribe((c)=>{if (c.length > 0){console.log(c)}}) - + rocketUpdates.subscribe((c) => { + if (c.length > 0) { + console.log(c); + } + }); diff --git a/src/components/MeritsAndSatflow.svelte b/src/components/MeritsAndSatflow.svelte index 9453b12..b33de91 100644 --- a/src/components/MeritsAndSatflow.svelte +++ b/src/components/MeritsAndSatflow.svelte @@ -1,44 +1,42 @@ + - - Merits and Satflow - -
- This graph displays the Meritization of equity in {rocket.getMatchingTags('d')[0][1]} - -
-
- - - - Participant - - Sats Received - - - - - -
Liam Johnson
- -
- - 250k -
-
-
-
-
-
- - -
\ No newline at end of file + + Merits and Satflow + +
+ This graph displays the Meritization of equity in {rocket.getMatchingTags('d')[0][1]} + +
+
+ + + + Participant + + Sats Received + + + + + +
Liam Johnson
+ +
+ + 250k +
+
+
+
+
+
+ +
diff --git a/src/components/PayNow.svelte b/src/components/PayNow.svelte index 7a25231..5a2c7d3 100644 --- a/src/components/PayNow.svelte +++ b/src/components/PayNow.svelte @@ -9,29 +9,33 @@ import Todo from './Todo.svelte'; import { requestProvider } from 'webln'; - export let product:NDKEvent; - export let rocket:NDKEvent; + export let product: NDKEvent; + export let rocket: NDKEvent; - function zap() { - let z = new NDKZap({ndk:$ndk, zappedEvent:rocket, zappedUser: rocket.author}) - z.createZapRequest(1000, `Purchase of ${product.getMatchingTags("name")[0][1]} from ${rocket.dTag}`, [["product", product.id]]).then(invoice=>{ - if (invoice) { - requestProvider().then((webln)=>{ - webln.sendPayment(invoice).then((response)=>{ - if (response && response.preimage) { - console.log(response.preimage) + function zap() { + let z = new NDKZap({ ndk: $ndk, zappedEvent: rocket, zappedUser: rocket.author }); + z.createZapRequest( + 1000, + `Purchase of ${product.getMatchingTags('name')[0][1]} from ${rocket.dTag}`, + [['product', product.id]] + ).then((invoice) => { + if (invoice) { + requestProvider().then((webln) => { + webln.sendPayment(invoice).then((response) => { + if (response && response.preimage) { + console.log(response.preimage); open = false; - } - }) - }); - } - }) - } + } + }); + }); + } + }); + } -let open:boolean; + let open: boolean; - + Buy Now diff --git a/src/components/Pie.svelte b/src/components/Pie.svelte index ec004ab..deff87f 100644 --- a/src/components/Pie.svelte +++ b/src/components/Pie.svelte @@ -1,106 +1,100 @@ - + // + //
+ //
+ //
+ //
Merit Distribution
- - + //
+ //
- \ No newline at end of file + //
+ //
+ + + diff --git a/src/components/ProductCard.svelte b/src/components/ProductCard.svelte index 9608931..39c4c7d 100644 --- a/src/components/ProductCard.svelte +++ b/src/components/ProductCard.svelte @@ -5,7 +5,7 @@ import PayNow from './PayNow.svelte'; export let product: NDKEvent; - export let rocket:NDKEvent; + export let rocket: NDKEvent; //$page.url.searchParams.get("tab") function validate(event: NDKEvent): boolean { @@ -34,19 +34,19 @@ return test == 3; } - function includedInRocket():boolean { - let included = false - for (let p of rocket.getMatchingTags("product")) { - if (p[1].split(":")[0] == product.id) { - included = true + function includedInRocket(): boolean { + let included = false; + for (let p of rocket.getMatchingTags('product')) { + if (p[1].split(':')[0] == product.id) { + included = true; } } - return included + return included; } {#if validate(product)} - + {product.getMatchingTags('name')[0][1]} {product.getMatchingTags('description')[0][1]} @@ -55,9 +55,9 @@ {#if !includedInRocket()} - + {:else} - + {/if} diff --git a/src/components/ProductCardFromID.svelte b/src/components/ProductCardFromID.svelte index f33ddc8..ca0ff5c 100644 --- a/src/components/ProductCardFromID.svelte +++ b/src/components/ProductCardFromID.svelte @@ -1,22 +1,21 @@ {#if productEvent} - -{/if} \ No newline at end of file + +{/if} diff --git a/src/components/ProductFomo.svelte b/src/components/ProductFomo.svelte index 732d57d..c7917f7 100644 --- a/src/components/ProductFomo.svelte +++ b/src/components/ProductFomo.svelte @@ -26,14 +26,14 @@ Products and Purchases - {#each $products as product} -
- -
-
- -
- {/each} + {#each $products as product} +
+ +
+
+ +
+ {/each}
diff --git a/src/components/ProductsForRocket.svelte b/src/components/ProductsForRocket.svelte index 963f710..addd500 100644 --- a/src/components/ProductsForRocket.svelte +++ b/src/components/ProductsForRocket.svelte @@ -5,7 +5,6 @@ import ProductCardFromID from './ProductCardFromID.svelte'; import ProductPurchases from './ProductPurchases.svelte'; - export let rocketEvent: NDKEvent; $: rocketProducts = getMapOfProductsFromRocket(rocketEvent); @@ -13,8 +12,6 @@ {#if rocketEvent && rocketProducts.size > 0} {#each rocketProducts as [id, product]} - + {/each} {/if} - - diff --git a/src/components/ProposedProducts.svelte b/src/components/ProposedProducts.svelte index 4aae3de..207993f 100644 --- a/src/components/ProposedProducts.svelte +++ b/src/components/ProposedProducts.svelte @@ -8,27 +8,25 @@ export let rocket: NDKEvent; let proposals = $ndk.storeSubscribe( - [ - { '#a': [`31108:${rocket.author.pubkey}:${rocket.dTag}`], kinds: [1908 as number] } - ], + [{ '#a': [`31108:${rocket.author.pubkey}:${rocket.dTag}`], kinds: [1908 as number] }], { subId: rocket.dTag } ); - onDestroy(()=>{ - proposals.unsubscribe() - }) + onDestroy(() => { + proposals.unsubscribe(); + }); - let unratified = derived(proposals, ($proposals)=>{ - return $proposals.filter((p)=>{ - let found = false; - for (let product of rocket.getMatchingTags("product")){ - if (product[1].split(":")[0] == p.id) { - found = true - } - } - return !found - }) - }) + let unratified = derived(proposals, ($proposals) => { + return $proposals.filter((p) => { + let found = false; + for (let product of rocket.getMatchingTags('product')) { + if (product[1].split(':')[0] == p.id) { + found = true; + } + } + return !found; + }); + }); {#each $unratified as r}{/each} diff --git a/src/components/RocketCard.svelte b/src/components/RocketCard.svelte index ca3cbf8..d23ca3b 100644 --- a/src/components/RocketCard.svelte +++ b/src/components/RocketCard.svelte @@ -3,15 +3,14 @@ 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 { Name, Avatar } from "@nostr-dev-kit/ndk-svelte-components"; + import { Name, Avatar } from '@nostr-dev-kit/ndk-svelte-components'; import { getMission, getRocketURL } from '@/helpers'; import type { NDKEvent } from '@nostr-dev-kit/ndk'; import { ChevronRight } from 'lucide-svelte'; - import { ndk } from "@/ndk"; + import { ndk } from '@/ndk'; export let rocketEvent: NDKEvent; - //$page.url.searchParams.get("tab") - + //$page.url.searchParams.get("tab") @@ -21,12 +20,25 @@
- +
- - + +
diff --git a/src/components/RocketDashboard copy.svelte b/src/components/RocketDashboard copy.svelte index 9a01ff0..dc4ef44 100644 --- a/src/components/RocketDashboard copy.svelte +++ b/src/components/RocketDashboard copy.svelte @@ -1,490 +1,401 @@ - + import ChevronLeft from 'lucide-svelte/icons/chevron-left'; + import ChevronRight from 'lucide-svelte/icons/chevron-right'; + import Copy from 'lucide-svelte/icons/copy'; + import CreditCard from 'lucide-svelte/icons/credit-card'; + import EllipsisVertical from 'lucide-svelte/icons/ellipsis-vertical'; + import File from 'lucide-svelte/icons/file'; + import ListFilter from 'lucide-svelte/icons/list-filter'; + import Truck from 'lucide-svelte/icons/truck'; - -
-
- - -
-
-
-
- - - Your Orders - - Introducing Our Dynamic Orders Dashboard for Seamless Management and - Insightful Analysis. - - - - - - - - - This Week - $1329 - - -
+25% from last week
-
- - - -
- - - This Month - $5,329 - - -
+10% from last month
-
- - - -
-
- -
- - Week - Month - Year - -
- - - - - - Filter by - - - Fulfilled - - Declined - Refunded - - - -
-
- - - - Orders - Recent orders from your store. - - - - - - Customer - - - - Amount - - - - - -
Liam Johnson
- -
- - - - $250.00 -
- - -
Olivia Smith
- -
- - - - $150.00 -
- - -
Noah Williams
- -
- - - - $350.00 -
- - -
Emma Brown
- -
- - - - $450.00 -
- - -
Liam Johnson
- -
- - - - $250.00 -
- - -
Liam Johnson
- -
- - - - $250.00 -
- - -
Olivia Smith
- -
- - - - $150.00 -
- - -
Emma Brown
- -
- - - - $450.00 -
-
-
-
-
-
-
-
-
- - -
- - Order Oe31b70H - - - Date: November 23, 2023 -
-
- - - - - - - Edit - Export - - Trash - - -
-
- -
-
Order Details
-
    -
  • - - Glimmer Lamps x 2 - - $250.00 -
  • -
  • - - Aqua Filters x 1 - - $49.00 -
  • -
- -
    -
  • - Subtotal - $299.00 -
  • -
  • - Shipping - $5.00 -
  • -
  • - Tax - $25.00 -
  • -
  • - Total - $329.00 -
  • -
-
- -
-
-
Shipping Information
-
- Liam Johnson - 1234 Main St. - Anytown, CA 12345 -
-
-
-
Billing Information
-
Same as shipping address
-
-
- -
-
Customer Information
-
-
-
Customer
-
Liam Johnson
-
-
-
Email
-
- liam@acme.com -
-
-
-
Phone
-
- +1 234 567 890 -
-
-
-
- -
-
Payment Information
-
-
-
- - Visa -
-
**** **** **** 4532
-
-
-
-
- -
- Updated -
- - - - - - - - - - -
-
-
-
-
+ import { Badge } from '$lib/components/ui/badge/index.js'; + import * as Breadcrumb from '$lib/components/ui/breadcrumb/index.js'; + import { Button } from '$lib/components/ui/button/index.js'; + import * as Card from '$lib/components/ui/card/index.js'; + import * as DropdownMenu from '$lib/components/ui/dropdown-menu/index.js'; + import * as Pagination from '$lib/components/ui/pagination/index.js'; + import { Progress } from '$lib/components/ui/progress/index.js'; + import { Separator } from '$lib/components/ui/separator/index.js'; + import * as Table from '$lib/components/ui/table/index.js'; + import * as Tabs from '$lib/components/ui/tabs/index.js'; + - \ No newline at end of file +
+
+ +
+
+
+
+ + + Your Orders + + Introducing Our Dynamic Orders Dashboard for Seamless Management and Insightful + Analysis. + + + + + + + + + This Week + $1329 + + +
+25% from last week
+
+ + + +
+ + + This Month + $5,329 + + +
+10% from last month
+
+ + + +
+
+ +
+ + Week + Month + Year + +
+ + + + + + Filter by + + Fulfilled + Declined + Refunded + + + +
+
+ + + + Orders + Recent orders from your store. + + + + + + Customer + + + + Amount + + + + + +
Liam Johnson
+ +
+ + + + $250.00 +
+ + +
Olivia Smith
+ +
+ + + + $150.00 +
+ + +
Noah Williams
+ +
+ + + + $350.00 +
+ + +
Emma Brown
+ +
+ + + + $450.00 +
+ + +
Liam Johnson
+ +
+ + + + $250.00 +
+ + +
Liam Johnson
+ +
+ + + + $250.00 +
+ + +
Olivia Smith
+ +
+ + + + $150.00 +
+ + +
Emma Brown
+ +
+ + + + $450.00 +
+
+
+
+
+
+
+
+
+ + +
+ + Order Oe31b70H + + + Date: November 23, 2023 +
+
+ + + + + + + Edit + Export + + Trash + + +
+
+ +
+
Order Details
+
    +
  • + + Glimmer Lamps x 2 + + $250.00 +
  • +
  • + + Aqua Filters x 1 + + $49.00 +
  • +
+ +
    +
  • + Subtotal + $299.00 +
  • +
  • + Shipping + $5.00 +
  • +
  • + Tax + $25.00 +
  • +
  • + Total + $329.00 +
  • +
+
+ +
+
+
Shipping Information
+
+ Liam Johnson + 1234 Main St. + Anytown, CA 12345 +
+
+
+
Billing Information
+
Same as shipping address
+
+
+ +
+
Customer Information
+
+
+
Customer
+
Liam Johnson
+
+
+
Email
+
+ liam@acme.com +
+
+
+
Phone
+
+ +1 234 567 890 +
+
+
+
+ +
+
Payment Information
+
+
+
+ + Visa +
+
**** **** **** 4532
+
+
+
+
+ +
+ Updated +
+ + + + + + + + + + +
+
+
+
+
diff --git a/src/components/RocketDashboard.svelte b/src/components/RocketDashboard.svelte index 61f4995..9d9fd15 100644 --- a/src/components/RocketDashboard.svelte +++ b/src/components/RocketDashboard.svelte @@ -14,9 +14,7 @@
-
+
@@ -38,7 +36,6 @@ - diff --git a/src/components/RocketPillCard.svelte b/src/components/RocketPillCard.svelte index ca80d9d..6042947 100644 --- a/src/components/RocketPillCard.svelte +++ b/src/components/RocketPillCard.svelte @@ -5,14 +5,21 @@ import { Button } from '@/components/ui/button'; import * as Card from '@/components/ui/card'; -{#if $page.route.id != "/"} - - - WTF - I'm new to Nostrocket, wtf is this thing all about? - - - - - -{/if} \ No newline at end of file + +{#if $page.route.id != '/'} + + + WTF + I'm new to Nostrocket, wtf is this thing all about? + + + + + +{/if} diff --git a/src/components/Todo.svelte b/src/components/Todo.svelte index a6aa24f..e6393f3 100644 --- a/src/components/Todo.svelte +++ b/src/components/Todo.svelte @@ -1,20 +1,19 @@ Todo: - {#if text.length > 1} -
    - {#each text as t}
  • {t}
  • {/each} -
- {:else} - {text} - {/if} - -
+ {#if text.length > 1} +
    + {#each text as t}
  • {t}
  • {/each} +
+ {:else} + {text} + {/if} +
diff --git a/src/components/VoteOnMeritRequest.svelte b/src/components/VoteOnMeritRequest.svelte index d32c184..a1eed6b 100644 --- a/src/components/VoteOnMeritRequest.svelte +++ b/src/components/VoteOnMeritRequest.svelte @@ -35,15 +35,13 @@ }); } - $:currentUserHasVotepower = false; + $: currentUserHasVotepower = false; - $:{ + $: { if (currentUser && $currentUser) { - currentUserHasVotepower = (rocket.VotePowerForPubkey($currentUser.pubkey) > 0) + currentUserHasVotepower = rocket.VotePowerForPubkey($currentUser.pubkey) > 0; } } - - {#if $currentUser} @@ -54,19 +52,18 @@ if (currentUserHasVotepower) { publish($ndk, 'ratify'); } else { - alert(`Your pubkey does not have votepower in ${rocket.Name()}`) + alert(`Your pubkey does not have votepower in ${rocket.Name()}`); } - }}>Vote to Approve diff --git a/src/layouts/SidePanelLayout.svelte b/src/layouts/SidePanelLayout.svelte index 91fedaa..b38610b 100644 --- a/src/layouts/SidePanelLayout.svelte +++ b/src/layouts/SidePanelLayout.svelte @@ -35,7 +35,7 @@
-
+
@@ -83,8 +83,8 @@
-
+
-
+
diff --git a/src/lib/components/ui/accordion/accordion-content.svelte b/src/lib/components/ui/accordion/accordion-content.svelte index 85e835e..7943a40 100644 --- a/src/lib/components/ui/accordion/accordion-content.svelte +++ b/src/lib/components/ui/accordion/accordion-content.svelte @@ -1,20 +1,20 @@ - import { Accordion as AccordionPrimitive } from "bits-ui"; - import { cn } from "$lib/utils.js"; + import { Accordion as AccordionPrimitive } from 'bits-ui'; + import { cn } from '$lib/utils.js'; type $$Props = AccordionPrimitive.ItemProps; - let className: $$Props["class"] = undefined; - export let value: $$Props["value"]; + let className: $$Props['class'] = undefined; + export let value: $$Props['value']; export { className as class }; - + diff --git a/src/lib/components/ui/accordion/accordion-trigger.svelte b/src/lib/components/ui/accordion/accordion-trigger.svelte index 1176922..b1fb046 100644 --- a/src/lib/components/ui/accordion/accordion-trigger.svelte +++ b/src/lib/components/ui/accordion/accordion-trigger.svelte @@ -1,20 +1,20 @@ svg]:rotate-180", + 'flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180', className )} {...$$restProps} diff --git a/src/lib/components/ui/accordion/index.ts b/src/lib/components/ui/accordion/index.ts index ed49213..0734d4e 100644 --- a/src/lib/components/ui/accordion/index.ts +++ b/src/lib/components/ui/accordion/index.ts @@ -1,7 +1,7 @@ -import { Accordion as AccordionPrimitive } from "bits-ui"; -import Content from "./accordion-content.svelte"; -import Item from "./accordion-item.svelte"; -import Trigger from "./accordion-trigger.svelte"; +import { Accordion as AccordionPrimitive } from 'bits-ui'; +import Content from './accordion-content.svelte'; +import Item from './accordion-item.svelte'; +import Trigger from './accordion-trigger.svelte'; const Root = AccordionPrimitive.Root; export { @@ -13,5 +13,5 @@ export { Root as Accordion, Content as AccordionContent, Item as AccordionItem, - Trigger as AccordionTrigger, + Trigger as AccordionTrigger }; diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte index 57d643b..2c5ea4c 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-action.svelte @@ -1,12 +1,12 @@ diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte index ef0a953..edf6d78 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-cancel.svelte @@ -1,17 +1,17 @@ - import { AlertDialog as AlertDialogPrimitive } from "bits-ui"; - import * as AlertDialog from "./index.js"; - import { cn, flyAndScale } from "$lib/utils.js"; + import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'; + import * as AlertDialog from './index.js'; + import { cn, flyAndScale } from '$lib/utils.js'; type $$Props = AlertDialogPrimitive.ContentProps; - export let transition: $$Props["transition"] = flyAndScale; - export let transitionConfig: $$Props["transitionConfig"] = undefined; + export let transition: $$Props['transition'] = flyAndScale; + export let transitionConfig: $$Props['transitionConfig'] = undefined; - let className: $$Props["class"] = undefined; + let className: $$Props['class'] = undefined; export { className as class }; @@ -18,7 +18,7 @@ {transition} {transitionConfig} class={cn( - "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full", + 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg sm:rounded-lg md:w-full', className )} {...$$restProps} diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte index 18acce9..c77c684 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-description.svelte @@ -1,15 +1,15 @@ diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte index a235d1f..329304a 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-footer.svelte @@ -1,15 +1,15 @@
diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte index 2650ef9..434c29c 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-header.svelte @@ -1,13 +1,13 @@ -
+
diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte index 3081d75..8b1969f 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-overlay.svelte @@ -1,14 +1,14 @@ @@ -16,6 +16,6 @@ diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-portal.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-portal.svelte index e227219..347119a 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-portal.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-portal.svelte @@ -1,5 +1,5 @@ diff --git a/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte b/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte index 7f98004..75287f3 100644 --- a/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte +++ b/src/lib/components/ui/alert-dialog/alert-dialog-title.svelte @@ -1,14 +1,14 @@ - + diff --git a/src/lib/components/ui/alert-dialog/index.ts b/src/lib/components/ui/alert-dialog/index.ts index be56dd7..fe3ff29 100644 --- a/src/lib/components/ui/alert-dialog/index.ts +++ b/src/lib/components/ui/alert-dialog/index.ts @@ -1,14 +1,14 @@ -import { AlertDialog as AlertDialogPrimitive } from "bits-ui"; +import { AlertDialog as AlertDialogPrimitive } from 'bits-ui'; -import Title from "./alert-dialog-title.svelte"; -import Action from "./alert-dialog-action.svelte"; -import Cancel from "./alert-dialog-cancel.svelte"; -import Portal from "./alert-dialog-portal.svelte"; -import Footer from "./alert-dialog-footer.svelte"; -import Header from "./alert-dialog-header.svelte"; -import Overlay from "./alert-dialog-overlay.svelte"; -import Content from "./alert-dialog-content.svelte"; -import Description from "./alert-dialog-description.svelte"; +import Title from './alert-dialog-title.svelte'; +import Action from './alert-dialog-action.svelte'; +import Cancel from './alert-dialog-cancel.svelte'; +import Portal from './alert-dialog-portal.svelte'; +import Footer from './alert-dialog-footer.svelte'; +import Header from './alert-dialog-header.svelte'; +import Overlay from './alert-dialog-overlay.svelte'; +import Content from './alert-dialog-content.svelte'; +import Description from './alert-dialog-description.svelte'; const Root = AlertDialogPrimitive.Root; const Trigger = AlertDialogPrimitive.Trigger; @@ -36,5 +36,5 @@ export { Trigger as AlertDialogTrigger, Overlay as AlertDialogOverlay, Content as AlertDialogContent, - Description as AlertDialogDescription, + Description as AlertDialogDescription }; diff --git a/src/lib/components/ui/alert/alert-description.svelte b/src/lib/components/ui/alert/alert-description.svelte index 5bbc85a..06d344c 100644 --- a/src/lib/components/ui/alert/alert-description.svelte +++ b/src/lib/components/ui/alert/alert-description.svelte @@ -1,13 +1,13 @@ -
+
diff --git a/src/lib/components/ui/alert/alert-title.svelte b/src/lib/components/ui/alert/alert-title.svelte index 2795342..c63089b 100644 --- a/src/lib/components/ui/alert/alert-title.svelte +++ b/src/lib/components/ui/alert/alert-title.svelte @@ -1,20 +1,20 @@ diff --git a/src/lib/components/ui/alert/alert.svelte b/src/lib/components/ui/alert/alert.svelte index e1aa6df..0bf6eec 100644 --- a/src/lib/components/ui/alert/alert.svelte +++ b/src/lib/components/ui/alert/alert.svelte @@ -1,14 +1,14 @@ diff --git a/src/lib/components/ui/alert/index.ts b/src/lib/components/ui/alert/index.ts index c21bc1e..87f42b7 100644 --- a/src/lib/components/ui/alert/index.ts +++ b/src/lib/components/ui/alert/index.ts @@ -1,26 +1,26 @@ -import { type VariantProps, tv } from "tailwind-variants"; +import { type VariantProps, tv } from 'tailwind-variants'; -import Root from "./alert.svelte"; -import Description from "./alert-description.svelte"; -import Title from "./alert-title.svelte"; +import Root from './alert.svelte'; +import Description from './alert-description.svelte'; +import Title from './alert-title.svelte'; export const alertVariants = tv({ - base: "relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", + base: 'relative w-full rounded-lg border p-4 [&:has(svg)]:pl-11 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground', variants: { variant: { - default: "bg-background text-foreground", + default: 'bg-background text-foreground', destructive: - "border-destructive/50 text-destructive text-destructive dark:border-destructive [&>svg]:text-destructive", - }, + 'border-destructive/50 text-destructive text-destructive dark:border-destructive [&>svg]:text-destructive' + } }, defaultVariants: { - variant: "default", - }, + variant: 'default' + } }); -export type Variant = VariantProps["variant"]; -export type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6"; +export type Variant = VariantProps['variant']; +export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; export { Root, @@ -29,5 +29,5 @@ export { // Root as Alert, Description as AlertDescription, - Title as AlertTitle, + Title as AlertTitle }; diff --git a/src/lib/components/ui/aspect-ratio/aspect-ratio.svelte b/src/lib/components/ui/aspect-ratio/aspect-ratio.svelte index b3da1f3..0870de9 100644 --- a/src/lib/components/ui/aspect-ratio/aspect-ratio.svelte +++ b/src/lib/components/ui/aspect-ratio/aspect-ratio.svelte @@ -1,9 +1,9 @@ diff --git a/src/lib/components/ui/aspect-ratio/index.ts b/src/lib/components/ui/aspect-ratio/index.ts index 985c75f..1d9517e 100644 --- a/src/lib/components/ui/aspect-ratio/index.ts +++ b/src/lib/components/ui/aspect-ratio/index.ts @@ -1,3 +1,3 @@ -import Root from "./aspect-ratio.svelte"; +import Root from './aspect-ratio.svelte'; export { Root, Root as AspectRatio }; diff --git a/src/lib/components/ui/avatar/avatar-fallback.svelte b/src/lib/components/ui/avatar/avatar-fallback.svelte index 865fc40..42409b5 100644 --- a/src/lib/components/ui/avatar/avatar-fallback.svelte +++ b/src/lib/components/ui/avatar/avatar-fallback.svelte @@ -1,15 +1,15 @@ diff --git a/src/lib/components/ui/avatar/avatar-image.svelte b/src/lib/components/ui/avatar/avatar-image.svelte index 6558dc4..95cf424 100644 --- a/src/lib/components/ui/avatar/avatar-image.svelte +++ b/src/lib/components/ui/avatar/avatar-image.svelte @@ -1,18 +1,18 @@ diff --git a/src/lib/components/ui/avatar/avatar.svelte b/src/lib/components/ui/avatar/avatar.svelte index ba1379b..6f59cd6 100644 --- a/src/lib/components/ui/avatar/avatar.svelte +++ b/src/lib/components/ui/avatar/avatar.svelte @@ -1,17 +1,17 @@ diff --git a/src/lib/components/ui/avatar/index.ts b/src/lib/components/ui/avatar/index.ts index d06457b..9585f8a 100644 --- a/src/lib/components/ui/avatar/index.ts +++ b/src/lib/components/ui/avatar/index.ts @@ -1,6 +1,6 @@ -import Root from "./avatar.svelte"; -import Image from "./avatar-image.svelte"; -import Fallback from "./avatar-fallback.svelte"; +import Root from './avatar.svelte'; +import Image from './avatar-image.svelte'; +import Fallback from './avatar-fallback.svelte'; export { Root, @@ -9,5 +9,5 @@ export { // Root as Avatar, Image as AvatarImage, - Fallback as AvatarFallback, + Fallback as AvatarFallback }; diff --git a/src/lib/components/ui/badge/badge.svelte b/src/lib/components/ui/badge/badge.svelte index e8817f4..ba65f8c 100644 --- a/src/lib/components/ui/badge/badge.svelte +++ b/src/lib/components/ui/badge/badge.svelte @@ -1,15 +1,15 @@ ["variant"]; +export type Variant = VariantProps['variant']; diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-ellipsis.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-ellipsis.svelte index e130975..1aad3bb 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-ellipsis.svelte @@ -1,14 +1,14 @@ @@ -16,7 +16,7 @@ bind:this={el} role="presentation" aria-hidden="true" - class={cn("flex h-9 w-9 items-center justify-center", className)} + class={cn('flex h-9 w-9 items-center justify-center', className)} {...$$restProps} > diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte index 8e8b187..ca5edc1 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-item.svelte @@ -1,16 +1,16 @@ -
  • +
  • diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte index e743768..27e6ecd 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-link.svelte @@ -1,24 +1,24 @@ diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte index 7f36141..e8b586a 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-list.svelte @@ -1,20 +1,20 @@
      - import type { HTMLAttributes } from "svelte/elements"; - import { cn } from "$lib/utils.js"; + import type { HTMLAttributes } from 'svelte/elements'; + import { cn } from '$lib/utils.js'; type $$Props = HTMLAttributes & { el?: HTMLSpanElement; }; - export let el: $$Props["el"] = undefined; - export let className: $$Props["class"] = undefined; + export let el: $$Props['el'] = undefined; + export let className: $$Props['class'] = undefined; export { className as class }; @@ -16,7 +16,7 @@ role="link" aria-disabled="true" aria-current="page" - class={cn("font-normal text-foreground", className)} + class={cn('font-normal text-foreground', className)} {...$$restProps} > diff --git a/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte b/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte index 8af2187..2717ebf 100644 --- a/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte +++ b/src/lib/components/ui/breadcrumb/breadcrumb-separator.svelte @@ -1,21 +1,21 @@