diff --git a/src/store/index.js b/src/store/index.js index 657891cb80..87d11098f3 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,6 +1,9 @@ import Vue from 'vue' import Vuex from 'vuex' import VuexPersist from 'vuex-persist' +import actions from './actions' +import getters from './getters' +import mutations from './mutations' const vuexPersist = new VuexPersist({ key: 'vuetorrent', @@ -14,10 +17,6 @@ const vuexPersist = new VuexPersist({ Vue.use(Vuex) -import getters from './getters' -import mutations from './mutations' -import actions from './actions' - export default new Vuex.Store({ plugins: [vuexPersist.plugin], state: { @@ -63,9 +62,10 @@ export default new Vuex.Store({ busyTorrentProperties: [ { name: 'Size', active: true }, { name: 'Progress', active: true }, - { name: 'Downloaded', active: true }, { name: 'Download', active: true }, { name: 'Upload', active: true }, + { name: 'Downloaded', active: true }, + { name: 'Uploaded', active: true }, { name: 'ETA', active: true }, { name: 'Peers', active: true }, { name: 'Seeds', active: true }, @@ -79,9 +79,10 @@ export default new Vuex.Store({ doneTorrentProperties: [ { name: 'Size', active: true }, { name: 'Progress', active: true }, - { name: 'Downloaded', active: true }, { name: 'Download', active: true }, { name: 'Upload', active: true }, + { name: 'Downloaded', active: true }, + { name: 'Uploaded', active: true }, { name: 'ETA', active: true }, { name: 'Peers', active: true }, { name: 'Seeds', active: true }, @@ -100,14 +101,13 @@ export default new Vuex.Store({ selectMode: false, searchPlugins: [] }, + actions: { + ...actions + }, getters: { ...getters }, - mutations: { ...mutations - }, - actions: { - ...actions } }) diff --git a/vue.config.js b/vue.config.js index 83e40995d5..e3ceb2db9e 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,4 +1,8 @@ const webpack = require('webpack') + +const qBittorrentPort = process.env['QBITTORRENT_PORT'] ?? 8080 +const vueTorrentPort = process.env['VUETORRENT_PORT'] ?? 8000 + module.exports = { chainWebpack: config => { config @@ -27,10 +31,10 @@ module.exports = { poll: true }, host: '0.0.0.0', - port: 8000, + port: `${vueTorrentPort}`, proxy: { '/api': { - target: 'http://localhost:8080' + target: `http://localhost:${qBittorrentPort}` } } }