mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 14:25:14 +03:00
Add Vue
Setup vue with gulp and initial components: * Status Bar * Logo * Battery Legend
This commit is contained in:
parent
14d98c4dea
commit
d6cee386e8
27 changed files with 1511 additions and 283 deletions
|
@ -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;
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue