diff --git a/app/index.html b/app/index.html index f4a8c0a..6019fef 100644 --- a/app/index.html +++ b/app/index.html @@ -168,6 +168,7 @@

Let's verify your domain

+
-

Upload this file

FILENAME
-
...loading
+
...loading

CONTENTS
-
...loading
+
...loading

To this location

-
..loading
+
..loading

Set this DNS Record

Hostname
-
loading...
+
loading...
TXT Host
-
loading...
+
loading...
TXT Value
-
loading...
+
loading...
+
+
-

Verify Wildcard Domains

- - - - - - - - - - - - - - - - -
HostnameTXT HostTXT Value
example.com_acme-challenge.example.com4A54
+
+

Set this DNS Record

+
Hostname
+
loading...
+
TXT Host
+
loading...
+
TXT Value
+
loading...
+
diff --git a/app/js/app.js b/app/js/app.js index 725c629..af0b500 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -351,23 +351,27 @@ if (claim.wildcard) { obj.wildcard.push(data); + let verification = $qs(".js-acme-verification-wildcard"); + verification.querySelector(".js-acme-ver-hostname").innerHTML = data.hostname; + verification.querySelector(".js-acme-ver-txt-host").innerHTML = data.dnsHost; + verification.querySelector(".js-acme-ver-txt-value").innerHTML = data.dnsAnswer; - $qs(map.wildcard).innerHTML += '' + data.hostname + '' + data.dnsHost + '' + data.dnsAnswer + ''; } else if(obj[data.type]) { obj[data.type].push(data); if ('dns-01' === data.type) { - $qs("#js-acme-ver-hostname").innerHTML = data.hostname; - $qs("#js-acme-ver-txt-host").innerHTML = data.dnsHost; - $qs("#js-acme-ver-txt-value").innerHTML = data.dnsAnswer; + let verification = $qs(".js-acme-verification-dns-01"); + verification.querySelector(".js-acme-ver-hostname").innerHTML = data.hostname; + verification.querySelector(".js-acme-ver-txt-host").innerHTML = data.dnsHost; + verification.querySelector(".js-acme-ver-txt-value").innerHTML = data.dnsAnswer; } else if ('http-01' === data.type) { - $qs("#js-acme-ver-file-location").innerHTML = data.httpPath.split("/").slice(-1); - $qs("#js-acme-ver-content").innerHTML = data.httpAuth; - $qs("#js-acme-ver-uri").innerHTML = data.httpPath; - $qs("#js-download-verify-link").href = + $qs(".js-acme-ver-file-location").innerHTML = data.httpPath.split("/").slice(-1); + $qs(".js-acme-ver-content").innerHTML = data.httpAuth; + $qs(".js-acme-ver-uri").innerHTML = data.httpPath; + $qs(".js-download-verify-link").href = "data:text/octet-stream;base64," + window.btoa(data.httpAuth); - $qs("#js-download-verify-link").download = data.httpPath.split("/").slice(-1); + $qs(".js-download-verify-link").download = data.httpPath.split("/").slice(-1); } } @@ -379,7 +383,7 @@ // hide wildcard if no wildcard // hide http-01 and dns-01 if only wildcard if (!obj.wildcard.length) { - $qs('.js-acme-wildcard').hidden = true; + $qs('.js-acme-wildcard-challenges').hidden = true; } if (!obj['http-01'].length) { $qs('.js-acme-challenges').hidden = true;