This commit is contained in:
Milos Stojanovic 2020-05-17 10:33:59 +02:00
parent 7b12997f33
commit ebe5e14554
2 changed files with 14 additions and 12 deletions

View File

@ -2,12 +2,14 @@
## Upcoming...
## 7.4.1 - 2020-05-17
* libzip BC fix
* zip adapter fix
* composer update dependencies
* npm update / audit fix
* right-click opens single file context menu
* fixes #81, #86
* fixes #81, #82, #86
## 7.4.0 - 2020-05-09 ✌️

View File

@ -179,7 +179,7 @@ export default {
currentPage: 1,
checked: [],
isLoading: false,
defaultSort: ['data.name', 'desc'],
defaultSort: ['data.name', 'asc'],
files: [],
}
},
@ -526,30 +526,30 @@ export default {
}
})
},
sortByName(a, b, isAsc) {
return this.customSort(a, b, isAsc, 'name')
sortByName(a, b, order) {
return this.customSort(a, b, !order, 'name')
},
sortBySize(a, b, isAsc) {
return this.customSort(a, b, isAsc, 'size')
sortBySize(a, b, order) {
return this.customSort(a, b, !order, 'size')
},
sortByTime(a, b, isAsc) {
return this.customSort(a, b, isAsc, 'time')
sortByTime(a, b, order) {
return this.customSort(a, b, !order, 'time')
},
customSort(a, b, isAsc, param) {
customSort(a, b, order, param) {
// TODO: firefox is broken
if (b.type == 'back') return 1
if (a.type == 'back') return -1
if (b.type == 'dir' && a.type == 'dir') {
return (a[param] < b[param]) || isAsc ? -1 : 1
return (a[param] < b[param]) || order ? -1 : 1
} else if (b.type == 'dir') {
return 1
} else if (a.type == 'dir') {
return -1
}
if (_.isString(a[param])) {
return (_.lowerCase(a[param]) < _.lowerCase(b[param])) || isAsc ? -1 : 1
return (_.lowerCase(a[param]) < _.lowerCase(b[param])) || order ? -1 : 1
} else {
return (a[param] < b[param]) || isAsc ? -1 : 1
return (a[param] < b[param]) || order ? -1 : 1
}
},
}