diff --git a/core/language/us.json b/core/language/us.json index e68d19c9..3bf3b879 100644 --- a/core/language/us.json +++ b/core/language/us.json @@ -1001,7 +1001,8 @@ "nchange33": "Restart Node", "nchange34": "Successfully Sent Restart Request!", "nchange35": "Start Node", - "nchange36": "Successfully Started Node!" + "nchange36": "Successfully Started Node!", + "nchange37": "Clicking on continue will refresh your Qortal Core, your db will be removed, and you will downoad a new copy of the db, called “bootstrapping“." }, "transpage": { "tchange1": "Transaction request", diff --git a/plugins/plugins/core/node-management/node-management.src.js b/plugins/plugins/core/node-management/node-management.src.js index c45514b0..ca128f4c 100644 --- a/plugins/plugins/core/node-management/node-management.src.js +++ b/plugins/plugins/core/node-management/node-management.src.js @@ -154,7 +154,7 @@ class NodeManagement extends LitElement {

${translate("nodepage.nchange1")} ${this.nodeDomain}

- this.bootstrap()}>restart_alt ${translate("tour.tour18")} + this.openBootstrapDialog()}>restart_alt ${translate("tour.tour18")} this.restartNode()}>360 ${translate("nodepage.nchange33")} ${this.renderStartStopButton()}
${translate("nodepage.nchange2")} ${this.upTime}
@@ -244,6 +244,17 @@ class NodeManagement extends LitElement { ${translate("general.close")} + + +
${translate("tour.tour18")}

+
${translate("nodepage.nchange37")}
+ + ${translate("general.continue")} + + + ${translate("login.lp4")} + +
` } @@ -422,47 +433,68 @@ class NodeManagement extends LitElement { if (!isElectron()) { } else { window.parent.electronAPI.startCore() - let startString = get("nodepage.nchange36") - parentEpml.request('showSnackBar', `${startString}`) + let startString = get("nodepage.nchange36") + parentEpml.request('showSnackBar', `${startString}`) + this.upTime = "starting node" } } stopNode() { - parentEpml - .request("apiCall", { - url: `/admin/stop?apiKey=${this.getApiKey()}`, - method: "GET" - }) - .then((res) => { - let snackString = get("nodepage.nchange32") + parentEpml.request("apiCall", { + url: `/admin/stop?apiKey=${this.getApiKey()}`, + method: "GET" + }).then((res) => { + if (res === true) { + let snackString = get("nodepage.nchange32") parentEpml.request('showSnackBar', `${snackString}`) - }) + this.upTime = "offline" + } else { + let snackString = get("walletpage.wchange44") + parentEpml.request('showSnackBar', `${snackString}`) + } + }) } restartNode() { - parentEpml - .request("apiCall", { - url: `/admin/restart?apiKey=${this.getApiKey()}`, - method: "GET" - }) - .then((res) => { - let snackString = get("nodepage.nchange34") + parentEpml.request("apiCall", { + url: `/admin/restart?apiKey=${this.getApiKey()}`, + method: "GET" + }).then((res) => { + if (res === true) { + let snackString = get("nodepage.nchange34") parentEpml.request('showSnackBar', `${snackString}`) - }) + this.upTime = "restarting node" + } else { + let snackString = get("walletpage.wchange44") + parentEpml.request('showSnackBar', `${snackString}`) + } + }) } - bootstrap() { + bootstrapNode() { parentEpml.request("apiCall", { url: `/admin/bootstrap/?apiKey=${this.getApiKey()}`, method: "GET" }).then((res) => { if (res === true) { + this.shadowRoot.getElementById('bootstrapDialog').close() let snackString = get("tour.tour22") parentEpml.request('showSnackBar', `${snackString}`) + } else { + let snackString = get("walletpage.wchange44") + parentEpml.request('showSnackBar', `${snackString}`) } }) } + openBootstrapDialog() { + this.shadowRoot.getElementById('bootstrapDialog').show() + } + + closeBootstrapDialog() { + this.shadowRoot.getElementById('bootstrapDialog').close() + } + async addPeer() { this.addPeerLoading = true const addPeerAddress = this.shadowRoot.getElementById('addPeerAddress').value