+ added toast messages
+ transaction sent message + copy address to clipboard
This commit is contained in:
6
assets/scripts/iziToast.min.js
vendored
Normal file
6
assets/scripts/iziToast.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
assets/styles/iziToast.min.css
vendored
Normal file
6
assets/styles/iziToast.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -314,4 +314,8 @@ div.noWalletsWrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btnCopyWalletAddress {
|
||||
margin-right: 10px;
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
<tr>
|
||||
<th scope="row" class="colEdit"><button type="button" class="btn btn-etho btnChangWalletName" data-wallet="{{address}}" data-name="{{name}}">Edit</button></th>
|
||||
<td>{{name}}</td>
|
||||
<td>{{address}}</td>
|
||||
<td><button type="button" class="btn btn-etho btnCopyWalletAddress" data-wallet="{{address}}"><i class="far fa-copy"></i></button><span class="textAddress">{{address}}</span></td>
|
||||
<td>{{balance}}</td>
|
||||
</tr>
|
||||
{{/addressData}}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<link rel="stylesheet" href="./assets/styles/materialize.min.css">
|
||||
<link rel="stylesheet" href="./assets/styles/datatables.min.css">
|
||||
<link rel="stylesheet" href="./assets/styles/iziModal.min.css">
|
||||
<link rel="stylesheet" href="./assets/styles/iziToast.min.css">
|
||||
<link rel="stylesheet" href="./assets/styles/transactions.css">
|
||||
<link rel="stylesheet" href="./assets/styles/please-wait.css">
|
||||
<link rel="stylesheet" href="./assets/styles/all.min.css">
|
||||
@@ -23,6 +24,7 @@
|
||||
<script src="./assets/scripts/materialize.min.js"></script>
|
||||
<script src="./assets/scripts/datatables.min.js"></script>
|
||||
<script src="./assets/scripts/iziModal.min.js"></script>
|
||||
<script src="./assets/scripts/iziToast.min.js"></script>
|
||||
<script src="./assets/scripts/progressbar.min.js"></script>
|
||||
<script src="./assets/scripts/sprintf.min.js"></script>
|
||||
<script src="./assets/scripts/please-wait.js "></script>
|
||||
|
||||
@@ -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