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',