diff --git a/platypush/backend/http/static/css/source/webpanel/plugins/media/torrents.scss b/platypush/backend/http/static/css/source/webpanel/plugins/media/torrents.scss index 70387bfb7c..b813c4a8e3 100644 --- a/platypush/backend/http/static/css/source/webpanel/plugins/media/torrents.scss +++ b/platypush/backend/http/static/css/source/webpanel/plugins/media/torrents.scss @@ -7,6 +7,17 @@ padding: 0; text-align: center; + .search { + input[type=text] { + width: 88%; + max-width: none; + } + + input[type=submit] { + width: 8%; + } + } + .head { font-weight: bold; padding: .5rem 0 2.5rem 0; diff --git a/platypush/backend/http/static/js/plugins/media/torrents.js b/platypush/backend/http/static/js/plugins/media/torrents.js index cdeebef00a..8c73435811 100644 --- a/platypush/backend/http/static/js/plugins/media/torrents.js +++ b/platypush/backend/http/static/js/plugins/media/torrents.js @@ -63,6 +63,16 @@ Vue.component('media-torrents', { this.selectedItem = item; openDropdown(this.$refs.menu); }, + + onMagnetDownload: async function() { + const magnet = this.$refs.magnetLink.value.trim(); + if (!magnet.length) + return; + + const ret = await request('torrent.download', { + torrent: magnet, + }); + } }, }); diff --git a/platypush/backend/http/templates/plugins/media/index.html b/platypush/backend/http/templates/plugins/media/index.html index 5c22e00977..40760f3766 100644 --- a/platypush/backend/http/templates/plugins/media/index.html +++ b/platypush/backend/http/templates/plugins/media/index.html @@ -27,7 +27,6 @@