mirror of
https://github.com/VueTorrent/VueTorrent.git
synced 2025-05-05 14:55:09 +03:00
0.4.6 (#74)
This commit is contained in:
parent
8b590e4e98
commit
396f10f45c
41 changed files with 465 additions and 304 deletions
src/components/Modals
|
@ -50,11 +50,10 @@
|
|||
</v-file-input>
|
||||
</div>
|
||||
<v-textarea
|
||||
v-if="files.length == 0"
|
||||
label="URL"
|
||||
prepend-icon="mdi-link"
|
||||
:rows="
|
||||
$vuetify.breakpoint.xsOnly ? 1 : 3
|
||||
"
|
||||
rows="1"
|
||||
required
|
||||
:autofocus="!phoneLayout"
|
||||
v-model="urls"
|
||||
|
@ -83,8 +82,8 @@
|
|||
<v-row no-gutters>
|
||||
<v-flex xs12 sm6>
|
||||
<v-checkbox
|
||||
v-model="autoTMM"
|
||||
label="Automatic Torrent Management"
|
||||
v-model="start"
|
||||
label="Start torrent"
|
||||
></v-checkbox>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6>
|
||||
|
@ -93,6 +92,18 @@
|
|||
label="Skip hash check"
|
||||
></v-checkbox>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6>
|
||||
<v-checkbox
|
||||
v-model="root_folder"
|
||||
label="Create subfolder"
|
||||
></v-checkbox>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6>
|
||||
<v-checkbox
|
||||
v-model="autoTMM"
|
||||
label="Automatic Torrent Management"
|
||||
></v-checkbox>
|
||||
</v-flex>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</v-form>
|
||||
|
@ -128,8 +139,10 @@ export default {
|
|||
files: [],
|
||||
category: null,
|
||||
directory: '',
|
||||
autoTMM: true,
|
||||
start: true,
|
||||
skip_checking: false,
|
||||
root_folder: true,
|
||||
autoTMM: true,
|
||||
fileInputRules: [
|
||||
v => {
|
||||
const result = v.every(f => {
|
||||
|
@ -151,12 +164,17 @@ export default {
|
|||
submit() {
|
||||
if (this.files.length || this.urls) {
|
||||
const torrents = []
|
||||
const params = { urls: null, autoTMM: this.autoTMM }
|
||||
const params = {
|
||||
urls: null,
|
||||
paused: !this.start,
|
||||
skip_checking: this.skip_checking,
|
||||
root_folder: this.root_folder,
|
||||
autoTMM: this.autoTMM
|
||||
}
|
||||
if (this.files.length) torrents.push(...this.files)
|
||||
if (this.urls) params.urls = this.urls
|
||||
if (this.category) params.category = this.category
|
||||
if (!this.autoTMM) params.savepath = this.directory
|
||||
if (this.skip_checking) params.skip_checking = this.skip_checking
|
||||
|
||||
qbit.addTorrents(params, torrents)
|
||||
|
||||
|
@ -172,12 +190,15 @@ export default {
|
|||
this.url = null
|
||||
this.files = []
|
||||
this.category = null
|
||||
this.directory = null
|
||||
this.directory = this.savepath
|
||||
this.skip_checking = null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['getSettings', 'getCategories']),
|
||||
settings() {
|
||||
return this.getSettings()
|
||||
},
|
||||
validFile() {
|
||||
return this.Files.length > 0
|
||||
},
|
||||
|
@ -197,10 +218,14 @@ export default {
|
|||
return Object.keys(this.getCategories())
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
settings(newvalue) {
|
||||
this.directory = newvalue.save_path
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.$store.commit('FETCH_SETTINGS')
|
||||
this.$store.commit('FETCH_CATEGORIES')
|
||||
this.directory = this.savepath
|
||||
this.urls = this.initialMagnet
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<v-dialog
|
||||
v-model="dialog"
|
||||
scrollable
|
||||
width="75%"
|
||||
:width="dialogWidth"
|
||||
:fullscreen="phoneLayout"
|
||||
>
|
||||
<v-card style="min-height: 400px; overflow: hidden !important">
|
||||
|
@ -17,12 +17,7 @@
|
|||
<v-tab href="#vuetorrent">VueTorrent</v-tab>
|
||||
<v-tab href="#tagsAndCategories">Tags & Categories</v-tab>
|
||||
</v-tabs>
|
||||
<perfect-scrollbar>
|
||||
<v-tabs-items
|
||||
v-model="tab"
|
||||
:touch="updateTab(tab)"
|
||||
:style="{ maxHeight: dialogHeight }"
|
||||
>
|
||||
<v-tabs-items v-model="tab" :touch="updateTab(tab)">
|
||||
<v-tab-item value="downloads">
|
||||
<Downloads :is-active="tab === 'downloads'" />
|
||||
</v-tab-item>
|
||||
|
@ -42,7 +37,6 @@
|
|||
/>
|
||||
</v-tab-item>
|
||||
</v-tabs-items>
|
||||
</perfect-scrollbar>
|
||||
</div>
|
||||
<v-card-actions class="d-flex justify-center">
|
||||
<v-btn color="success" @click="saveSettings">Save</v-btn>
|
||||
|
@ -64,11 +58,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import { mapGetters } from 'vuex'
|
||||
import qbit from '@/services/qbit'
|
||||
|
||||
import { Modal, FullScreenModal } from '@/mixins'
|
||||
import { Modal, FullScreenModal, SettingsTab } from '@/mixins'
|
||||
import {
|
||||
WebUI,
|
||||
BitTorrent,
|
||||
|
@ -79,7 +69,7 @@ import {
|
|||
|
||||
export default {
|
||||
name: 'SettingsModal',
|
||||
mixins: [Modal, FullScreenModal],
|
||||
mixins: [Modal, FullScreenModal, SettingsTab],
|
||||
components: { WebUI, BitTorrent, Downloads, VueTorrent, TagsAndCategories },
|
||||
data() {
|
||||
return {
|
||||
|
@ -91,19 +81,6 @@ export default {
|
|||
methods: {
|
||||
close() {
|
||||
this.deleteModal()
|
||||
},
|
||||
saveSettings() {
|
||||
qbit.setPreferences(this.getSettings()).then(() => {
|
||||
Vue.$toast.success('Settings saved successfully!')
|
||||
})
|
||||
this.$store.commit('FETCH_SETTINGS')
|
||||
this.close()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['getSettings']),
|
||||
dialogHeight() {
|
||||
return this.phoneLayout ? '79vh' : '70vh'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<template>
|
||||
<v-container>
|
||||
<v-card flat>
|
||||
<v-card-text :style="{ minHeight: phoneLayout ? '' : '75vh'}">
|
||||
<perfect-scrollbar>
|
||||
<v-card-text :style="{ minHeight: phoneLayout ? '' : '70vh', maxHeight: '70vh'}">
|
||||
<h3>Privacy</h3>
|
||||
<div class="settings_content ml-5 mr-5">
|
||||
<v-checkbox
|
||||
|
@ -139,6 +140,7 @@
|
|||
</v-row>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</perfect-scrollbar>
|
||||
</v-card>
|
||||
</v-container>
|
||||
</template>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<v-container>
|
||||
<v-card flat>
|
||||
<v-card-text :style="{ minHeight: phoneLayout ? '' : '75vh'}">
|
||||
<v-card-text :style="{ minHeight: phoneLayout ? '' : '70vh'}">
|
||||
<h3>When adding a torrent</h3>
|
||||
<div class="settings_content ml-5 mr-5">
|
||||
<v-checkbox
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<v-card-text
|
||||
class="mx-auto mt-5"
|
||||
style="font-size: 1.1em;"
|
||||
:style="{ minHeight: phoneLayout ? '' : '75vh'}"
|
||||
:style="{ minHeight: phoneLayout ? '' : '64vh'}"
|
||||
>
|
||||
<v-layout row wrap>
|
||||
<v-flex class="mx-auto text-center" xs12 md6>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<template>
|
||||
<v-card flat>
|
||||
<v-card-text :style="{ minHeight: phoneLayout ? '' : '75vh'}">
|
||||
<perfect-scrollbar>
|
||||
<v-card-text :style="{ minHeight: phoneLayout ? '' : '70vh', maxHeight: '70vh'}">
|
||||
<v-tabs v-model="tab">
|
||||
<v-tab href="#general">General</v-tab>
|
||||
<v-tab href="#dashboard">Dashboard</v-tab>
|
||||
|
@ -17,6 +18,7 @@
|
|||
</v-tab-item>
|
||||
</v-tabs-items>
|
||||
</v-card-text>
|
||||
</perfect-scrollbar>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
|
||||
<script>
|
||||
import draggable from 'vuedraggable'
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
components: {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<v-container class="mx-1 px-0">
|
||||
<v-container class="mx-1 px-1">
|
||||
<v-card flat>
|
||||
<v-card-text class="pa-0" style="font-size: 1.1em">
|
||||
<div class="box">
|
||||
|
@ -61,6 +61,16 @@
|
|||
Dense version of the dasbhoard</template
|
||||
>
|
||||
</v-switch>
|
||||
<v-switch
|
||||
class="v-input--reverse v-input--expand pa-0 ma-0"
|
||||
inset
|
||||
v-model="showTrackerFilter"
|
||||
color="green_accent"
|
||||
>
|
||||
<template #label>
|
||||
Show Tracker Filter</template
|
||||
>
|
||||
</v-switch>
|
||||
<v-row dense>
|
||||
<v-col cols="8" sm="8" md="10">
|
||||
<p class="subtitle-1">Pagination size:</p>
|
||||
|
@ -160,6 +170,14 @@ export default {
|
|||
this.webuiSettings.denseDashboard = val
|
||||
}
|
||||
},
|
||||
showTrackerFilter: {
|
||||
get() {
|
||||
return this.webuiSettings.showTrackerFilter
|
||||
},
|
||||
set(val) {
|
||||
this.webuiSettings.showTrackerFilter = val
|
||||
}
|
||||
},
|
||||
paginationSize: {
|
||||
get() {
|
||||
return this.webuiSettings.paginationSize
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<v-container>
|
||||
<v-card flat>
|
||||
<v-card-text class="pa-0" style="font-size: 1.1em"
|
||||
:style="{ minHeight: phoneLayout ? '' : '75vh'}"
|
||||
:style="{ minHeight: phoneLayout ? '' : '70vh'}"
|
||||
>
|
||||
<div class="box">
|
||||
<v-subheader>Use Alternative WebUI</v-subheader>
|
||||
|
|
|
@ -87,6 +87,18 @@
|
|||
{{ torrent.added_on }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="torrent.tracker">
|
||||
<td class="grey--text">Tracker</td>
|
||||
<td class="torrentmodaltext--text">
|
||||
{{ torrent.tracker }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="torrent.comment">
|
||||
<td class="grey--text">Comment</td>
|
||||
<td class="torrentmodaltext--text">
|
||||
{{ torrent.comment }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="grey--text">Status</td>
|
||||
<v-chip
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue