(WIP) First steps to #32
This commit is contained in:
2
assets/dashboard/styles/materialize.min.css
vendored
2
assets/dashboard/styles/materialize.min.css
vendored
@@ -5099,7 +5099,7 @@ small {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn:focus, .btn-large:focus, .btn-small:focus, .btn-floating:focus {
|
.btn:focus, .btn-large:focus, .btn-small:focus, .btn-floating:focus {
|
||||||
background-color: #1d7d74
|
background-color: #c3300f
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn, .btn-large, .btn-small {
|
.btn, .btn-large, .btn-small {
|
||||||
|
|||||||
@@ -1,44 +1,47 @@
|
|||||||
.select-wrapper .caret {
|
.select-wrapper .caret {
|
||||||
fill: #aaa;
|
fill: #aaa;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-dropdown
|
.select-dropdown {
|
||||||
{
|
color: #aaa;
|
||||||
color: #aaa;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-content li>a, .dropdown-content li>span {
|
.dropdown-content li>a, .dropdown-content li>span {
|
||||||
color: rgb(36, 13, 21);
|
color: rgb(36, 13, 21);
|
||||||
}
|
}
|
||||||
|
|
||||||
#sendFeeRange {
|
#sendFeeRange {
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-panel {
|
.card-panel {
|
||||||
background-color: #333
|
background-color: #333
|
||||||
}
|
}
|
||||||
|
|
||||||
.sendWrapper input {
|
.sendWrapper input {
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tableTransactionsForAll .fa-arrow-right {
|
#tableTransactionsForAll .fa-sign-in-alt {
|
||||||
color: red;
|
color: green;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tableTransactionsForAll .fa-sign-out-alt {
|
||||||
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tableTransactionsForAll .fa-arrow-left {
|
#tableTransactionsForAll .fa-arrow-left {
|
||||||
color: #228B22;
|
color: #228B22;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tableTransactionsForAll .fa-arrows-alt-h {
|
#tableTransactionsForAll .fa-arrows-alt-h {
|
||||||
color: #DCDCDC;
|
color: #DCDCDC;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tableTransactionsForAll .fa-question {
|
#tableTransactionsForAll .fa-question {
|
||||||
color: #DCDCDC;
|
color: #DCDCDC;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tableTransactionsForAll .fa-check {
|
#tableTransactionsForAll .fa-check {
|
||||||
color: #228B22;
|
color: #228B22;
|
||||||
}
|
}
|
||||||
|
|||||||
2
assets/styles/materialize.min.css
vendored
2
assets/styles/materialize.min.css
vendored
@@ -4651,7 +4651,7 @@ small {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn:focus, .btn-large:focus, .btn-small:focus, .btn-floating:focus {
|
.btn:focus, .btn-large:focus, .btn-small:focus, .btn-floating:focus {
|
||||||
background-color: #1d7d74
|
background-color: #c3300f
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn, .btn-large, .btn-small {
|
.btn, .btn-large, .btn-small {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<div id="transactionsWrapper">
|
<div id="transactionsWrapper">
|
||||||
<!----<button type="button" class="btn btn-etho" id="btnRefreshTransactions">Refresh</button>-->
|
|
||||||
<table id="tableTransactionsForAll" class="display tableTransactions" style="width:100%">
|
<table id="tableTransactionsForAll" class="display tableTransactions" style="width:100%">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
const {ipcRenderer} = require("electron");
|
const {
|
||||||
|
ipcRenderer
|
||||||
|
} = require("electron");
|
||||||
|
|
||||||
class tableTransactions {
|
class tableTransactions {
|
||||||
constructor() {
|
constructor() {
|
||||||
@@ -9,12 +11,10 @@ class tableTransactions {
|
|||||||
// register the sort datetime format
|
// register the sort datetime format
|
||||||
$.fn.dataTable.moment("MMM Do YYYY HH:mm:ss");
|
$.fn.dataTable.moment("MMM Do YYYY HH:mm:ss");
|
||||||
|
|
||||||
var namesType = $.fn.dataTable.absoluteOrderNumber([
|
var namesType = $.fn.dataTable.absoluteOrderNumber([{
|
||||||
{
|
value: null,
|
||||||
value: null,
|
position: "top"
|
||||||
position: "top"
|
}]);
|
||||||
}
|
|
||||||
]);
|
|
||||||
// render the transactions
|
// render the transactions
|
||||||
$(id).DataTable({
|
$(id).DataTable({
|
||||||
dom: "Bfrtip",
|
dom: "Bfrtip",
|
||||||
@@ -29,61 +29,63 @@ class tableTransactions {
|
|||||||
oSearch: {
|
oSearch: {
|
||||||
sSearch: EthoTransactions.getFilter()
|
sSearch: EthoTransactions.getFilter()
|
||||||
},
|
},
|
||||||
buttons: [
|
buttons: [{
|
||||||
{
|
text: '<i class="fas fa-sync-alt"></i>',
|
||||||
text: '<i class="fas fa-sync-alt"></i>',
|
action: function(e, dt, node, config) {
|
||||||
action: function (e, dt, node, config) {
|
EthoTransactions.renderTransactions();
|
||||||
EthoTransactions.renderTransactions();
|
}
|
||||||
|
}],
|
||||||
|
columnDefs: [{
|
||||||
|
targets: 0,
|
||||||
|
render: function(data, type, row) {
|
||||||
|
if (data == 0) {
|
||||||
|
var AccLogic1 = document.getElementById("txValue");
|
||||||
|
AccLogic1.style.color = "green";
|
||||||
|
return '<i class="fas fa-sign-out-alt"></i>';
|
||||||
|
} else if (data == 1) {
|
||||||
|
var AccLogic1 = document.getElementById("txValue");
|
||||||
|
AccLogic1.style.color = "red";
|
||||||
|
return '<i class="fas fa-sign-in-alt"></i>';
|
||||||
|
} else {
|
||||||
|
var AccLogic1 = document.getElementById("txValue");
|
||||||
|
AccLogic1.style.color = "red";
|
||||||
|
return '<i class="fas fa-sign-in-alt"></i>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
}, {
|
||||||
columnDefs: [
|
className: "transactionsBlockNum",
|
||||||
{
|
type: namesType,
|
||||||
targets: 0,
|
targets: 1
|
||||||
render: function (data, type, row) {
|
}, {
|
||||||
if (data == 0) {
|
targets: 2,
|
||||||
return '<i class="fas fa-arrow-left"></i>';
|
render: function(data, type, row) {
|
||||||
} else if (data == 1) {
|
return moment(data, "YYYY-MM-DD HH:mm:ss").format("MMM Do YYYY HH:mm:ss");
|
||||||
return '<i class="fas fa-arrow-right"></i>';
|
}
|
||||||
} else {
|
}, {
|
||||||
return '<i class="fas fa-arrow-right"></i>';
|
targets: 3,
|
||||||
}
|
visible: false
|
||||||
}
|
}, {
|
||||||
}, {
|
targets: 6,
|
||||||
className: "transactionsBlockNum",
|
render: function(data, type, row) {
|
||||||
type: namesType,
|
return parseFloat(web3Local.utils.fromWei(EthoUtils.toFixed(parseFloat(data)).toString(), "ether")).toFixed(2);
|
||||||
targets: 1
|
}
|
||||||
}, {
|
}, {
|
||||||
targets: 2,
|
targets: 7,
|
||||||
render: function (data, type, row) {
|
defaultContent: "",
|
||||||
return moment(data, "YYYY-MM-DD HH:mm:ss").format("MMM Do YYYY HH:mm:ss");
|
render: function(data, type, row) {
|
||||||
}
|
if (row[1]) {
|
||||||
}, {
|
return '<i class="fas fa-check"></i>';
|
||||||
targets: 3,
|
} else {
|
||||||
visible: false
|
return '<i class="fas fa-times" style="color:red"></i>';
|
||||||
}, {
|
|
||||||
targets: 6,
|
|
||||||
render: function (data, type, row) {
|
|
||||||
return parseFloat(web3Local.utils.fromWei(EthoUtils.toFixed(parseFloat(data)).toString(), "ether")).toFixed(2);
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
targets: 7,
|
|
||||||
defaultContent: "",
|
|
||||||
render: function (data, type, row) {
|
|
||||||
if (row[1]) {
|
|
||||||
return '<i class="fas fa-check"></i>';
|
|
||||||
} else {
|
|
||||||
return '<i class="fas fa-question"></i>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
}],
|
||||||
drawCallback: function (settings) {
|
drawCallback: function(settings) {
|
||||||
$("#loadingTransactionsOverlay").css("display", "none");
|
$("#loadingTransactionsOverlay").css("display", "none");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(id + " tbody").off("click").on("click", "td", function () {
|
$(id + " tbody").off("click").on("click", "td", function() {
|
||||||
if ($(id).DataTable().cell(this).index().column == 1) {
|
if ($(id).DataTable().cell(this).index().column == 1) {
|
||||||
var rowIdx = $(id).DataTable().cell(this).index().row;
|
var rowIdx = $(id).DataTable().cell(this).index().row;
|
||||||
var rowData = $(id).DataTable().rows(rowIdx).data()[0];
|
var rowData = $(id).DataTable().rows(rowIdx).data()[0];
|
||||||
@@ -99,12 +101,12 @@ class tableTransactions {
|
|||||||
$("#txToAddress").attr("href", vsprintf("https://explorer.ether1.org/addr/%s", [rowData[5]]));
|
$("#txToAddress").attr("href", vsprintf("https://explorer.ether1.org/addr/%s", [rowData[5]]));
|
||||||
$("#txValue").html(web3Local.utils.fromWei(EthoUtils.toFixed(parseFloat(rowData[6])).toString(), "ether"));
|
$("#txValue").html(web3Local.utils.fromWei(EthoUtils.toFixed(parseFloat(rowData[6])).toString(), "ether"));
|
||||||
|
|
||||||
$("#dlgTransactionInfo a").off("click").on("click", function (even) {
|
$("#dlgTransactionInfo a").off("click").on("click", function(even) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
ipcRenderer.send("openURL", $(this).attr("href"));
|
ipcRenderer.send("openURL", $(this).attr("href"));
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#btnTxInfoClose").off("click").on("click", function () {
|
$("#btnTxInfoClose").off("click").on("click", function() {
|
||||||
$("#dlgTransactionInfo").iziModal("close");
|
$("#dlgTransactionInfo").iziModal("close");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user