Skip to content

Commit

Permalink
feat: auto install search plugins when none installed
Browse files Browse the repository at this point in the history
  • Loading branch information
WDaan committed Apr 6, 2021
1 parent f9567f9 commit abc5457
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/Modals/SearchModal/PluginManager.vue
Expand Up @@ -64,6 +64,11 @@ export default {
togglePlugin(plugin) {
qbit.enableSearchPlugin([plugin.name], plugin.enabled)
}
},
mounted() {
if(!this.searchPlugins.length) {
qbit.updateSearchPlugins()
}
}
}
</script>
4 changes: 4 additions & 0 deletions src/services/qbit.js
Expand Up @@ -355,6 +355,10 @@ class Qbit {
.then(res => res.data)
}

updateSearchPlugins() {
return this.execute('post', '/search/updatePlugins')
}

enableSearchPlugin(plugins, enable) {
const params = {
names: plugins.join('|'),
Expand Down

0 comments on commit abc5457

Please sign in to comment.