Optional global remove/resume/pause torrent buttons

This commit is contained in:
Daan 2020-09-15 09:28:43 +02:00
parent 47e3026f3e
commit 8cf3a50430
4 changed files with 46 additions and 5 deletions

View file

@ -41,6 +41,16 @@
>
<template #label> Show Free Space </template>
</v-switch>
<v-switch
class="v-input--reverse v-input--expand pa-0 ma-0"
inset
v-model="showGlobalRemoveResumePause"
color="green_accent"
>
<template #label>
Global Remove/Resume/Pause Buttons</template
>
</v-switch>
<v-row dense>
<v-col cols="10" sm="10" md="11">
<p class="subtitle-1">Current Version:</p>
@ -96,6 +106,14 @@ export default {
this.webuiSettings.showSessionStat = val
}
},
showGlobalRemoveResumePause: {
get() {
return this.webuiSettings.showGlobalRemoveResumePause
},
set(val) {
this.webuiSettings.showGlobalRemoveResumePause = val
}
},
version() {
return this.getAppVersion()
}

View file

@ -19,7 +19,7 @@
</v-toolbar-title>
<v-spacer></v-spacer>
<TopActions />
<TopActions :showAll="webuiSettings.showGlobalRemoveResumePause" />
</v-app-bar>
<!--navigation drawer itself -->
<v-navigation-drawer

View file

@ -20,13 +20,34 @@
>
<v-icon color="grey">add</v-icon>
</v-btn>
<v-btn small fab text class="mr-0 ml-0" @click="removeTorrents">
<v-btn
v-if="showAll"
small
fab
text
class="mr-0 ml-0"
@click="removeTorrents"
>
<v-icon color="grey">remove</v-icon>
</v-btn>
<v-btn small fab text class="mr-0 ml-0" @click="resumeTorrents">
<v-btn
v-if="showAll"
small
fab
text
class="mr-0 ml-0"
@click="resumeTorrents"
>
<v-icon color="grey">play_arrow</v-icon>
</v-btn>
<v-btn small fab text class="mr-0 ml-0" @click="pauseTorrents">
<v-btn
v-if="showAll"
small
fab
text
class="mr-0 ml-0"
@click="pauseTorrents"
>
<v-icon color="grey">pause</v-icon>
</v-btn>
<v-btn
@ -49,6 +70,7 @@ import { General } from '@/mixins'
export default {
name: 'TopActions',
mixins: [General],
props: ['showAll'],
computed: {
...mapState(['selected_torrents'])
},

View file

@ -39,7 +39,8 @@ export default new Vuex.Store({
showFreeSpace: true,
showSpeedGraph: true,
showSessionStat: true,
showCurrentSpeed: true
showCurrentSpeed: true,
showGlobalRemoveResumePause: true
},
categories: []
},