Toast Implementation (WIP) #33
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
<link rel="stylesheet" href="./assets/styles/buttons.css">
|
<link rel="stylesheet" href="./assets/styles/buttons.css">
|
||||||
<link rel="stylesheet" href="./assets/styles/style.css">
|
<link rel="stylesheet" href="./assets/styles/style.css">
|
||||||
<link rel="stylesheet" href="./assets/styles/forms.css">
|
<link rel="stylesheet" href="./assets/styles/forms.css">
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/components/button.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fomantic-ui@2.7.8/dist/components/transition.min.css">
|
||||||
<!-- Insert this line above script imports -->
|
<!-- Insert this line above script imports -->
|
||||||
<script>
|
<script>
|
||||||
if (typeof module === 'object') {
|
if (typeof module === 'object') {
|
||||||
@@ -50,9 +50,7 @@
|
|||||||
<script src="./assets/scripts/jquery.qrcode.min.js"></script>
|
<script src="./assets/scripts/jquery.qrcode.min.js"></script>
|
||||||
<script src="./assets/scripts/all.min.js"></script>
|
<script src="./assets/scripts/all.min.js"></script>
|
||||||
<script src="./assets/scripts/Chart.js"></script>
|
<script src="./assets/scripts/Chart.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/fomantic-ui@2.7.8/dist/semantic.min.js"></script>
|
||||||
<!-- ethoFS Js -->
|
|
||||||
<!--<script src="assets/dashboard/plugins/bootstrap-select/js/bootstrap-select.js"></script>-->
|
|
||||||
<script src="assets/dashboard/plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
|
<script src="assets/dashboard/plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
|
||||||
<script src="assets/dashboard/plugins/node-waves/waves.js"></script>
|
<script src="assets/dashboard/plugins/node-waves/waves.js"></script>
|
||||||
<script src="assets/dashboard/plugins/jquery-countto/jquery.countTo.js"></script>
|
<script src="assets/dashboard/plugins/jquery-countto/jquery.countTo.js"></script>
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
// In renderer process (web page).
|
// In renderer process (web page).
|
||||||
const {ipcRenderer} = require("electron");
|
const {
|
||||||
|
ipcRenderer
|
||||||
|
} = require("electron");
|
||||||
var web3;
|
var web3;
|
||||||
|
|
||||||
// Set the provider you want from Web3.providers
|
// Set the provider you want from Web3.providers
|
||||||
SyncProgress = new ProgressBar.Line("#syncProgress", {
|
SyncProgress = new ProgressBar.Line("#syncProgress", {
|
||||||
strokeWidth: 6,
|
strokeWidth: 6,
|
||||||
@@ -58,6 +61,12 @@ function StartSyncProcess() {
|
|||||||
if (!EthoTransactions.getIsSyncing()) {
|
if (!EthoTransactions.getIsSyncing()) {
|
||||||
SyncProgress.animate(1);
|
SyncProgress.animate(1);
|
||||||
SyncProgress.setText(vsprintf("%d/%d (100%%)", [localBlock.number, localBlock.number]));
|
SyncProgress.setText(vsprintf("%d/%d (100%%)", [localBlock.number, localBlock.number]));
|
||||||
|
(function($, _M) {
|
||||||
|
M.toast({
|
||||||
|
html: 'Your Node is still syncing please do not attempt to use the wallet.',
|
||||||
|
displayLength: 10000
|
||||||
|
});
|
||||||
|
}(jQuery, M));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (alreadyCatchedUp == false) {
|
if (alreadyCatchedUp == false) {
|
||||||
@@ -73,6 +82,12 @@ function StartSyncProcess() {
|
|||||||
|
|
||||||
// signal that the sync is complete
|
// signal that the sync is complete
|
||||||
$(document).trigger("onSyncComplete");
|
$(document).trigger("onSyncComplete");
|
||||||
|
(function($, _M) {
|
||||||
|
M.toast({
|
||||||
|
html: 'Your Node is fully synced and operational.',
|
||||||
|
displayLength: 40000
|
||||||
|
});
|
||||||
|
}(jQuery, M));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -95,6 +110,7 @@ function StartSyncProcess() {
|
|||||||
}
|
}
|
||||||
}).on("changed", function(isSyncing) {
|
}).on("changed", function(isSyncing) {
|
||||||
if (isSyncing) {
|
if (isSyncing) {
|
||||||
|
|
||||||
nodeSyncInterval = setInterval(function() {
|
nodeSyncInterval = setInterval(function() {
|
||||||
web3Local.eth.isSyncing(function(error, sync) {
|
web3Local.eth.isSyncing(function(error, sync) {
|
||||||
if (!error && sync) {
|
if (!error && sync) {
|
||||||
|
|||||||
Reference in New Issue
Block a user