+ added toast messages

+ transaction sent message
+ copy address to clipboard
This commit is contained in:
Taegus
2018-12-16 20:05:53 +01:00
parent ef8a261d4b
commit c66da997cd
8 changed files with 45 additions and 2 deletions

View File

@@ -49,6 +49,14 @@ class MainGUI {
$("#mainContent").empty();
$("#mainContent").html(template(data));
}
copyToClipboard(text) {
var $temp = $("<input>");
$("body").append($temp);
$temp.val(text).select();
document.execCommand("copy");
$temp.remove();
}
}
$("#mainNavBtnTransactions").click(function() {

View File

@@ -148,7 +148,13 @@ $(document).on("render_send", function() {
},
function(data) {
EthoSend.resetSendForm();
// use the transaction hash
iziToast.success({
title: 'Sent',
message: 'Transaction was succesfully sent to the chain',
position: 'topRight',
timeout: 5000
});
}
);
}

View File

@@ -141,6 +141,17 @@ $(document).on("render_wallets", function() {
}
});
});
$(".btnCopyWalletAddress").off('click').on('click', function() {
EthoMainGUI.copyToClipboard($(this).attr('data-wallet'));
iziToast.success({
title: 'Copied',
message: 'Address was copied to clipboard',
position: 'topRight',
timeout: 2000
});
});
});
// event that tells us that geth is ready and up