diff --git a/src/element/provider/nostr/index.tsx b/src/element/provider/nostr/index.tsx index 174a8a6..84a028a 100644 --- a/src/element/provider/nostr/index.tsx +++ b/src/element/provider/nostr/index.tsx @@ -20,6 +20,8 @@ export default function NostrProviderDialog({ provider, showEndpoints, showEditor, + showBalance, + showEstimate, showForwards, showBalanceHistory, showStreamKeys, @@ -27,6 +29,8 @@ export default function NostrProviderDialog({ }: { provider: NostrStreamProvider; showEndpoints: boolean; + showBalance?: boolean; + showEstimate?: boolean; showEditor: boolean; showForwards: boolean; showBalanceHistory: boolean; @@ -173,25 +177,6 @@ export default function NostrProviderDialog({ )} {ep && } -
-

- -

-
-
- -
- - -
- - - -

@@ -202,6 +187,35 @@ export default function NostrProviderDialog({ ); } + function currentBalance() { + if (!info) return; + return

+

+ +

+
+
+ +
+ + +
+
+ } + + function balanceTimeEstimate() { + if (!info) return; + return
+ + + +
+ } + function streamEditor() { if (!info || !showEditor) return; if (info.tosAccepted === false) { @@ -274,6 +288,8 @@ export default function NostrProviderDialog({ return ( <> {showEndpoints && streamEndpoints()} + {showBalance&& currentBalance()} + {showEstimate && balanceTimeEstimate()} {streamEditor()} {forwardInputs()} {balanceHist()} diff --git a/src/pages/dashboard/balance-history.tsx b/src/pages/dashboard/balance-history.tsx index 6025c6d..7afea7d 100644 --- a/src/pages/dashboard/balance-history.tsx +++ b/src/pages/dashboard/balance-history.tsx @@ -17,8 +17,9 @@ export default function BalanceHistoryModal({ provider }: { provider: NostrStrea diff --git a/src/pages/dashboard/button-settings.tsx b/src/pages/dashboard/button-settings.tsx index 3243efa..cff6fb9 100644 --- a/src/pages/dashboard/button-settings.tsx +++ b/src/pages/dashboard/button-settings.tsx @@ -22,6 +22,8 @@ export function DashboardSettingsButton({ ev }: { ev?: TaggedNostrEvent }) { provider={provider} ev={ev} showEndpoints={true} + showBalance={true} + showEstimate={true} showForwards={true} showEditor={false} showBalanceHistory={false}