fix: disabling plugins #443

This commit is contained in:
WDaan 2022-11-15 13:38:59 +01:00
parent 954560ee96
commit 3b989499b8
2 changed files with 20 additions and 21 deletions

View file

@ -139,10 +139,9 @@
<script>
import { mapGetters } from 'vuex'
import Modal from '@/mixins/Modal'
import qbit from '@/services/qbit'
import { mdiCloudUpload, mdiFolder, mdiTag, mdiPaperclip, mdiLink, mdiClose } from '@mdi/js'
import { FullScreenModal } from '@/mixins'
import { FullScreenModal, Modal } from '@/mixins'
export default {
name: 'AddModal',

View file

@ -3,23 +3,18 @@
<v-btn @click="opened = true">
<v-icon>{{ mdiCog }}</v-icon> {{ $t('modals.pluginManager.title') | titleCase }}
</v-btn>
<v-bottom-sheet v-if="$vuetify.breakpoint.smAndDown" v-model="opened" scrollable inset>
<v-sheet>
<v-card>
<v-card-title>
<v-icon>{{ mdiToyBrick }}</v-icon> Plugin manager
</v-card-title>
<v-card-text>
<v-switch v-for="(plugin, key) in searchPlugins" :key="key" :input-value="plugin.enabled" :label="plugin.fullName" @change="togglePlugin(plugin)" />
</v-card-text>
</v-card>
</v-sheet>
</v-bottom-sheet>
<v-dialog v-else v-model="opened" width="50%">
<v-card>
<v-card-title>
<v-dialog v-model="opened" width="50%">
<v-card class="pa-0">
<v-card-title class="justify-center pa-1" >
<v-toolbar flat dense class="transparent">
<v-toolbar-title>
<v-icon>{{ mdiToyBrick }}</v-icon> Plugin manager
</v-toolbar-title>
<v-spacer/>
<v-btn fab small class="transparent elevation-0" @click="close">
<v-icon>{{ mdiClose }}</v-icon>
</v-btn>
</v-toolbar>
</v-card-title>
<v-card-text>
<v-switch v-for="(plugin, key) in searchPlugins" :key="key" v-model="plugin.enabled" :label="plugin.fullName" @change="togglePlugin(plugin)" />
@ -32,13 +27,15 @@
<script>
import { mapState } from 'vuex'
import qbit from '@/services/qbit'
import { mdiCog, mdiToyBrick } from '@mdi/js'
import { mdiCog, mdiToyBrick, mdiClose } from '@mdi/js'
export default {
name: 'PluginsManager',
data: () => ({
opened: false,
mdiCog,
mdiToyBrick
mdiToyBrick,
mdiClose
}),
computed: {
...mapState(['searchPlugins'])
@ -56,6 +53,9 @@ export default {
methods: {
togglePlugin(plugin) {
qbit.enableSearchPlugin([plugin.name], plugin.enabled)
},
close(){
this.opened = false
}
}
}