Browse Source

chore(www): fix eslint

pull/1227/head
Hoang Nè 2 years ago
parent
commit
3ae21bfc83
  1. 8
      src/www/js/app.js
  2. 2
      src/www/js/i18n.js

8
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) => {

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

Loading…
Cancel
Save