mirror of
https://github.com/filegator/filegator.git
synced 2025-08-06 13:17:03 +02:00
fixes #82
This commit is contained in:
@@ -2,12 +2,14 @@
|
|||||||
|
|
||||||
## Upcoming...
|
## Upcoming...
|
||||||
|
|
||||||
|
## 7.4.1 - 2020-05-17
|
||||||
|
|
||||||
* libzip BC fix
|
* libzip BC fix
|
||||||
* zip adapter fix
|
* zip adapter fix
|
||||||
* composer update dependencies
|
* composer update dependencies
|
||||||
* npm update / audit fix
|
* npm update / audit fix
|
||||||
* right-click opens single file context menu
|
* right-click opens single file context menu
|
||||||
* fixes #81, #86
|
* fixes #81, #82, #86
|
||||||
|
|
||||||
## 7.4.0 - 2020-05-09 ✌️
|
## 7.4.0 - 2020-05-09 ✌️
|
||||||
|
|
||||||
|
@@ -179,7 +179,7 @@ export default {
|
|||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
checked: [],
|
checked: [],
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
defaultSort: ['data.name', 'desc'],
|
defaultSort: ['data.name', 'asc'],
|
||||||
files: [],
|
files: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -526,30 +526,30 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
sortByName(a, b, isAsc) {
|
sortByName(a, b, order) {
|
||||||
return this.customSort(a, b, isAsc, 'name')
|
return this.customSort(a, b, !order, 'name')
|
||||||
},
|
},
|
||||||
sortBySize(a, b, isAsc) {
|
sortBySize(a, b, order) {
|
||||||
return this.customSort(a, b, isAsc, 'size')
|
return this.customSort(a, b, !order, 'size')
|
||||||
},
|
},
|
||||||
sortByTime(a, b, isAsc) {
|
sortByTime(a, b, order) {
|
||||||
return this.customSort(a, b, isAsc, 'time')
|
return this.customSort(a, b, !order, 'time')
|
||||||
},
|
},
|
||||||
customSort(a, b, isAsc, param) {
|
customSort(a, b, order, param) {
|
||||||
// TODO: firefox is broken
|
// TODO: firefox is broken
|
||||||
if (b.type == 'back') return 1
|
if (b.type == 'back') return 1
|
||||||
if (a.type == 'back') return -1
|
if (a.type == 'back') return -1
|
||||||
if (b.type == 'dir' && a.type == 'dir') {
|
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') {
|
} else if (b.type == 'dir') {
|
||||||
return 1
|
return 1
|
||||||
} else if (a.type == 'dir') {
|
} else if (a.type == 'dir') {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
if (_.isString(a[param])) {
|
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 {
|
} else {
|
||||||
return (a[param] < b[param]) || isAsc ? -1 : 1
|
return (a[param] < b[param]) || order ? -1 : 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user