mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-02-18 08:09:40 +00:00
Update plugin to use uuid for id, update example plugin with taskmanager and socketauthority test
This commit is contained in:
parent
cfe3deff3b
commit
fc17a74865
11 changed files with 138 additions and 105 deletions
|
|
@ -42,7 +42,7 @@ export default {
|
|||
if (!store.getters['user/getIsAdminOrUp']) {
|
||||
redirect('/')
|
||||
}
|
||||
const plugin = store.state.plugins.find((plugin) => plugin.slug === params.slug)
|
||||
const plugin = store.state.plugins.find((plugin) => plugin.id === params.id)
|
||||
if (!plugin) {
|
||||
redirect('/config/plugins')
|
||||
}
|
||||
|
|
@ -95,14 +95,13 @@ export default {
|
|||
console.log('Form data', formData)
|
||||
|
||||
const payload = {
|
||||
pluginSlug: this.plugin.slug,
|
||||
config: formData
|
||||
}
|
||||
|
||||
this.processing = true
|
||||
|
||||
this.$axios
|
||||
.$post(`/api/plugins/config`, payload)
|
||||
.$post(`/api/plugins/${this.plugin.id}/config`, payload)
|
||||
.then(() => {
|
||||
console.log('Plugin configuration saved')
|
||||
})
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<h2 class="text-xl font-medium">Installed Plugins</h2>
|
||||
<template v-for="plugin in plugins">
|
||||
<nuxt-link :key="plugin.slug" :to="`/config/plugins/${plugin.slug}`" class="flex items-center bg-primary rounded-md shadow-sm p-4 my-4 space-x-4">
|
||||
<nuxt-link :key="plugin.id" :to="`/config/plugins/${plugin.id}`" class="flex items-center bg-primary rounded-md shadow-sm p-4 my-4 space-x-4">
|
||||
<p class="text-lg">{{ plugin.name }}</p>
|
||||
<p class="text-sm text-gray-300">{{ plugin.description }}</p>
|
||||
<div class="flex-grow" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue