Rewised domains interface a lot.
This commit is contained in:
+12
-4
@@ -107,15 +107,13 @@ function addMyDomain(name, timestamp, data) {
|
||||
}
|
||||
|
||||
function refreshMyDomains() {
|
||||
var edit_icon = '<svg viewBox="0 0 24 24" class="tag-button" onclick="editDomain(\'{domain}\');"><path d="M21.04 12.13C21.18 12.13 21.31 12.19 21.42 12.3L22.7 13.58C22.92 13.79 22.92 14.14 22.7 14.35L21.7 15.35L19.65 13.3L20.65 12.3C20.76 12.19 20.9 12.13 21.04 12.13M19.07 13.88L21.12 15.93L15.06 22H13V19.94L19.07 13.88M11 19L9 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H9.18C9.6 1.84 10.7 1 12 1C13.3 1 14.4 1.84 14.82 3H19C20.1 3 21 3.9 21 5V9L19 11V5H17V7H7V5H5V19H11M12 3C11.45 3 11 3.45 11 4C11 4.55 11.45 5 12 5C12.55 5 13 4.55 13 4C13 3.45 12.55 3 12 3Z"></path></svg>';
|
||||
var card = '<div class="card is-inline-block"><div class="card-content p-3"><div class="content is-small"><h3>{title}</h3><div class="tags">{tags}{edit}</div></div></div></div>';
|
||||
var card = '<div class="card is-clickable is-inline-block" onclick="editDomain(\'{domain}\');"><div class="card-content p-3"><div class="content is-small"><h3>{title}</h3><div class="tags">{tags}</div></div></div></div>';
|
||||
var tag = '<span class="tag" title="{ip}">{domain}</span>';
|
||||
var cards = "";
|
||||
myDomains.forEach(function(value, index, array) {
|
||||
var title = value.name;
|
||||
var domain_data = JSON.parse(value.data);
|
||||
var tags = "";
|
||||
var edit = edit_icon.replace("{domain}", title);
|
||||
domain_data.records.forEach(function(v, i, a) {
|
||||
if (typeof v.domain !== 'undefined') {
|
||||
var buf = tag.replace("{domain}", v.domain);
|
||||
@@ -127,7 +125,7 @@ function refreshMyDomains() {
|
||||
tags = tags + buf;
|
||||
}
|
||||
});
|
||||
cards = cards + card.replace("{title}", title).replace("{tags}", tags).replace("{edit}", edit);
|
||||
cards = cards + card.replace("{title}", title).replace("{domain}", title).replace("{tags}", tags);
|
||||
});
|
||||
document.getElementById("my_domains").innerHTML = cards;
|
||||
}
|
||||
@@ -146,6 +144,7 @@ function editDomain(domain) {
|
||||
document.getElementById("new_domain").value = title.replace("." + domain_data.zone, "");
|
||||
changeZone(domain_data.zone);
|
||||
refreshRecordsList();
|
||||
showNewDomainDialog();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -214,6 +213,14 @@ function recordOkay(okay) {
|
||||
}
|
||||
}
|
||||
|
||||
function showNewDomainDialog() {
|
||||
document.getElementById("new_domain_dialog").className = "modal is-active";
|
||||
}
|
||||
|
||||
function closeDialog(name) {
|
||||
document.getElementById(name).className = "modal";
|
||||
}
|
||||
|
||||
function createDomain() {
|
||||
if (typeof currentZone == 'undefined') {
|
||||
showWarning("Select a domain zone first");
|
||||
@@ -234,6 +241,7 @@ function createDomain() {
|
||||
function domainMiningStarted() {
|
||||
//recordsBuffer = [];
|
||||
//refreshRecordsList();
|
||||
document.getElementById("new_domain_dialog").className = "modal";
|
||||
document.getElementById("tab_domains").disabled = true;
|
||||
document.getElementById("domain_records").disabled = true;
|
||||
document.getElementById("add_record_button").disabled = true;
|
||||
|
||||
Reference in New Issue
Block a user