diff --git a/package-lock.json b/package-lock.json index 573f07ef..a4f5d895 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "vuetorrent", - "version": "0.4.8", + "version": "0.4.9", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2334,34 +2334,11 @@ "dev": true }, "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", + "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", "requires": { - "follow-redirects": "1.5.10" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "requires": { - "debug": "=3.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } + "follow-redirects": "^1.10.0" } }, "babel-eslint": { @@ -5001,18 +4978,18 @@ } }, "eslint-plugin-prettier": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.0.tgz", - "integrity": "sha512-tMTwO8iUWlSRZIwS9k7/E4vrTsfvsrcM5p1eftyuqWH25nKsz/o6/54I7jwQ/3zobISyC7wMy9ZsFwgTxOcOpQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz", + "integrity": "sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" } }, "eslint-plugin-vue": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-7.4.0.tgz", - "integrity": "sha512-bYJV3nHSGV5IL40Ti1231vlY8I2DzjDHYyDjRv9Z1koEI7qyV2RR3+uKMafHdOioXYH9W3e1+iwe4wy7FIBNCQ==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-7.4.1.tgz", + "integrity": "sha512-W/xPNHYIkGJphLUM2UIYYGKbRw3BcDoMIPY9lu1TTa2YLiZoxurddfnmOP+UOVywxb5vi438ejzwvKdZqydtIw==", "dev": true, "requires": { "eslint-utils": "^2.1.0", @@ -5659,7 +5636,6 @@ "version": "1.11.0", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz", "integrity": "sha512-KZm0V+ll8PfBrKwMzdo5D13b1bur9Iq9Zd/RMmAoQQcl2PxxFml8cxXPaaPYVbV0RjNjq1CU7zIzAOqtUPudmA==", - "dev": true, "requires": { "debug": "^3.0.0" }, @@ -5668,7 +5644,6 @@ "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, "requires": { "ms": "^2.1.1" } @@ -7806,8 +7781,7 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "multicast-dns": { "version": "6.2.3", diff --git a/package.json b/package.json index d83ef220..3d602a02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuetorrent", - "version": "0.4.8", + "version": "0.4.9", "private": true, "scripts": { "start": "npm run serve", @@ -11,7 +11,7 @@ "dependencies": { "@babel/polyfill": "^7.12.1", "apexcharts": "^3.23.1", - "axios": "^0.19.2", + "axios": "^0.21.1", "core-js": "^3.8.2", "dayjs": "^1.10.1", "fuse.js": "^6.4.5", @@ -39,8 +39,8 @@ "babel-eslint": "^10.1.0", "eslint": "^7.17.0", "eslint-config-google": "^0.14.0", - "eslint-plugin-prettier": "^3.3.0", - "eslint-plugin-vue": "^7.4.0", + "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-vue": "^7.4.1", "fibers": "^5.0.0", "node-sass": "^4.14.1", "sass": "^1.32.0", diff --git a/public/img/icons/apple-touch-icon-152x152.png b/public/img/icons/apple-touch-icon-152x152.png index 9452a249..dbc1d534 100644 Binary files a/public/img/icons/apple-touch-icon-152x152.png and b/public/img/icons/apple-touch-icon-152x152.png differ diff --git a/public/img/icons/safari-pinned-tab.svg b/public/img/icons/safari-pinned-tab.svg deleted file mode 100644 index 524d2405..00000000 --- a/public/img/icons/safari-pinned-tab.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - -Created by potrace 1.11, written by Peter Selinger 2001-2013 - - - - - diff --git a/src/components/Modals/AddModal.vue b/src/components/Modals/AddModal.vue index 54dc3fda..f1b968ac 100644 --- a/src/components/Modals/AddModal.vue +++ b/src/components/Modals/AddModal.vue @@ -195,8 +195,15 @@ export default { this.$store.commit('FETCH_SETTINGS') this.$store.commit('FETCH_CATEGORIES') this.urls = this.initialMagnet + this.setSettings() }, methods: { + setSettings() { + const settings = this.getSettings() + this.start = !settings.start_paused_enabled + this.autoTMM = settings.auto_tmm_enabled + this.root_folder = settings.create_subfolder_enabled + }, addDropFile(e) { this.files.push(...Array.from(e.dataTransfer.files)) }, diff --git a/src/components/Modals/SettingsModal/Tabs/Downloads.vue b/src/components/Modals/SettingsModal/Tabs/Downloads.vue index ccf1a8ce..3c9635a7 100644 --- a/src/components/Modals/SettingsModal/Tabs/Downloads.vue +++ b/src/components/Modals/SettingsModal/Tabs/Downloads.vue @@ -1,69 +1,81 @@ diff --git a/src/components/Modals/SettingsModal/Tabs/Vuetorrent/General.vue b/src/components/Modals/SettingsModal/Tabs/Vuetorrent/General.vue index eba5a4c6..6625cbdf 100644 --- a/src/components/Modals/SettingsModal/Tabs/Vuetorrent/General.vue +++ b/src/components/Modals/SettingsModal/Tabs/Vuetorrent/General.vue @@ -66,7 +66,7 @@ color="green_accent" > [{{ item.size }}] {{ item.progress }}% + [ {{ item.priority | priority }} ] + + + + + {{ prio.icon }} + + {{ prio.name }} + + + + el.value === value) + + return res ? res.name : 'undefined' + } + }, mixins: [FullScreenModal], props: { hash: String, @@ -82,7 +128,8 @@ export default { return { opened: null, selected: [], - treeData: null + treeData: null, + priority_options: FILE_PRIORITY_OPTIONS } }, computed: { @@ -105,20 +152,23 @@ export default { } }, created() { - this.getTorrentFiles().then(() => { - this.opened = [] - .concat( - ...this.treeData - .map(file => file.name.split('/')) - .filter(f => f.splice(-1, 1)) - ) - .filter((f, index, self) => index === self.indexOf(f)) - this.selected = this.treeData - .filter(file => file.priority !== 0) - .map(file => file.name) - }) + this.initFiles() }, methods: { + initFiles() { + this.getTorrentFiles().then(() => { + this.opened = [] + .concat( + ...this.treeData + .map(file => file.name.split('/')) + .filter(f => f.splice(-1, 1)) + ) + .filter((f, index, self) => index === self.indexOf(f)) + this.selected = this.treeData + .filter(file => file.priority !== 0) + .map(file => file.name) + }) + }, async getTorrentFiles() { const { data } = await qbit.getTorrentFiles(this.hash) data.forEach((d, i) => { @@ -162,7 +212,11 @@ export default { qbit.renameFile(this.hash, item.id, item.newName) item.name = item.newName this.togleEditing(item) + }, + setFilePrio(fileId, priority) { + qbit.setTorrentFilePriority(this.hash, [fileId], priority) + .then(() => this.initFiles()) } } } - + \ No newline at end of file diff --git a/src/components/Navbar/CurrentSpeed.vue b/src/components/Navbar/CurrentSpeed.vue index 1cce604a..f20dc653 100644 --- a/src/components/Navbar/CurrentSpeed.vue +++ b/src/components/Navbar/CurrentSpeed.vue @@ -34,5 +34,3 @@ export default { props: ['status'] } - - diff --git a/src/components/Navbar/Navbar.vue b/src/components/Navbar/Navbar.vue index c6359082..28079477 100644 --- a/src/components/Navbar/Navbar.vue +++ b/src/components/Navbar/Navbar.vue @@ -7,19 +7,18 @@ @click.stop="drawer = !drawer" /> -
- Vue - Torrent -
+ Vue + Torrent
- + - diff --git a/src/components/Navbar/TopActions.vue b/src/components/Navbar/TopActions.vue index 457c0e8c..2c318e3a 100644 --- a/src/components/Navbar/TopActions.vue +++ b/src/components/Navbar/TopActions.vue @@ -1,24 +1,20 @@ - - diff --git a/src/components/Navbar/TopMenu.vue b/src/components/Navbar/TopMenu.vue new file mode 100644 index 00000000..d280a2bc --- /dev/null +++ b/src/components/Navbar/TopMenu.vue @@ -0,0 +1,44 @@ + + + + diff --git a/src/components/Navbar/index.js b/src/components/Navbar/index.js index 1b2092e1..7afd0d02 100644 --- a/src/components/Navbar/index.js +++ b/src/components/Navbar/index.js @@ -6,6 +6,7 @@ import FreeSpace from './FreeSpace.vue' import SessionStats from './SessionStats.vue' import CurrentSpeed from './CurrentSpeed.vue' import FilterSelect from './FilterSelect.vue' +import TopMenu from './TopMenu.vue' export { Navbar, @@ -15,5 +16,6 @@ export { FreeSpace, SessionStats, CurrentSpeed, - FilterSelect + FilterSelect, + TopMenu } diff --git a/src/helpers.js b/src/helpers.js index 3b9d139e..ec7add9d 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -90,6 +90,7 @@ function createFile(data, name, children) { progress: Math.round(data.progress * 100), size: formatBytes(data.size), icon: getIconForFileType(name.split('.').pop()), + priority: data.priority, children: children } } diff --git a/src/styles/variables.scss b/src/styles/variables.scss index fac1791e..fe1d99e6 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -1,11 +1,11 @@ -$torrent-done: #3cd1c2; +$torrent-done: #3cd1c2; $torrent-downloading: #ffaa2c; $torrent-fail: #f83e70; $torrent-paused: #cfd8dc; $torrent-queued: #2e5eaa; -$torrent-seeding: #26a69a; +$torrent-seeding: #0D9488; $torrent-checking: #ff7043; -$torrent-stalled: #81c784; +$torrent-stalled: #4ADE80; $torrent-metadata: #7e57c2; $torrent-moving: #ffaa2c; diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index b0c95e8a..58364e5e 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -4,15 +4,21 @@ color="background" @click.self="resetSelected" > -

- Dashboard -

- {{ torrentCountString }} -

-

+ + +

+ Dashboard +

+
+ +

+ {{ torrentCountString }} +

+
+