summaryrefslogtreecommitdiffstats
path: root/apps/dashboard/src
diff options
context:
space:
mode:
authorJulien Veyssier <eneiluj@posteo.net>2020-10-08 11:09:29 +0200
committerJulien Veyssier <eneiluj@posteo.net>2020-10-08 11:09:29 +0200
commit9b586537576be26ee4371e7e8266b38113e94c63 (patch)
tree0b9f7d0d7007d73e8b7300e12eb47b02d040909a /apps/dashboard/src
parentae596362273d9232ee9ef2814a23d738eb68aeb6 (diff)
downloadnextcloud-server-9b586537576be26ee4371e7e8266b38113e94c63.tar.gz
nextcloud-server-9b586537576be26ee4371e7e8266b38113e94c63.zip
fix dashboard statuses sort function
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
Diffstat (limited to 'apps/dashboard/src')
-rw-r--r--apps/dashboard/src/App.vue13
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/dashboard/src/App.vue b/apps/dashboard/src/App.vue
index 64a480e3e60..0d09bcc4537 100644
--- a/apps/dashboard/src/App.vue
+++ b/apps/dashboard/src/App.vue
@@ -180,7 +180,7 @@ export default {
return (status) => !(status in this.enabledStatuses) || this.enabledStatuses[status]
},
sortedAllStatuses() {
- return Object.keys(this.allCallbacksStatus).slice().sort((a, b) => a > b)
+ return Object.keys(this.allCallbacksStatus).slice().sort(this.sortStatuses)
},
sortedPanels() {
return Object.values(this.panels).sort((a, b) => {
@@ -193,7 +193,7 @@ export default {
})
},
sortedRegisteredStatus() {
- return this.registeredStatus.slice().sort((a, b) => a > b)
+ return this.registeredStatus.slice().sort(this.sortStatuses)
},
},
watch: {
@@ -352,6 +352,15 @@ export default {
}
this.saveStatuses()
},
+ sortStatuses(a, b) {
+ const al = a.toLowerCase()
+ const bl = b.toLowerCase()
+ return al > bl
+ ? 1
+ : al < bl
+ ? -1
+ : 0
+ },
handleScroll() {
if (window.scrollY > 70) {
document.body.classList.add('dashboard--scrolled')