+ added toast messages
+ transaction sent message + copy address to clipboard
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user