Browse Source

Fix lint errors

pull/915/head
Sergei Birukov 1 year ago
committed by Philip H
parent
commit
ac6a05f9be
  1. 11
      src/www/js/app.js

11
src/www/js/app.js

@ -37,13 +37,13 @@ const UI_CHART_TYPES = [
{ type: 'line', strokeWidth: 3 }, { type: 'line', strokeWidth: 3 },
{ type: 'area', strokeWidth: 0 }, { type: 'area', strokeWidth: 0 },
{ type: 'bar', strokeWidth: 0 }, { type: 'bar', strokeWidth: 0 },
] ];
const CHART_COLORS = { const CHART_COLORS = {
rx: { light: 'rgba(0,0,0,0.2)', dark: 'rgba(255,255,255,0.3)' }, rx: { light: 'rgba(0,0,0,0.2)', dark: 'rgba(255,255,255,0.3)' },
tx: { light: 'rgba(0,0,0,0.3)', dark: 'rgba(255,255,255,0.5)' }, tx: { light: 'rgba(0,0,0,0.3)', dark: 'rgba(255,255,255,0.5)' },
gradient: { light: ['rgba(0,0,0,0.1)', 'rgba(0,0,0,0)'], dark: ['rgba(255,255,255,0.1)', 'rgba(255,255,255,0)'] }, gradient: { light: ['rgba(0,0,0,0.1)', 'rgba(0,0,0,0)'], dark: ['rgba(255,255,255,0.1)', 'rgba(255,255,255,0)'] },
} };
new Vue({ new Vue({
el: '#app', el: '#app',
@ -89,7 +89,7 @@ new Vue({
parentHeightOffset: 0, parentHeightOffset: 0,
sparkline: { sparkline: {
enabled: true, enabled: true,
} },
}, },
colors: [], colors: [],
stroke: { stroke: {
@ -198,7 +198,6 @@ new Vue({
this.clientsPersist[client.id].transferTxPrevious = client.transferTx; this.clientsPersist[client.id].transferTxPrevious = client.transferTx;
if (updateCharts) { if (updateCharts) {
this.clientsPersist[client.id].transferRxHistory.push(this.clientsPersist[client.id].transferRxCurrent); this.clientsPersist[client.id].transferRxHistory.push(this.clientsPersist[client.id].transferRxCurrent);
this.clientsPersist[client.id].transferRxHistory.shift(); this.clientsPersist[client.id].transferRxHistory.shift();
@ -355,7 +354,7 @@ new Vue({
this.api.getChartType() this.api.getChartType()
.then((res) => { .then((res) => {
this.uiChartType = parseInt(res); this.uiChartType = parseInt(res, 10);
}) })
.catch(() => { .catch(() => {
this.uiChartType = 0; this.uiChartType = 0;
@ -413,6 +412,6 @@ new Vue({
}, },
updateCharts() { updateCharts() {
return this.uiChartType > 0; return this.uiChartType > 0;
} },
}, },
}); });

Loading…
Cancel
Save