Bug fixes

This commit is contained in:
Natsumi
2021-10-28 21:12:32 +13:00
parent 2b37c91a65
commit 0db17a7168
4 changed files with 435 additions and 381 deletions

View File

@@ -170,6 +170,17 @@ import configRepository from './repository/config.js';
}
});
var removeFromArray = function (array, item) {
var {length} = array;
for (var i = 0; i < length; ++i) {
if (array[i] === item) {
array.splice(i, 1);
return true;
}
}
return false;
};
var $app = {
data: {
// 1 = 대시보드랑 손목에 보이는거
@@ -178,6 +189,7 @@ import configRepository from './repository/config.js';
currentTime: new Date().toJSON(),
cpuUsage: 0,
config: {},
downloadProgress: 0,
nowPlaying: {
url: '',
name: '',
@@ -289,6 +301,10 @@ import configRepository from './repository/config.js';
this.config = JSON.parse(json);
};
$app.methods.updateDownloadProgress = function (progress) {
this.downloadProgress = parseInt(progress, 10);
};
$app.methods.nowPlayingUpdate = function (json) {
this.nowPlaying = JSON.parse(json);
if (this.appType === '2') {