Extension list UI improvements (#769)
* Extensions list is now sorted alphabetically * Added extension list search * Prettified changes * Removed console.log * Code improvements based on motorina0 feedback * Remove console.log from lnbits/templates/base.html Run prettier
This commit is contained in:
@@ -392,7 +392,7 @@ window.windowMixin = {
|
||||
}
|
||||
if (window.extensions) {
|
||||
var user = this.g.user
|
||||
this.g.extensions = Object.freeze(
|
||||
const extensions = Object.freeze(
|
||||
window.extensions
|
||||
.map(function (data) {
|
||||
return window.LNbits.map.extension(data)
|
||||
@@ -413,9 +413,13 @@ window.windowMixin = {
|
||||
return obj
|
||||
})
|
||||
.sort(function (a, b) {
|
||||
return a.name > b.name
|
||||
const nameA = a.name.toUpperCase()
|
||||
const nameB = b.name.toUpperCase()
|
||||
return nameA < nameB ? -1 : nameA > nameB ? 1 : 0
|
||||
})
|
||||
)
|
||||
|
||||
this.g.extensions = extensions
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user