From c47505bcbf4641f93ba69d467fb8133f073f5392 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 20 May 2018 23:09:59 +0800 Subject: [PATCH] code refactor --- src/scripts/directives/setting.js | 2 +- src/scripts/services/aria2TaskService.js | 2 +- src/views/list.html | 6 ++-- src/views/new.html | 8 ++--- src/views/setting.html | 8 ++--- src/views/task-detail.html | 40 ++++++++++++------------ 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/scripts/directives/setting.js b/src/scripts/directives/setting.js index fe6dd40..293a45f 100644 --- a/src/scripts/directives/setting.js +++ b/src/scripts/directives/setting.js @@ -61,7 +61,7 @@ var unitIndex = 0; for (var i = 0; i < sizeUnits.length; i++) { - if ((size < 1024) || (size % 1024 != 0)) { + if ((size < 1024) || (size % 1024 !== 0)) { break; } diff --git a/src/scripts/services/aria2TaskService.js b/src/scripts/services/aria2TaskService.js index f46a591..3f06e21 100644 --- a/src/scripts/services/aria2TaskService.js +++ b/src/scripts/services/aria2TaskService.js @@ -485,7 +485,7 @@ options = response.data[1][0]; } - if (!task || !options || !task.files || task.files.length != 1 || task.bittorrent) { + if (!task || !options || !task.files || task.files.length !== 1 || task.bittorrent) { if (!task) { ariaNgLogService.warn('[aria2TaskService.restartTask] task is null'); } diff --git a/src/views/list.html b/src/views/list.html index a817350..d7ae42d 100644 --- a/src/views/list.html +++ b/src/views/list.html @@ -47,14 +47,14 @@ - - Restart + + Restart