chore: tweak dashboard modal displays
This commit is contained in:
parent
cbb745eebe
commit
2e789b222c
@ -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;
|
||||
@ -174,6 +178,18 @@ export default function NostrProviderDialog({
|
||||
)}
|
||||
{ep && <StreamKey ep={ep} />}
|
||||
<div>
|
||||
<p className="pb-2">
|
||||
<FormattedMessage defaultMessage="Features" id="ZXp0z1" />
|
||||
</p>
|
||||
<div className="flex gap-2">{ep?.capabilities?.map(a => <Pill>{parseCapability(a)}</Pill>)}</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function currentBalance() {
|
||||
if (!info) return;
|
||||
return <div>
|
||||
<p>
|
||||
<FormattedMessage defaultMessage="Balance" id="H5+NAX" />
|
||||
</p>
|
||||
@ -188,18 +204,16 @@ export default function NostrProviderDialog({
|
||||
<AccountTopup provider={provider} onFinish={loadInfo} />
|
||||
<AccountWithdrawl provider={provider} onFinish={loadInfo} />
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
function balanceTimeEstimate() {
|
||||
if (!info) return;
|
||||
return <div>
|
||||
<small>
|
||||
<FormattedMessage defaultMessage="About {estimate}" id="Q3au2v" values={{ estimate: calcEstimate() }} />
|
||||
<FormattedMessage defaultMessage="About {estimate}" values={{ estimate: calcEstimate() }} />
|
||||
</small>
|
||||
</div>
|
||||
<div>
|
||||
<p className="pb-2">
|
||||
<FormattedMessage defaultMessage="Features" id="ZXp0z1" />
|
||||
</p>
|
||||
<div className="flex gap-2">{ep?.capabilities?.map(a => <Pill>{parseCapability(a)}</Pill>)}</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function streamEditor() {
|
||||
@ -274,6 +288,8 @@ export default function NostrProviderDialog({
|
||||
return (
|
||||
<>
|
||||
{showEndpoints && streamEndpoints()}
|
||||
{showBalance&& currentBalance()}
|
||||
{showEstimate && balanceTimeEstimate()}
|
||||
{streamEditor()}
|
||||
{forwardInputs()}
|
||||
{balanceHist()}
|
||||
|
@ -17,8 +17,9 @@ export default function BalanceHistoryModal({ provider }: { provider: NostrStrea
|
||||
<NostrProviderDialog
|
||||
provider={provider}
|
||||
showBalanceHistory={true}
|
||||
showBalance={true}
|
||||
showEditor={false}
|
||||
showEndpoints={true}
|
||||
showEndpoints={false}
|
||||
showForwards={false}
|
||||
showStreamKeys={false}
|
||||
/>
|
||||
|
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user