From 3ae21bfc838702942bccae36824991d36ffa43ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hoang=20N=C3=A8?= Date: Tue, 30 Jul 2024 13:57:46 +0700 Subject: [PATCH] chore(www): fix eslint --- src/www/js/app.js | 8 ++++---- src/www/js/i18n.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/www/js/app.js b/src/www/js/app.js index b86d1fa7..c4fb4b7f 100644 --- a/src/www/js/app.js +++ b/src/www/js/app.js @@ -33,10 +33,10 @@ function bytes(bytes, decimals, kib, maxunit) { */ function sortByProperty(array, property, sort = true) { if (sort) { - return array.sort((a, b) => typeof a[property] === "string" ? a[property].localeCompare(b[property]) : a[property] - b[property]); - } else { - return array.sort((a, b) => typeof a[property] === "string" ? b[property].localeCompare(a[property]) : b[property] - a[property]); + return array.sort((a, b) => (typeof a[property] === 'string' ? a[property].localeCompare(b[property]) : a[property] - b[property])); } + + return array.sort((a, b) => (typeof a[property] === 'string' ? b[property].localeCompare(a[property]) : b[property] - a[property])); } const i18n = new VueI18n({ @@ -172,7 +172,7 @@ new Vue({ }, }, - sortClient: true // Sort clients by name, true = asc, false = desc + sortClient: true, // Sort clients by name, true = asc, false = desc }, methods: { dateTime: (value) => { diff --git a/src/www/js/i18n.js b/src/www/js/i18n.js index 81d05c8c..d5c00c02 100644 --- a/src/www/js/i18n.js +++ b/src/www/js/i18n.js @@ -361,7 +361,7 @@ const messages = { // eslint-disable-line no-unused-vars backup: 'Sao lưu', titleRestoreConfig: 'Khôi phục cấu hình của bạn', titleBackupConfig: 'Sao lưu cấu hình của bạn', - sort: 'Sắp xếp' + sort: 'Sắp xếp', }, nl: { name: 'Naam',