diff --git a/src/assets/icons/receive.svg b/src/assets/icons/receive.svg new file mode 100644 index 0000000..828b559 --- /dev/null +++ b/src/assets/icons/receive.svg @@ -0,0 +1,3 @@ + diff --git a/src/components/Activity.tsx b/src/components/Activity.tsx new file mode 100644 index 0000000..d308886 --- /dev/null +++ b/src/components/Activity.tsx @@ -0,0 +1,204 @@ +import send from '~/assets/icons/send.svg'; +import receive from '~/assets/icons/receive.svg'; +import { Card, Hr, LoadingSpinner, SmallAmount, SmallHeader, VStack } from './layout'; +import { For, JSX, Match, Show, Suspense, Switch, createMemo, createResource, createSignal } from 'solid-js'; +import { useMegaStore } from '~/state/megaStore'; +import { MutinyInvoice } from '@mutinywallet/mutiny-wasm'; +import { prettyPrintTime } from '~/utils/prettyPrintTime'; +import { JsonModal } from './JsonModal'; +import mempoolTxUrl from '~/utils/mempoolTxUrl'; + +const THREE_COLUMNS = 'grid grid-cols-[auto,1fr,auto] gap-4 py-2 px-2 border-b border-neutral-800 last:border-b-0' +const CENTER_COLUMN = 'min-w-0 overflow-hidden max-w-full' +const MISSING_LABEL = 'py-1 px-2 bg-m-red rounded inline-block text-sm' +const RIGHT_COLUMN = 'flex flex-col items-right text-right' + +type OnChainTx = { + txid: string + received: number + sent: number + fee?: number + confirmation_time?: { + height: number + timestamp: number + } +} + +type Utxo = { + outpoint: string + txout: { + value: number + script_pubkey: string + } + keychain: string + is_spent: boolean +} + +function SubtleText(props: { children: any }) { + return
No transactions (empty state)
+ No invoices (empty state)
+ No utxos (empty state)
+ X
+
+ {json()}
+
+ {props.children}
+
+
+ +{JSON.stringify(peer, null, 2)})} @@ -102,7 +102,7 @@ function ChannelsList() {No channels}> {(channel) => ( <> - +{JSON.stringify(channel, null, 2)}@@ -182,7 +182,7 @@ function OpenChannel(props: { refetchChannels: RefetchChannelsListType }) {- +{JSON.stringify(newChannel()?.outpoint, null, 2)}{newChannel()?.outpoint}diff --git a/src/components/Sent.tsx b/src/components/Sent.tsx index 64f5e7f..3cc3f89 100644 --- a/src/components/Sent.tsx +++ b/src/components/Sent.tsx @@ -6,7 +6,6 @@ const DIALOG_POSITIONER = "fixed inset-0 z-50 flex items-center justify-center" const DIALOG_CONTENT = "w-[80vw] max-w-[400px] p-4 bg-gray/50 backdrop-blur-md shadow-xl rounded-xl border border-white/10" export function SentModal(props: { details?: { nice: string } }) { - return (diff --git a/src/components/layout/index.tsx b/src/components/layout/index.tsx index e37b095..09ed47f 100644 --- a/src/components/layout/index.tsx +++ b/src/components/layout/index.tsx @@ -4,11 +4,13 @@ import { Button, ButtonLink } from "./Button" import { Separator } from "@kobalte/core" import { useMegaStore } from "~/state/megaStore" -const SmallHeader: ParentComponent = (props) => {props.children} +const SmallHeader: ParentComponent<{ class?: string }> = (props) => { + return{props.children} +} const Card: ParentComponent<{ title?: string }> = (props) => { return ( -+{props.title &&@@ -74,8 +76,8 @@ const NodeManagerGuard: ParentComponent = (props) => { ) } -const LoadingSpinner = () => { - return ({props.title} } {props.children}+const LoadingSpinner = (props: { big?: boolean }) => { + return (