mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-28 21:18:54 +03:00
fix: disabling plugins #443
This commit is contained in:
parent
954560ee96
commit
3b989499b8
2 changed files with 20 additions and 21 deletions
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue