From d3ecb7b8714398682b1edb2af2ba2b244dacccc1 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 3 Jun 2019 23:53:37 +0200 Subject: [PATCH] music.mpd vue.js refactoring WIP --- .../http/static/css/source/common/elements/text.scss | 1 - .../backend/http/static/js/plugins/music.mpd/index.js | 9 +++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/platypush/backend/http/static/css/source/common/elements/text.scss b/platypush/backend/http/static/css/source/common/elements/text.scss index 2079e2899..b9fb2d0c1 100644 --- a/platypush/backend/http/static/css/source/common/elements/text.scss +++ b/platypush/backend/http/static/css/source/common/elements/text.scss @@ -14,7 +14,6 @@ input[type=text] { &:focus { border: $border-focus; - box-shadow: $text-shadow; } &.with-icon { diff --git a/platypush/backend/http/static/js/plugins/music.mpd/index.js b/platypush/backend/http/static/js/plugins/music.mpd/index.js index 90ca033bb..b439b6245 100644 --- a/platypush/backend/http/static/js/plugins/music.mpd/index.js +++ b/platypush/backend/http/static/js/plugins/music.mpd/index.js @@ -178,8 +178,13 @@ Vue.component('music-mpd', { text: 'Remove', icon: 'trash', click: async function() { + if (!confirm('Are you sure you want to remove the selected playlist' + + (Object.values(self.selectedBrowserItems).length > 1 ? 's' : '') + '?')) { + return; + } + const items = Object.values(self.selectedBrowserItems); - await self.rm(playlists); + await self.rm(items); self.selectedBrowserItems = {}; }, }); @@ -499,7 +504,7 @@ Vue.component('music-mpd', { return; } - let status = await request('music.mpd.rm', {resource: items.map(_ => _.name)}); + let status = await request('music.mpd.rm', {playlist: items.map(_ => _.name)}); this._parseStatus(status); items = await request('music.mpd.lsinfo', {uri: this.browserPath.join('/')});