feat: auto install search plugins when none installed

This commit is contained in:
Daan Wijns 2021-04-06 14:42:19 +02:00
parent f9567f930e
commit abc5457882
2 changed files with 9 additions and 0 deletions

View file

@ -64,6 +64,11 @@ export default {
togglePlugin(plugin) {
qbit.enableSearchPlugin([plugin.name], plugin.enabled)
}
},
mounted() {
if(!this.searchPlugins.length) {
qbit.updateSearchPlugins()
}
}
}
</script>

View file

@ -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('|'),