mirror of
https://github.com/bigchaindb/site.git
synced 2025-01-11 13:33:47 +01:00
handle messages
This commit is contained in:
parent
6133c9ac4b
commit
b1c86a0cf8
@ -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
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
.response {
|
||||
pre {
|
||||
min-height: 254px;
|
||||
border: 1px solid $gray-dark;
|
||||
background: none;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ redirect_from:
|
||||
<input id="message" class="form-control" type="text" name="message" required>
|
||||
<label class="form-label" for="message">Message</label>
|
||||
</p>
|
||||
<p class="form-group">
|
||||
<p class="form-group message">
|
||||
A transaction can contain a digital asset along with a message. Type something to be sent along the asset.
|
||||
</p>
|
||||
<a class="btn btn-primary" id="post" href="#">Off you go</a>
|
||||
@ -52,7 +52,9 @@ redirect_from:
|
||||
...</code>
|
||||
</pre>
|
||||
</div>
|
||||
<p class="hide">Nicely done! You have just created an asset, sent it along in a signed transaction and retrieved the result of that transaction. Phew.</p>
|
||||
|
||||
<p class="message message--success hide">Nicely done! You have just created an asset, sent it along in a signed transaction and retrieved the result of that transaction. Phew.</p>
|
||||
<p class="message message--fail hide">Shenanigans! Something's off. Would you mind trying again?</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user