1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-19 14:25:14 +03:00
Setup vue with gulp and initial components:

* Status Bar
* Logo
* Battery Legend
This commit is contained in:
Tomas Chmelevskij 2020-10-10 13:31:07 +02:00
parent 14d98c4dea
commit d6cee386e8
27 changed files with 1511 additions and 283 deletions

View file

@ -3,6 +3,8 @@
var PortUsage = {
previous_received: 0,
previous_sent: 0,
port_usage_down: 0,
port_usage_up: 0,
initialize: function() {
var self = this;
@ -18,17 +20,19 @@ var PortUsage = {
this.previous_received = serial.bytesReceived;
this.previous_sent = serial.bytesSent;
this.port_usage_down = port_usage_down;
this.port_usage_up = port_usage_up;
// update UI
$('span.port_usage_down').text(i18n.getMessage('statusbar_usage_download', [port_usage_down]));
$('span.port_usage_up').text(i18n.getMessage('statusbar_usage_upload', [port_usage_up]));
} else {
$('span.port_usage_down').text(i18n.getMessage('statusbar_usage_download', [0]));
$('span.port_usage_up').text(i18n.getMessage('statusbar_usage_upload', [0]));
this.port_usage_down = 0;
this.port_usage_up = 0;
}
},
reset: function() {
this.previous_received = 0;
this.previous_sent = 0;
this.port_usage_down = 0;
this.port_usage_up = 0;
}
};