diff --git a/static/components/relay-details/relay-details.html b/static/components/relay-details/relay-details.html index 827b545..af14561 100644 --- a/static/components/relay-details/relay-details.html +++ b/static/components/relay-details/relay-details.html @@ -7,25 +7,54 @@ -
-
- Update Relay +
+
+
Name:
+
+ +
+
-
- Delete Relay +
+
Description:
+
+ +
+
+
+
+
Relay Public Key:
+
+ +
+
+
+
+
Contact:
+
+ +
+
@@ -39,4 +68,25 @@ qqq +
+
+ Update Relay +
+
+ Delete Relay +
+
diff --git a/static/components/relay-details/relay-details.js b/static/components/relay-details/relay-details.js index 19df2b6..d3c2d72 100644 --- a/static/components/relay-details/relay-details.js +++ b/static/components/relay-details/relay-details.js @@ -8,6 +8,7 @@ async function relayDetails(path) { data: function () { return { tab: 'info', + relay: null, formDialogItem: { show: false, data: { @@ -40,9 +41,23 @@ async function relayDetails(path) { LNbits.utils.notifyApiError(error) } }) + }, + getRelay: async function () { + try { + const {data} = await LNbits.api.request( + 'GET', + '/nostrrelay/api/v1/relay/' + this.relayId, + this.inkey + ) + this.relay = data + } catch (error) { + LNbits.utils.notifyApiError(error) + } } }, - created: async function () {} + created: async function () { + await this.getRelay() + } }) }