fix: extension stayed active in frontend extension list (#3617)
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -45,10 +45,6 @@ window.app.component('lnbits-manage-extension-list', {
|
|||||||
.toLocaleLowerCase()
|
.toLocaleLowerCase()
|
||||||
.includes(this.searchTerm.toLocaleLowerCase())
|
.includes(this.searchTerm.toLocaleLowerCase())
|
||||||
})
|
})
|
||||||
.map(obj => {
|
|
||||||
obj.isActive = window.location.pathname.startsWith(obj.url)
|
|
||||||
return obj
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
v-for="extension in userExtensions"
|
v-for="extension in userExtensions"
|
||||||
:key="extension.code"
|
:key="extension.code"
|
||||||
clickable
|
clickable
|
||||||
:active="extension.isActive"
|
:active="$route.path.startsWith(extension.url)"
|
||||||
tag="a"
|
tag="a"
|
||||||
:href="extension.url"
|
:href="extension.url"
|
||||||
>
|
>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
><span v-text="extension.name"></span>
|
><span v-text="extension.name"></span>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section side v-show="extension.isActive">
|
<q-item-section side v-show="$route.path.startsWith(extension.url)">
|
||||||
<q-icon name="chevron_right" color="grey-5" size="md"></q-icon>
|
<q-icon name="chevron_right" color="grey-5" size="md"></q-icon>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|||||||
Reference in New Issue
Block a user