mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2024-11-24 18:36:14 +03:00
perf: Add switch to hide Shutdown button (#685) @Larsluph
This commit is contained in:
parent
3706fafc5d
commit
19e4eef0b8
8 changed files with 27 additions and 6 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -6,7 +6,7 @@
|
|||
"packages": {
|
||||
"": {
|
||||
"name": "vuetorrent",
|
||||
"version": "1.3.2",
|
||||
"version": "1.4.0",
|
||||
"dependencies": {
|
||||
"ajv": "^8.12.0",
|
||||
"apexcharts": "^3.35.0",
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<span>{{ theme }}</span>
|
||||
</v-tooltip>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-col v-if="webuiSettings.showShutdownButton">
|
||||
<v-tooltip top>
|
||||
<template #activator="{ on }">
|
||||
<v-btn text tile block v-on="on" @click="createModal('ConfirmShutdownModal')">
|
||||
|
@ -80,10 +80,7 @@ export default {
|
|||
}),
|
||||
computed: {
|
||||
...mapState(['webuiSettings']),
|
||||
...mapGetters(['isDarkMode', 'getWebuiSettings', 'getStatus']),
|
||||
webuiSettings() {
|
||||
return this.getWebuiSettings()
|
||||
},
|
||||
...mapGetters(['isDarkMode', 'getStatus']),
|
||||
theme() {
|
||||
return this.isDarkMode() ? this.$t('navbar.action.dark') : this.$t('navbar.action.light')
|
||||
},
|
||||
|
|
|
@ -120,6 +120,19 @@
|
|||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
<v-list-item>
|
||||
<v-row dense>
|
||||
<v-col>
|
||||
<v-switch
|
||||
v-model="webuiSettings.showShutdownButton"
|
||||
class="v-input--reverse pa-0 ma-0"
|
||||
hide-details
|
||||
inset
|
||||
:label="$t('modals.settings.pageVueTorrent.pageGeneral.showShutdownButton')"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-list-item>
|
||||
<v-list-item>
|
||||
<v-row dense>
|
||||
<v-col cols="8" sm="8" md="10">
|
||||
|
|
|
@ -189,6 +189,7 @@
|
|||
"vueTorrentTitle": "VueTorrent title:",
|
||||
"dateFormat": "Date Format",
|
||||
"openSideBarOnStart": "Open Side Bar on launch",
|
||||
"showShutdownButton": "Show shutdown button",
|
||||
"currentVersion": "Current Version:",
|
||||
"qbittorrentVersion": "QBittorrent Version:",
|
||||
"importSettings": "Import Settings",
|
||||
|
|
|
@ -185,6 +185,7 @@
|
|||
"vueTorrentTitle": "Titre de la page:",
|
||||
"dateFormat": "Format de date",
|
||||
"openSideBarOnStart": "Ouvrir la barre latérale au lancement",
|
||||
"showShutdownButton": "Afficher le bouton d'arrêt",
|
||||
"currentVersion": "Version actuelle:",
|
||||
"qbittorrentVersion": "Version de QBittorrent:",
|
||||
"importSettings": "Importer la configuration",
|
||||
|
|
|
@ -101,6 +101,7 @@ export default new Vuex.Store<StoreState>({
|
|||
paginationSize: 15,
|
||||
dateFormat: 'DD/MM/YYYY, HH:mm:ss',
|
||||
openSideBarOnStart: true,
|
||||
showShutdownButton: true,
|
||||
busyTorrentProperties: JSON.parse(JSON.stringify(propertiesTemplate)),
|
||||
doneTorrentProperties: JSON.parse(JSON.stringify(propertiesTemplate))
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ export default interface WebUISettings {
|
|||
paginationSize: number
|
||||
dateFormat: string
|
||||
openSideBarOnStart: boolean
|
||||
showShutdownButton: boolean
|
||||
busyTorrentProperties: TorrentProperty[]
|
||||
doneTorrentProperties: TorrentProperty[]
|
||||
}
|
||||
|
|
|
@ -66,6 +66,13 @@ exports[`General > render correctly 1`] = `
|
|||
</v-col-stub>
|
||||
</v-row-stub>
|
||||
</v-list-item-stub>
|
||||
<v-list-item-stub data-v-7da6d3e2=\\"\\" activeclass=\\"\\" tag=\\"div\\">
|
||||
<v-row-stub data-v-7da6d3e2=\\"\\" tag=\\"div\\" dense=\\"true\\">
|
||||
<v-col-stub data-v-7da6d3e2=\\"\\" tag=\\"div\\">
|
||||
<v-switch-stub data-v-7da6d3e2=\\"\\" errorcount=\\"1\\" errormessages=\\"\\" messages=\\"\\" rules=\\"\\" successmessages=\\"\\" backgroundcolor=\\"\\" hidedetails=\\"true\\" ripple=\\"true\\" valuecomparator=\\"[Function]\\" inset=\\"true\\" class=\\"v-input--reverse pa-0 ma-0\\"></v-switch-stub>
|
||||
</v-col-stub>
|
||||
</v-row-stub>
|
||||
</v-list-item-stub>
|
||||
<v-list-item-stub data-v-7da6d3e2=\\"\\" activeclass=\\"\\" tag=\\"div\\">
|
||||
<v-row-stub data-v-7da6d3e2=\\"\\" tag=\\"div\\" dense=\\"true\\">
|
||||
<v-col-stub data-v-7da6d3e2=\\"\\" cols=\\"8\\" sm=\\"8\\" md=\\"10\\" tag=\\"div\\">
|
||||
|
|
Loading…
Reference in a new issue