-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
245 lines (220 loc) · 10.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
<title>Infinity Mining Pool</title>
<!-- vendor css -->
<link href="lib/font-awesome/css/font-awesome.css" rel="stylesheet">
<link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="lib/Ionicons/css/ionicons.css" rel="stylesheet">
<link href="lib/chartist/css/chartist.css" rel="stylesheet">
<link href="lib/chartist/css/chartist-plugin-tooltip.css" rel="stylesheet">
<link href="lib/jquery-toggles/css/toggles-full.css" rel="stylesheet">
<link href="lib/select2/css/select2.min.css" rel="stylesheet">
<!-- Slim CSS -->
<link rel="stylesheet" href="themes/slim.css">
<link rel="stylesheet" href="themes/slim.one.css">
<!-- script files -->
<script src="lib/jquery/js/jquery.js"></script>
<script src="lib/popper.js/js/popper.js"></script>
<script src="lib/bootstrap/js/bootstrap.js"></script>
<script src="lib/jquery.cookie/js/jquery.cookie.js"></script>
<script src="lib/jquery.timeago/js/jquery.timeago.js"></script>
<script src="lib/select2/js/select2.full.min.js"></script>
<script src="lib/moment/js/moment.js"></script>
<script src="lib/chart.js/js/Chart.js"></script>
<script src="lib/chartist/js/chartist.js"></script>
<script src="lib/chartist/js/chartist-plugin-tooltip.min.js"></script>
<script src="lib/jquery.sparkline.bower/js/jquery.sparkline.min.js"></script>
<script src="lib/jquery-toggles/js/toggles.min.js"></script>
<script src="js/ResizeSensor.js"></script>
<script src="js/slim.js"></script>
</head>
<body>
<div class="slim-header">
<div class="container">
<div class="slim-header-left">
<img src="img/logo.png" width="48" height="58">
<div class="logoText">
<h2 class="slim-logo"><a href="index.html"><span>XUNI POOL</span></a></h2>
</div>
</div><!-- slim-header-left -->
<div class="slim-header-right">
<div id="section"><span id="statsUpdated"><span tkey="statsUpdated">Stats Updated</span> <i class="fa fa-bolt"></i></span></div>
<div id="langSelector">
<select id="newLang" class="form-control input-bg-purple-dark">
<option value="en" selected="selected">English</option>
<option value="es">Español</option>
<option value="fr">Français</option>
<option value="it">Italiano</option>
<option value="ru">Русский</option>
<option value="ca">Català</option>
<option value="ko">한국어</option>
</select>
</div>
</div><!-- header-right -->
</div><!-- container -->
</div><!-- slim-header -->
<div class="slim-navbar">
<div class="container">
<ul class="nav">
<li class="nav-item active">
<a class="nav-link hot_link" data-page="home.html" href="#">
<i class="icon ion-ios-home-outline"></i>
<span tkey="dashboard">Dashboard</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link hot_link" data-page="worker_stats.html" href="#worker_stats">
<i class="icon ion-ios-filing-outline"></i>
<span tkey="yourStats">Worker Stats</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link hot_link" data-page="pool_blocks.html" href="#pool_blocks">
<i class="icon ion-ios-book-outline"></i>
<span tkey="poolBlocks">Blocks</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link hot_link" data-page="payments.html" href="#payments">
<i class="icon ion-ios-gear-outline"></i>
<span tkey="payments">PAYMENTS</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link hot_link" data-page="top10miners.html" href="#top10miners">
<i class="icon ion-ios-chatboxes-outline"></i>
<span tkey="top10miners">TOP 10</span>
</a>
</li>
<li class="nav-item with-sub">
<a class="nav-link" href="#" data-toggle="dropdown">
<i class="icon ion-ios-analytics-outline"></i>
<span tkey="resources">RESOURCES</span>
</a>
<div class="sub-item">
<ul>
<li><a class="hot_link text-white" data-page="getting_started.html" href="#getting_started"><i class="fa fa-rocket icon-dropdown"></i><span tkey="gettingStarted">Getting started</span></a></li>
<li><a class="hot_link text-white" data-page="market.html" href="#market"><i class="fa fa-bank icon-dropdown"></i><span tkey="market">Market / Calculator</span></a></li>
<li><a class="hot_link text-white" data-page="settings.html" href="#settings"><i class="fa fa-gears icon-dropdown"></i><span tkey="settings">Settings</span></a></li>
<li><a class="hot_link text-white" data-page="faq.html" href="#faq"><i class="fa fa-comments icon-dropdown"></i><span tkey="faq">FAQ</span></a></li>
<li><a class="hot_link text-white" href="https://discord.gg/AZUqESk"><i class="fa fa-ticket icon-dropdown"></i><span tkey="discord">Discord</span></a></li>
</ul>
</div><!-- dropdown-menu -->
</li>
</ul>
</div><!-- container -->
</div><!-- slim-navbar -->
<div id="page-wrapper">
<div class="slim-mainpanel" id="page">
<p id="loading" class="text-center"><i class="fa fa-circle-o-notch fa-spin"></i></p>
</div><!-- slim-mainpanel -->
</div>
<div class="bg-purple-dark" id="poolFooter">
<div class="container">
<p>Copyright 2022 © All Rights Reserved. UltraNote Infinity</p>
</div><!-- container -->
</div><!-- slim-footer -->
<!-- Javascript -->
<script src="config.js"></script>
<script src="lang/languages.js"></script>
<script src="js/common.js"></script>
<script src="js/custom.js"></script>
<script>
// Store last pool statistics
var lastStats;
$('.select2').select2({
containerCssClass: 'select2-dark',
dropdownCssClass: 'select2-dark',
minimumResultsForSearch: Infinity
});
// Get current miner address
function getCurrentAddress() {
var urlWalletAddress = location.search.split('wallet=')[1] || 0;
var address = urlWalletAddress || docCookies.getItem('mining_address');
return address;
}
// Pulse live update
function pulseLiveUpdate(){
var stats_update = document.getElementById('statsUpdated');
// stats_update.style.transition = 'opacity 100ms ease-out';
// stats_update.style.opacity = 1;
setTimeout(function(){
// stats_update.style.transition = 'opacity 7000ms linear';
// stats_update.style.opacity = 0;
}, 500);
}
// Update live informations
function updateLiveStats(data) {
pulseLiveUpdate();
lastStats = data;
if (lastStats && lastStats.pool && lastStats.pool.totalMinersPaid.toString() == '-1'){
lastStats.pool.totalMinersPaid = 0;
}
updateIndex();
if (currentPage) currentPage.update();
}
// Update global informations
function updateIndex(){
updateText('coinSymbol', lastStats.config.symbol);
updateText('g_networkHashrate', getReadableHashRateString(lastStats.network.difficulty / lastStats.config.coinDifficultyTarget) + '/sec');
updateText('g_poolHashrate', getReadableHashRateString(lastStats.pool.hashrate) + '/sec');
if (lastStats.miner && lastStats.miner.hashrate){
updateText('g_userHashrate', getReadableHashRateString(lastStats.miner.hashrate) + '/sec');
}
else{
updateText('g_userHashrate', 'N/A');
}
updateText('poolVersion', lastStats.config.version);
}
// Load live statistics
function loadLiveStats(reload) {
var apiURL = api + '/stats';
var address = getCurrentAddress();
if (address) { apiURL = apiURL + '?address=' + encodeURIComponent(address); }
if (xhrLiveStats) xhrLiveStats.abort();
$.get(apiURL, function(data){
updateLiveStats(data);
if (!reload) routePage(fetchLiveStats);
});
}
// Fetch live statistics
var xhrLiveStats;
function fetchLiveStats() {
var apiURL = api + '/live_stats';
var address = getCurrentAddress();
if (address) { apiURL = apiURL + '?address=' + encodeURIComponent(address); }
xhrLiveStats = $.ajax({
url: apiURL,
dataType: 'json',
cache: 'false'
}).done(function(data){
updateLiveStats(data);
}).always(function(){
fetchLiveStats();
});
}
// Initialize
$(function(){
// Add support informations to menu
if (typeof telegram !== 'undefined' && telegram) {
$('#menu-content').append('<li><a target="_new" href="'+telegram+'"><i class="fa fa-telegram"></i> <span tkey="telegram">Telegram group</span></a></li>');
}
if (typeof discord !== 'undefined' && discord) {
$('#menu-content').append('<li><a target="_new" href="'+discord+'"><i class="fa fa-ticket"></i> <span tkey="discord">Discord</span></a></li>');
}
if (typeof email !== 'undefined' && email) {
$('#menu-content').append('<li><a target="_new" href="mailto:'+email+'"><i class="fa fa-envelope"></i> <span tkey="contactUs">Contact Us</span></a></li>');
}
if (typeof langs !== 'undefined' && langs) {
$('#menu-content').append('<div id="mLangSelector"></div>');
renderLangSelector();
}
// Load live statistics for the first time
loadLiveStats();
});
</script>
</body>
</html>