diff --git a/README.md b/README.md
index d264dc77..123da8e0 100644
--- a/README.md
+++ b/README.md
@@ -1,71 +1,71 @@
-# VueTorrent
-
-The sleekest looking WEBUI for qBittorrent made with Vuejs!
-
-> Vue, qBitorrent, Vuetify
-
-## Screenshots
-
-
-
-
-
-
-
-
-
-
-
-
-
-## Installation
-
-- Download & Unzip the latest release
-
-- Point your Alternate WEBUI location to it
-
-## Development
-
-- clone the repo
-
-- npm install
-
-- npm run serve
-
-## Features
-
-- viewing sessions stats ( down / upload speed, session uploaded / downloaded )
-- adding / removing / pausing / resuming torrents
-
-- sorting by every property shown!
-
-* mobile friendly! (maybe not for thousands of torrents...)
-
-- works on QBittorrent V4.2 and later
-
-## Contributing
-
-I'll gladly accept help/pull requests & advice! (this is my first project of this nature, pls be kind 😛 ).
-
-## FAQ
-
-- **Why build this??**
-
-* Why not? Most WebUI's look very dated and now it's no longer necessary to search for a remote control app!
-
-## Support
-
-Reach out to me at one of the following places!
-
-- `Facebook Messenger`
-
-* Open up an issue 😛
-
-[
](https://www.buymeacoffee.com/wdaan 'Buy me a coffee')
-
-## Credits
-
-- Dashboard design heavily inspired by: '[Net Ninja - Vuetify](https://github.com/iamshaunjp/vuetify-playlist)'.
- Also check out The Net Ninja's Youtube Channel.
-
+# VueTorrent
+
+The sleekest looking WEBUI for qBittorrent made with Vuejs!
+
+> Vue, qBitorrent, Vuetify
+
+## Screenshots
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Installation
+
+- Download & Unzip the latest release
+
+- Point your Alternate WEBUI location to it
+
+## Development
+
+- clone the repo
+
+- npm install
+
+- npm run serve
+
+## Features
+
+- viewing sessions stats ( down / upload speed, session uploaded / downloaded )
+- adding / removing / pausing / resuming torrents
+
+- sorting by every property shown!
+
+* mobile friendly! (maybe not for thousands of torrents...)
+
+- works on QBittorrent V4.2 and later
+
+## Contributing
+
+I'll gladly accept help/pull requests & advice! (this is my first project of this nature, pls be kind 😛 ).
+
+## FAQ
+
+- **Why build this??**
+
+* Why not? Most WebUI's look very dated and now it's no longer necessary to search for a remote control app!
+
+## Support
+
+Reach out to me at one of the following places!
+
+- `Facebook Messenger`
+
+* Open up an issue 😛
+
+[
](https://www.buymeacoffee.com/wdaan 'Buy me a coffee')
+
+## Credits
+
+- Dashboard design heavily inspired by: '[Net Ninja - Vuetify](https://github.com/iamshaunjp/vuetify-playlist)'.
+ Also check out The Net Ninja's Youtube Channel.
+
* This repo '[CzBiX qb-web ](https://github.com/CzBiX/qb-web)'
\ No newline at end of file
diff --git a/src/components/Modals/AddModal.vue b/src/components/Modals/AddModal.vue
index 2ab969b9..7be9eff7 100644
--- a/src/components/Modals/AddModal.vue
+++ b/src/components/Modals/AddModal.vue
@@ -57,6 +57,7 @@
@@ -83,6 +84,7 @@
diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue
index bddf026c..805cedc0 100644
--- a/src/components/Navbar.vue
+++ b/src/components/Navbar.vue
@@ -144,6 +144,29 @@
+
+
+
+
+ Diskspace
+
+
+
+ {{
+ stats.freeDiskSpace.substring(
+ 0,
+ stats.freeDiskSpace.indexOf(' ')
+ )
+ }}
+ {{
+ stats.freeDiskSpace.substring(
+ stats.freeDiskSpace.indexOf(' ')
+ )
+ }}
+
+
+
+
diff --git a/src/models/sessionStat.js b/src/models/sessionStat.js
index e4af5b46..e393380d 100644
--- a/src/models/sessionStat.js
+++ b/src/models/sessionStat.js
@@ -6,6 +6,7 @@ export default class Stat {
this.uploaded = this.formatBytes(data.up_info_data, 1)
this.dlspeed = this.formatBytes(data.dl_info_speed, 1)
this.upspeed = this.formatBytes(data.up_info_speed, 1)
+ this.freeDiskSpace = this.formatBytes(data.free_space_on_disk)
}
}
diff --git a/src/services/qbit.js b/src/services/qbit.js
index 14ccc837..b6533fff 100644
--- a/src/services/qbit.js
+++ b/src/services/qbit.js
@@ -28,6 +28,10 @@ class Qbit {
return data
}
+ async logout(){
+ this.axios.post('/auth/logout')
+ }
+
getGlobalTransferInfo() {
return this.axios.get('/transfer/info')
}
diff --git a/src/store/index.js b/src/store/index.js
index 239d753c..b0b19fd6 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -34,13 +34,15 @@ export default new Vuex.Store({
addmodal: false,
deletemodal: false,
settingsmodal: false
- }
+ },
+ settings : {}
},
getters: {
containsTorrent: state => hash =>
state.selected_torrents.includes(hash),
getTheme: state => () => state.darkTheme,
- getModalState: state => name => state.modals[name.toLowerCase()]
+ getModalState: state => name => state.modals[name.toLowerCase()],
+ getSettings: state => () => state.settings
},
mutations: {
@@ -69,6 +71,7 @@ export default new Vuex.Store({
state.darkTheme = !state.darkTheme
},
LOGOUT: state => {
+ qbit.logout()
state.authenticated = false
},
LOGIN: async (state, payload) => {
@@ -118,7 +121,11 @@ export default new Vuex.Store({
)
)
}
- }
+ },
+ SET_SETTINGS: async state => {
+ const {data} = await qbit.getAppPreferences()
+ state.settings.savePath = data.save_path;
+ }
},
actions: {
INIT_INTERVALS: async context => {
@@ -133,9 +140,11 @@ export default new Vuex.Store({
Vue.$toast.success('Successfully logged in!')
context.commit('LOGIN', true)
context.commit('updateMainData')
+ context.commit('SET_SETTINGS')
return true;
}
+ Vue.$toast.error('Log in failed 😕')
return false;
}
}
diff --git a/src/views/Login.vue b/src/views/Login.vue
index 0dfdb5ca..f562afef 100644
--- a/src/views/Login.vue
+++ b/src/views/Login.vue
@@ -20,6 +20,7 @@
:rules="inputRules"
@keyup.enter.native="Login"
autocomplete="current email"
+ name="username"
>