mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Merge pull request #52652 from nextcloud/backport/52583/stable30
[stable30] fix(apps): Sort names separately from active/update state
This commit is contained in:
commit
8f6fe59486
5 changed files with 13 additions and 9 deletions
|
|
@ -200,9 +200,13 @@ export default {
|
|||
const apps = [...this.$store.getters.getAllApps, ...exApps]
|
||||
.filter(app => app.name.toLowerCase().search(this.search.toLowerCase()) !== -1)
|
||||
.sort(function(a, b) {
|
||||
const sortStringA = '' + (a.active ? 0 : 1) + (a.update ? 0 : 1) + a.name
|
||||
const sortStringB = '' + (b.active ? 0 : 1) + (b.update ? 0 : 1) + b.name
|
||||
return OC.Util.naturalSortCompare(sortStringA, sortStringB)
|
||||
const natSortDiff = OC.Util.naturalSortCompare(a, b)
|
||||
if (natSortDiff === 0) {
|
||||
const sortStringA = '' + (a.active ? 0 : 1) + (a.update ? 0 : 1)
|
||||
const sortStringB = '' + (b.active ? 0 : 1) + (b.update ? 0 : 1)
|
||||
return Number(sortStringA) - Number(sortStringB)
|
||||
}
|
||||
return natSortDiff
|
||||
})
|
||||
|
||||
if (this.category === 'installed') {
|
||||
|
|
|
|||
4
dist/settings-apps-view-4529.js
vendored
4
dist/settings-apps-view-4529.js
vendored
File diff suppressed because one or more lines are too long
2
dist/settings-apps-view-4529.js.map
vendored
2
dist/settings-apps-view-4529.js.map
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue