diff --git a/src/components/TorrentDetailModal/CreateNewTagDialog.vue b/src/components/TorrentDetailModal/CreateNewTagDialog.vue
new file mode 100644
index 00000000..7913bd63
--- /dev/null
+++ b/src/components/TorrentDetailModal/CreateNewTagDialog.vue
@@ -0,0 +1,68 @@
+
+
+
+
+
+ Create New Tag
+
+
+
+
+
+
+
+
+
+ Cancel
+ Save
+
+
+
+
+
+
+
+
diff --git a/src/components/TorrentDetailModal/DeleteTagDialog.vue b/src/components/TorrentDetailModal/DeleteTagDialog.vue
new file mode 100644
index 00000000..fd8a0e84
--- /dev/null
+++ b/src/components/TorrentDetailModal/DeleteTagDialog.vue
@@ -0,0 +1,59 @@
+
+
+
+
+
+ Delete Tag
+
+
+
+
+
+
+
+
+
+
+
+ Close
+
+
+
+
+
+
+
+
diff --git a/src/components/TorrentDetailModal/Tags.vue b/src/components/TorrentDetailModal/Tags.vue
index b74d813e..59111532 100644
--- a/src/components/TorrentDetailModal/Tags.vue
+++ b/src/components/TorrentDetailModal/Tags.vue
@@ -4,44 +4,65 @@
class="mx-auto mt-5"
style="font-size: 1.1em; max-height: 500px; min-height: 300px;"
>
-
-
-
- Available Tags:
-
-
-
- {{ tag }}
-
-
-
-
-
-
-
- Current Tags:
-
-
- {{ tag }}
-
-
-
+
+
+ Available Tags:
+
+
+
+ {{ tag }}
+
+
+
+
+
+ Current Tags:
+
+
+ {{ tag }}
+
+
+
+ Delete
+ Create new
+
+
+
@@ -49,11 +70,18 @@
import { difference } from 'lodash'
import { mapGetters } from 'vuex'
import qbit from '@/services/qbit'
+import CreateNewTagDialog from './CreateNewTagDialog'
+import DeleteTagDialog from './DeleteTagDialog'
export default {
name: 'Tags',
+ components: { CreateNewTagDialog, DeleteTagDialog },
props: {
hash: String
},
+ data: () => ({
+ CreateNewDialog: false,
+ DeleteDialog: false
+ }),
computed: {
...mapGetters(['getTorrent', 'getAvailableTags']),
torrent() {
diff --git a/src/services/qbit.js b/src/services/qbit.js
index 52634d07..1fe2d342 100644
--- a/src/services/qbit.js
+++ b/src/services/qbit.js
@@ -237,6 +237,22 @@ class Qbit {
return this.axios.post('/torrents/addTags ', data)
}
+ createTag(tag) {
+ const params = {
+ tags: tag
+ }
+ const data = new URLSearchParams(params)
+ return this.axios.post('/torrents/createTags ', data)
+ }
+
+ deleteTag(tag) {
+ const params = {
+ tags: tag
+ }
+ const data = new URLSearchParams(params)
+ return this.axios.post('/torrents/deleteTags ', data)
+ }
+
actionTorrents(action, hashes, extra) {
const params = {
hashes: hashes.join('|'),