Fixed parsing of DomainData, many other fixes.

This commit is contained in:
Revertron
2021-04-11 17:50:55 +02:00
parent 514c49307a
commit 92209689d6
9 changed files with 112 additions and 41 deletions
+1 -1
View File
@@ -68,7 +68,7 @@
<div class="buttons has-addons">
<button class="button is-info is-light" onclick="loadKey();" title="Load keypair from file">Load key</button>
<button class="button is-info is-light" id="save_key" onclick="saveKey();" disabled title="Save current keypair to file">Save key</button>
<button class="button is-info" onclick="createKey();" title="Generate new keypair, suitable to mine domains">Mine new key</button>
<button class="button is-info" id="new_key_button" onclick="createKey();" title="Generate new keypair, suitable to mine domains">Mine new key</button>
</div>
</div>
<p class="help">To mine domains (or zones) you need to mine a strong pair of keys.</p>
+18 -6
View File
@@ -159,20 +159,26 @@ function recordOkay(okay) {
function createDomain() {
var new_domain = document.getElementById("new_domain").value.toLowerCase();
var new_dom_records = JSON.stringify(recordsBuffer);
var domain = new_domain + "." + currentZone.name;
var data = {};
data.domain = [];
data.domain = "";
data.zone = currentZone.name;
data.records = new_dom_records;
data.records = recordsBuffer;
data.owners = []; // TODO make a dialog to fill them
data.contacts = []; // TODO make a dialog to fill them
external.invoke(JSON.stringify({cmd: 'mineDomain', name: domain, records: new_dom_records}));
data = JSON.stringify(data);
external.invoke(JSON.stringify({cmd: 'mineDomain', name: domain, data: data}));
}
function domainMiningStarted() {
recordsBuffer = [];
refreshRecordsList();
//recordsBuffer = [];
//refreshRecordsList();
document.getElementById("tab_domains").disabled = true;
document.getElementById("domain_records").disabled = true;
document.getElementById("add_record_button").disabled = true;
document.getElementById("new_domain_button").disabled = true;
document.getElementById("new_zone_button").disabled = true;
document.getElementById("new_key_button").disabled = true;
}
function createZone() {
@@ -309,6 +315,12 @@ function showMiningIndicator(visible, blue) {
} else {
indicator.className = 'busy_indicator is-hidden';
parent.style.display = 'none';
document.getElementById("tab_domains").disabled = false;
document.getElementById("domain_records").disabled = false;
document.getElementById("add_record_button").disabled = false;
document.getElementById("new_domain_button").disabled = false;
document.getElementById("new_zone_button").disabled = false;
document.getElementById("new_key_button").disabled = false;
}
}
+5 -1
View File
@@ -59,7 +59,7 @@ body {
.notification.is-success {
position: absolute;
bottom: 10pt;
bottom: 30pt;
right: 10pt;
}
@@ -81,4 +81,8 @@ path {
.is-danger > span.icon > svg > path {
fill: #f14668;
}
.is-danger:hover > span.icon > svg > path {
fill: #ffffff;
}