mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-13 19:37:42 +01:00
Adds extension#<ext name> option to extensions url (#2947)
This commit is contained in:
parent
dc91fbea9b
commit
1f4160fda5
1 changed files with 10 additions and 5 deletions
|
@ -637,11 +637,16 @@ window.ExtensionsPageLogic = {
|
|||
selectedForUpdate: false
|
||||
}))
|
||||
this.filteredExtensions = this.extensions.concat([])
|
||||
for (let i = 0; i < this.filteredExtensions.length; i++) {
|
||||
if (this.filteredExtensions[i].isInstalled != false) {
|
||||
this.handleTabChanged('installed')
|
||||
this.tab = 'installed'
|
||||
}
|
||||
const hash = window.location.hash.replace('#', '')
|
||||
const ext = this.filteredExtensions.find(ext => ext.id === hash)
|
||||
if (ext) {
|
||||
this.searchTerm = ext.id
|
||||
this.handleTabChanged(ext.isInstalled ? 'installed' : 'all')
|
||||
this.tab = ext.isInstalled ? 'installed' : 'all'
|
||||
} else {
|
||||
const hasInstalled = this.filteredExtensions.some(ext => ext.isInstalled)
|
||||
this.handleTabChanged(hasInstalled ? 'installed' : 'all')
|
||||
this.tab = hasInstalled ? 'installed' : 'all'
|
||||
}
|
||||
this.updatableExtensions = this.extensions.filter(ext =>
|
||||
this.hasNewVersion(ext)
|
||||
|
|
Loading…
Add table
Reference in a new issue