From b1c86a0cf845e355f0b6a3fbbc57b3934f1b1b9e Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 22 Jun 2017 18:23:47 +0200 Subject: [PATCH] handle messages --- _src/_assets/javascripts/page-getstarted.js | 3 +++ _src/_assets/styles/_page-getstarted.scss | 1 + _src/start.html | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/_src/_assets/javascripts/page-getstarted.js b/_src/_assets/javascripts/page-getstarted.js index 4619b04..d23f797 100644 --- a/_src/_assets/javascripts/page-getstarted.js +++ b/_src/_assets/javascripts/page-getstarted.js @@ -46,6 +46,8 @@ window.addEventListener('DOMContentLoaded', function domload(event){ const waiting = document.getElementsByClassName('waiting')[0] const response = document.getElementsByClassName('response')[0] const output = document.getElementsByClassName('output')[0] + const messageSuccess = document.getElementsByClassName('message--success')[0] + const messageFail = document.getElementsByClassName('message--fail')[0] conn.postTransaction(txSigned) .then(() => { @@ -59,6 +61,7 @@ window.addEventListener('DOMContentLoaded', function domload(event){ waiting.classList.add('hide') response.classList.remove('hide') + messageFail.classList.remove('hide') const outputContent = reason.status + ' ' + reason.statusText output.textContent = outputContent diff --git a/_src/_assets/styles/_page-getstarted.scss b/_src/_assets/styles/_page-getstarted.scss index 6e2eb1a..8a1c52a 100644 --- a/_src/_assets/styles/_page-getstarted.scss +++ b/_src/_assets/styles/_page-getstarted.scss @@ -18,6 +18,7 @@ .response { pre { + min-height: 254px; border: 1px solid $gray-dark; background: none; } diff --git a/_src/start.html b/_src/start.html index 63f4b93..503f8a5 100644 --- a/_src/start.html +++ b/_src/start.html @@ -26,7 +26,7 @@ redirect_from:

-

+

A transaction can contain a digital asset along with a message. Type something to be sent along the asset.

Off you go @@ -52,7 +52,9 @@ redirect_from: ... -

Nicely done! You have just created an asset, sent it along in a signed transaction and retrieved the result of that transaction. Phew.

+ +

Nicely done! You have just created an asset, sent it along in a signed transaction and retrieved the result of that transaction. Phew.

+

Shenanigans! Something's off. Would you mind trying again?