Skip to content

Commit e58134e

Browse files
authored
Merge pull request #23288 from nextcloud/backport/23275/stable20
[stable20] Fix dashboard statuses sort
2 parents c578b11 + 07ad197 commit e58134e

3 files changed

Lines changed: 13 additions & 4 deletions

File tree

apps/dashboard/js/dashboard.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/dashboard/js/dashboard.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/dashboard/src/App.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export default {
178178
return (status) => !(status in this.enabledStatuses) || this.enabledStatuses[status]
179179
},
180180
sortedAllStatuses() {
181-
return Object.keys(this.allCallbacksStatus).slice().sort((a, b) => a > b)
181+
return Object.keys(this.allCallbacksStatus).slice().sort(this.sortStatuses)
182182
},
183183
sortedPanels() {
184184
return Object.values(this.panels).sort((a, b) => {
@@ -191,7 +191,7 @@ export default {
191191
})
192192
},
193193
sortedRegisteredStatus() {
194-
return this.registeredStatus.slice().sort((a, b) => a > b)
194+
return this.registeredStatus.slice().sort(this.sortStatuses)
195195
},
196196
},
197197
watch: {
@@ -350,6 +350,15 @@ export default {
350350
}
351351
this.saveStatuses()
352352
},
353+
sortStatuses(a, b) {
354+
const al = a.toLowerCase()
355+
const bl = b.toLowerCase()
356+
return al > bl
357+
? 1
358+
: al < bl
359+
? -1
360+
: 0
361+
},
353362
handleScroll() {
354363
if (window.scrollY > 70) {
355364
document.body.classList.add('dashboard--scrolled')

0 commit comments

Comments
 (0)