mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-03 00:39:39 +00:00
Update example plugin and add plugins frontend page with save config endpoint
This commit is contained in:
parent
62bd7e73f4
commit
ad89fb2eac
11 changed files with 276 additions and 36 deletions
|
|
@ -29,7 +29,7 @@ export const state = () => ({
|
|||
innerModalOpen: false,
|
||||
lastBookshelfScrollData: {},
|
||||
routerBasePath: '/',
|
||||
pluginExtensions: []
|
||||
plugins: []
|
||||
})
|
||||
|
||||
export const getters = {
|
||||
|
|
@ -64,9 +64,9 @@ export const getters = {
|
|||
return state.serverSettings.homeBookshelfView
|
||||
},
|
||||
getPluginExtensions: (state) => (target) => {
|
||||
return state.pluginExtensions
|
||||
return state.plugins
|
||||
.map((pext) => {
|
||||
const extensionsMatchingTarget = pext.extensions.filter((ext) => ext.target === target)
|
||||
const extensionsMatchingTarget = pext.extensions?.filter((ext) => ext.target === target) || []
|
||||
if (!extensionsMatchingTarget.length) return null
|
||||
return {
|
||||
name: pext.name,
|
||||
|
|
@ -254,7 +254,7 @@ export const mutations = {
|
|||
setInnerModalOpen(state, val) {
|
||||
state.innerModalOpen = val
|
||||
},
|
||||
setPluginExtensions(state, val) {
|
||||
state.pluginExtensions = val
|
||||
setPlugins(state, val) {
|
||||
state.plugins = val
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue