From 35265e86ab812e9623bc98cd06616d17c805f025 Mon Sep 17 00:00:00 2001 From: CzBiX Date: Sat, 31 Aug 2019 23:53:58 +0800 Subject: [PATCH] Add edit tracker button --- src/Api.ts | 12 ++ src/components/Torrents.vue | 23 ++- src/components/dialogs/EditTrackerDialog.vue | 198 +++++++++++++++++++ 3 files changed, 231 insertions(+), 2 deletions(-) create mode 100644 src/components/dialogs/EditTrackerDialog.vue diff --git a/src/Api.ts b/src/Api.ts index fc5ef22..cb837a9 100644 --- a/src/Api.ts +++ b/src/Api.ts @@ -136,6 +136,18 @@ class Api { params, }).then(Api.handleResponse); } + + public editTracker(hash: string, origUrl: string, newUrl: string) { + const params = { + hash, + origUrl, + newUrl, + }; + + return this.axios.get('/torrents/editTracker', { + params, + }).then(Api.handleResponse); + } private actionTorrents(action: string, hashes: string[], extra?: any) { const params: any = { diff --git a/src/components/Torrents.vue b/src/components/Torrents.vue index 6c9299a..51484da 100644 --- a/src/components/Torrents.vue +++ b/src/components/Torrents.vue @@ -20,7 +20,7 @@ mdi-pause - + mdi-alert-circle @@ -61,9 +61,12 @@ - + mdi-bullhorn + + mdi-server + mdi-backup-restore @@ -135,6 +138,7 @@ + + + + + mdi-server + Edit tracker + + + + + Search + + Preview + + Result + + + + + + + + + + {{ toEdit.length }} torrent(s) to update. +
    +
  1. + {{ row.name }} +
    + {{ row.origUrl }} +
    + {{ row.newUrl }} +
  2. +
+
+ + + + +
+
+
+ + + Back + + +
+
+ + + + +