mirror of
https://github.com/filegator/filegator.git
synced 2025-01-17 20:58:27 +01:00
fixes #82
This commit is contained in:
parent
7b12997f33
commit
ebe5e14554
@ -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 ✌️
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
},
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user