Browse Source

fix dashboard statuses sort function

Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
tags/v21.0.0beta1
Julien Veyssier 3 years ago
parent
commit
9b58653757
No account linked to committer's email address
3 changed files with 13 additions and 4 deletions
  1. 1
    1
      apps/dashboard/js/dashboard.js
  2. 1
    1
      apps/dashboard/js/dashboard.js.map
  3. 11
    2
      apps/dashboard/src/App.vue

+ 1
- 1
apps/dashboard/js/dashboard.js
File diff suppressed because it is too large
View File


+ 1
- 1
apps/dashboard/js/dashboard.js.map
File diff suppressed because it is too large
View File


+ 11
- 2
apps/dashboard/src/App.vue View File

@@ -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')

Loading…
Cancel
Save