To mine domains you need to mine a strong pair of signing keys and a pair of encryption keys.
-
-
-
+
+
+
+ | Domain |
+ Records |
+ Last mined |
+ Expires |
+
+
+
-
+
+
diff --git a/src/webview/scripts.js b/src/webview/scripts.js
index 16c30e6..6d8eb00 100644
--- a/src/webview/scripts.js
+++ b/src/webview/scripts.js
@@ -119,17 +119,31 @@ function clearMyDomains() {
myDomains = [];
}
-function addMyDomain(name, timestamp, data) {
- myDomains.push({name: name, timestamp: timestamp, data: data});
+function addMyDomain(name, timestamp, expire, data) {
+ myDomains.push({name: name, timestamp: timestamp, expire: expire, data: data});
+}
+
+function formatDate(date) {
+ var month = date.getMonth() + 1;
+ if (month < 10) {
+ month = "0" + month;
+ }
+ var day = date.getDate();
+ if (day < 10) {
+ day = "0" + day;
+ }
+ return "{y}-{m}-{d}".replace("{y}", date.getFullYear()).replace("{m}", month).replace("{d}", day);
}
function refreshMyDomains() {
- var card = '
';
+ var row = '
| {title} | {tags} | {date1} | {date2} |
';
var tag = '
{domain}';
- var cards = "";
+ var rows = "";
myDomains.forEach(function(value, index, array) {
var title = value.name;
var domain_data = JSON.parse(value.data);
+ var start = formatDate(new Date(value.timestamp * 1000));
+ var expire = formatDate(new Date(value.expire * 1000));
var tags = "";
if (typeof domain_data.records !== 'undefined') {
domain_data.records.forEach(function(v, i, a) {
@@ -146,9 +160,9 @@ function refreshMyDomains() {
} else {
tags = tag.replace("{domain}", "No records").replace("{ip}", "");
}
- cards = cards + card.replace("{title}", title).replace("{domain}", title).replace("{tags}", tags);
+ rows = rows + row.replace("{title}", title).replace("{domain}", title).replace("{tags}", tags).replace("{date1}", start).replace("{date2}", expire);
});
- document.getElementById("my_domains").innerHTML = cards;
+ document.getElementById("my_domains").innerHTML = rows;
}
function editDomain(domain, event) {
diff --git a/src/webview/styles.css b/src/webview/styles.css
index 833bba4..ea390b4 100644
--- a/src/webview/styles.css
+++ b/src/webview/styles.css
@@ -114,11 +114,19 @@ body {
margin-right: 0.8rem;
}
+.w100 {
+ width: 100%;
+}
+
+th, td {
+ white-space: nowrap;
+}
+
.list {
overflow-y: auto;
}
-path {
+.icon > svg > path {
fill: #4a4a4a;
}