clear error message
This commit is contained in:
parent
809c14f91f
commit
4db9a8d53d
|
@ -99,12 +99,13 @@ function init() {
|
||||||
return resp.json().then(function (data) {
|
return resp.json().then(function (data) {
|
||||||
console.log('Data:');
|
console.log('Data:');
|
||||||
console.log(data);
|
console.log(data);
|
||||||
|
document.querySelector('body').hidden = false;
|
||||||
if (data.error) {
|
if (data.error) {
|
||||||
document.querySelector('.js-error').hidden = false;
|
document.querySelector('.js-error').hidden = false;
|
||||||
document.querySelector('.js-magic-link').innerText = magic;
|
document.querySelector('.js-magic-link').innerText = magic;
|
||||||
|
window.alert("Something went wrong. Perhaps an bad or expired link.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
document.querySelector('body').hidden = false;
|
|
||||||
document.querySelector('.js-magic').hidden = false;
|
document.querySelector('.js-magic').hidden = false;
|
||||||
document.querySelector('.js-hostname').innerText = data.hostname || 'Device';
|
document.querySelector('.js-hostname').innerText = data.hostname || 'Device';
|
||||||
//document.querySelector('.js-token-data').innerText = JSON.stringify(data, null, 2);
|
//document.querySelector('.js-token-data').innerText = JSON.stringify(data, null, 2);
|
||||||
|
|
Loading…
Reference in New Issue