diff --git a/static/components/relay-details/relay-details.html b/static/components/relay-details/relay-details.html index af14561..3f7744a 100644 --- a/static/components/relay-details/relay-details.html +++ b/static/components/relay-details/relay-details.html @@ -59,7 +59,99 @@ - yyyy + + + Require Payment: + + + + + + + + + + Cost to join (sats): + + + + + Free to join + + + + + Cost per Kilo Byte (sats): + + + + + Unlimited storage + + + + + Free storage (kb): + + + + + No free storage + + + + zzz diff --git a/static/components/relay-details/relay-details.js b/static/components/relay-details/relay-details.js index a5e53a2..9f002c0 100644 --- a/static/components/relay-details/relay-details.js +++ b/static/components/relay-details/relay-details.js @@ -4,7 +4,7 @@ async function relayDetails(path) { name: 'relay-details', template, - props: ['relay-id', 'adminkey', 'inkey'], + props: ['relay-id', 'adminkey', 'inkey', 'wallet-options'], data: function () { return { tab: 'info', @@ -54,7 +54,16 @@ async function relayDetails(path) { '/nostrrelay/api/v1/relay/' + this.relayId, this.inkey ) + data.config = { + isPaidRelay: true, + wallet: '', + costToJoin: 0, + freeStorage: 0, + storageCostPerKb: 0 + } this.relay = data + + console.log('### this.relay', this.relay) } catch (error) { LNbits.utils.notifyApiError(error) } @@ -77,6 +86,10 @@ async function relayDetails(path) { } catch (error) { LNbits.utils.notifyApiError(error) } + }, + togglePaidRelay: async function () { + this.relay.config.wallet = + this.relay.config.wallet || this.walletOptions[0].value } }, diff --git a/templates/nostrrelay/index.html b/templates/nostrrelay/index.html index dcc51ea..c001f66 100644 --- a/templates/nostrrelay/index.html +++ b/templates/nostrrelay/index.html @@ -96,6 +96,7 @@ :relay-id="props.row.id" :adminkey="g.user.wallets[0].adminkey" :inkey="g.user.wallets[0].inkey" + :wallet-options="g.user.walletOptions" @relay-deleted="handleRelayDeleted" @relay-updated="handleRelayUpdated" >