From 2959876f2bb74a35e63ea622cf60e2665921b558 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Tue, 18 Aug 2020 18:47:33 -0600 Subject: [PATCH] Re-enable the export playlist button when any field has changed --- src/components/modals/PlaylistExport.vue | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/components/modals/PlaylistExport.vue b/src/components/modals/PlaylistExport.vue index 2a50a90..ee22bc2 100644 --- a/src/components/modals/PlaylistExport.vue +++ b/src/components/modals/PlaylistExport.vue @@ -96,6 +96,13 @@ export default { }); }, computed: { + payload() { + return { + name: this.name, + description: this.description, + public: this.is_public, + }; + }, can_export() { // Spotify has a name length of 100 characters, ensure we don't error @@ -104,7 +111,11 @@ export default { }; if (this.exported_settings) { - + return ( + this.payload.name != this.exported_settings.name + || this.payload.description != this.exported_settings.description + || this.payload.is_public != this.exported_settings.is_public + ) }; return true; } @@ -112,13 +123,7 @@ export default { methods: { create_playlist() { - // Generate payload object - let payload = { - name: this.name, - description: this.description, - public: this.is_public - }; - + let payload = this.payload this.exported_settings = payload; // Create the Spotify playlist (no tracks yet)