mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-01 23:07:25 -04:00
Wizard redesign
This commit is contained in:
20
js/Utils.js
20
js/Utils.js
@@ -87,3 +87,23 @@ function ago(epoch) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function netTypeToString(){
|
||||
// 0: mainnet, 1: testnet, 2: stagenet
|
||||
var nettype = appWindow.persistentSettings.nettype;
|
||||
return nettype == 1 ? qsTr("Testnet") : nettype == 2 ? qsTr("Stagenet") : qsTr("Mainnet");
|
||||
}
|
||||
|
||||
function randomChoice(arr){
|
||||
return arr[Math.floor(Math.random() * arr.length)];
|
||||
}
|
||||
|
||||
function filterNodes(nodes, port) {
|
||||
if(typeof data === 'number')
|
||||
port = port.toString();
|
||||
return nodes.filter(function(_){return _.indexOf(port) !== -1});
|
||||
}
|
||||
|
||||
function epoch(){
|
||||
return Math.floor((new Date).getTime()/1000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user