Skip to content

Commit 3d9d2cd

Browse files
committed
socket indicator
1 parent a2f892a commit 3d9d2cd

File tree

3 files changed

+46
-22
lines changed

3 files changed

+46
-22
lines changed

assets_js_bitrequest_monitors.js

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -120,29 +120,31 @@ function get_requeststates(trigger, active_requests) {
120120
getinputs(request_data, d_lay);
121121
return
122122
}
123-
if (trigger === true) {} else { // only update on page refresh
124-
// parse cached transaction data
125-
$.each(requeststates, function(i, value) {
126-
const thislist = $("#" + value.requestid),
127-
thisdata = thislist.data();
128-
if (thisdata) {
129-
const pendingstatus = thisdata.pending;
130-
if (pendingstatus == "scanning" || pendingstatus == "polling") {
131-
const statuspanel = thislist.find(".pmetastatus"),
132-
transactionlist = thislist.find(".transactionlist");
133-
statuspanel.text(value.status);
134-
transactionlist.html("");
135-
$.each(value.transactions, function(data, value) {
136-
const tx_listitem = append_tx_li(value, false);
137-
if (tx_listitem) {
138-
transactionlist.append(tx_listitem.data(value));
139-
}
140-
});
141-
thislist.addClass("pmstatloaded");
142-
}
143-
}
144-
});
123+
if (trigger === true) {
124+
return
145125
}
126+
// Only update on page refresh
127+
// parse cached transaction data
128+
$.each(requeststates, function(i, value) {
129+
const thislist = $("#" + value.requestid),
130+
thisdata = thislist.data();
131+
if (thisdata) {
132+
const pendingstatus = thisdata.pending;
133+
if (pendingstatus == "scanning" || pendingstatus == "polling") {
134+
const statuspanel = thislist.find(".pmetastatus"),
135+
transactionlist = thislist.find(".transactionlist");
136+
statuspanel.text(value.status);
137+
transactionlist.html("");
138+
$.each(value.transactions, function(data, value) {
139+
const tx_listitem = append_tx_li(value, false);
140+
if (tx_listitem) {
141+
transactionlist.append(tx_listitem.data(value));
142+
}
143+
});
144+
thislist.addClass("pmstatloaded");
145+
}
146+
}
147+
});
146148
return
147149
}
148150
active_requests.addClass("scan");

assets_js_bitrequest_sockets.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,10 @@ function socket_info(snode, live) {
12041204
$("#current_socket").html(contents);
12051205
if (live) {
12061206
console.log("Connected: " + snode.url);
1207+
glob_paymentpopup.addClass("live");
1208+
return
12071209
}
1210+
glob_paymentpopup.removeClass("live");
12081211
}
12091212

12101213
function reconnect() {

assets_styles_payments.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,21 @@ html.inframe #paymentdialogbox[data-pending="no"].transacting #view_tx {
205205
margin: 0 0.5em 0 0.5em;
206206
}
207207

208+
@keyframes iconpulse {
209+
0% {
210+
transform: scale(1) rotate(0deg);
211+
}
212+
94% {
213+
transform: scale(1) rotate(0deg);
214+
}
215+
97% {
216+
transform: scale(1.1) rotate(180deg);
217+
}
218+
100% {
219+
transform: scale(1) rotate(360deg);
220+
}
221+
}
222+
208223
@keyframes blob {
209224
50% {
210225
transform: scale(1.3);
@@ -490,6 +505,10 @@ html.inframe #request_back {
490505
-webkit-transform: translate3d(0, 0, 0);
491506
}
492507

508+
#payment.live .qrwrap img.cmc_icon {
509+
animation: iconpulse 10000ms linear infinite;
510+
}
511+
493512
#paymentdialogbox.transacting #rf_wrap {
494513
visibility: hidden;
495514
}

0 commit comments

Comments
 (0)