From 03da7e24df57fa2d508ad4bb87a5bda1a0bbd130 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Wed, 9 Jun 2021 12:56:04 +0200 Subject: [PATCH] Fixed spotify playlists not showing un in favorites tab --- public/js/bundle.js | 2 +- src/store/modules/login.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/bundle.js b/public/js/bundle.js index ccfcd69..31ffbfb 100644 --- a/public/js/bundle.js +++ b/public/js/bundle.js @@ -3073,7 +3073,7 @@ a { `)])])],1)}),0)])])])},__vue_staticRenderFns__$h=[];const __vue_inject_styles__$h=void 0,__vue_scope_id__$h=void 0,__vue_is_functional_template__$h=!1;function __vue_normalize__$h(e,a,n,i,r,s,l,c){const o=(typeof n=="function"?n.options:n)||{};return o.__file="Charts.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,r&&(o.functional=!0)),o._scopeId=i,o}var Charts=__vue_normalize__$h({render:__vue_render__$h,staticRenderFns:__vue_staticRenderFns__$h},__vue_inject_styles__$h,__vue_script__$h,__vue_scope_id__$h,__vue_is_functional_template__$h),script$g={computed:{...mapGetters(["getErrors"]),title(){return`${this.getErrors.artist} - ${this.getErrors.title}`},errors(){return this.getErrors.errors}}};const __vue_script__$g=script$g;var __vue_render__$g=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",[n("h1",{staticClass:"mb-8 text-5xl"},[e._v(e._s(e.$t("errors.title",{name:e.title})))]),e._v(" "),n("table",{staticClass:"table table--tracklist"},[n("tr",[n("th",[e._v("ID")]),e._v(" "),n("th",[e._v(e._s(e.$tc("globals.listTabs.artist",1)))]),e._v(" "),n("th",[e._v(e._s(e.$tc("globals.listTabs.title",1)))]),e._v(" "),n("th",[e._v(e._s(e.$tc("globals.listTabs.error",1)))])]),e._v(" "),e._l(e.errors,function(i){return n("tr",{key:i.data.id},[n("td",[e._v(e._s(i.data.id))]),e._v(" "),n("td",[e._v(e._s(i.data.artist))]),e._v(" "),n("td",[e._v(e._s(i.data.title))]),e._v(" "),n("td",[e._v(e._s(i.errid?e.$t("errors.ids."+i.errid):i.message))])])})],2)])},__vue_staticRenderFns__$g=[];const __vue_inject_styles__$g=void 0,__vue_scope_id__$g=void 0,__vue_is_functional_template__$g=!1;function __vue_normalize__$g(e,a,n,i,r,s,l,c){const o=(typeof n=="function"?n.options:n)||{};return o.__file="Errors.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,r&&(o.functional=!0)),o._scopeId=i,o}var Errors=__vue_normalize__$g({render:__vue_render__$g,staticRenderFns:__vue_staticRenderFns__$g},__vue_inject_styles__$g,__vue_script__$g,__vue_scope_id__$g,__vue_is_functional_template__$g),script$f={inheritAttrs:!1,props:{cover:{type:String,reqired:!0},isRounded:{type:Boolean,required:!1},isCircle:{type:Boolean,required:!1},link:{type:String,reqired:!0}}};const __vue_script__$f=script$f;var __vue_render__$f=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"relative cover-container group"},[n("img",{staticClass:"block w-full opacity-100 coverart",class:{rounded:e.isRounded,"rounded-full":e.isCircle},attrs:{"aria-hidden":"true",src:e.cover}}),e._v(" "),n("button",e._g({staticClass:"absolute p-0 text-center bg-black border-0 rounded-full opacity-0 download_overlay hover:bg-primary",attrs:{role:"button","aria-label":"download","data-link":e.link,tabindex:"0"}},e.$listeners),[n("i",{staticClass:"text-white cursor-pointer material-icons",attrs:{title:e.$t("globals.download_hint")}},[e._v("get_app")])])])},__vue_staticRenderFns__$f=[];const __vue_inject_styles__$f=function(e){!e||e("data-v-c6343cfa_0",{source:".cover-container[data-v-c6343cfa]{width:156px;height:156px;margin-bottom:10px}.cover-container .coverart[data-v-c6343cfa]{backface-visibility:hidden;transition:.5s ease;height:auto}.cover-container .download_overlay[data-v-c6343cfa]{top:50%;left:50%;transform:translate(-50%,-50%);transition:.5s ease;opacity:0;min-width:2rem;height:2.75rem;text-align:center}.cover-container .download_overlay i[data-v-c6343cfa]{padding:.625rem}.cover-container .download_overlay[data-v-c6343cfa]:focus{opacity:1}.cover-container:hover .coverart[data-v-c6343cfa]{opacity:.75}.cover-container:hover .download_overlay[data-v-c6343cfa]{opacity:1;border:0}",map:void 0,media:void 0})},__vue_scope_id__$f="data-v-c6343cfa",__vue_module_identifier__$3=void 0,__vue_is_functional_template__$f=!1;function __vue_normalize__$f(e,a,n,i,r,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="CoverContainer.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,r&&(o.functional=!0)),o._scopeId=i;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$3(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$3.styles||(__vue_create_injector__$3.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(r,s){if(document.querySelector('style[data-vue-ssr-id~="'+r+'"]'))return;const l=n?s.media||"default":r,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(r)){let o=s.source,u=c.ids.length;if(c.ids.push(r),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),n&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),n&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(n&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` -`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var CoverContainer=__vue_normalize__$f({render:__vue_render__$f,staticRenderFns:__vue_staticRenderFns__$f},__vue_inject_styles__$f,__vue_script__$f,__vue_scope_id__$f,__vue_is_functional_template__$f,__vue_module_identifier__$3,__vue_create_injector__$3);let settingsData={},defaultSettingsData={},spotifyCredentials={};async function getSettingsData(){{const e=await fetchData("getSettings"),{settings:a,defaultSettings:n,spotifySettings:i}=e;settingsData=a,defaultSettingsData=n,spotifyCredentials=i||{}}return{settingsData,defaultSettingsData,spotifyCredentials}}function getInitialPreviewVolume(){let e=parseInt(localStorage.getItem("previewVolume"));return isNaN(e)&&(e=80,localStorage.setItem("previewVolume",e.toString())),e}function checkInitialSlimDownloads(){return localStorage.getItem("slimDownloads")==="true"}function checkInitialSlimSidebar(){return localStorage.getItem("slimSidebar")==="true"}const state$2=()=>({currentCommit:null,latestCommit:null,updateAvailable:!1,deemixVersion:null,previewVolume:getInitialPreviewVolume(),hasSlimDownloads:checkInitialSlimDownloads(),hasSlimSidebar:checkInitialSlimSidebar()}),actions$2={setAppInfo({commit:e},a){e("SET_CURRENT_COMMIT",a.currentCommit),e("SET_LATEST_COMMIT",a.latestCommit),e("SET_UPDATE_AVAILABLE",a.updateAvailable),e("SET_DEEMIX_VERSION",a.deemixVersion)},setPreviewVolume({commit:e},a){e("SET_PREVIEW_VOLUME",a),localStorage.setItem("previewVolume",a.toString())},setSlimDownloads({commit:e},a){e("SET_SLIM_DOWNLOADS",a),localStorage.setItem("slimDownloads",a.toString())},setSlimSidebar({commit:e},a){e("SET_SLIM_SIDEBAR",a),localStorage.setItem("slimSidebar",a.toString()),Array.from(document.getElementsByClassName("toastify")).forEach(n=>{n.style.transform=`translate(${a?"3rem":"14rem"}, 0)`})}},getters$2={getAppInfo:e=>e,getPreviewVolume:e=>e.previewVolume,getSlimDownloads:e=>e.hasSlimDownloads,getSlimSidebar:e=>e.hasSlimSidebar},mutations$2={SET_CURRENT_COMMIT(e,a){e.currentCommit=a},SET_LATEST_COMMIT(e,a){e.latestCommit=a},SET_UPDATE_AVAILABLE(e,a){e.updateAvailable=a},SET_DEEMIX_VERSION(e,a){e.deemixVersion=a},SET_PREVIEW_VOLUME(e,a){e.previewVolume=a},SET_SLIM_DOWNLOADS(e,a){e.hasSlimDownloads=a},SET_SLIM_SIDEBAR(e,a){e.hasSlimSidebar=a}};var appInfo={state:state$2,getters:getters$2,actions:actions$2,mutations:mutations$2};const getDefaultState=()=>({arl:localStorage.getItem("arl")||"",accessToken:localStorage.getItem("accessToken")||"",status:null,user:{id:null,name:"",picture:""},spotifyUser:{id:localStorage.getItem("spotifyUser"),name:null,picture:null},clientMode:!1}),state$1=()=>getDefaultState(),actions$1={login({commit:e,dispatch:a},n){const{arl:i,user:r,status:s}=n;a("setARL",{arl:i}),e("SET_USER",r),e("SET_STATUS",s)},logout({commit:e}){localStorage.removeItem("arl"),localStorage.removeItem("accessToken"),e("RESET_LOGIN")},setARL({commit:e},a){let{arl:n,saveOnLocalStorage:i}=a;i=typeof i=="undefined"?!0:i,e("SET_ARL",n),i&&localStorage.setItem("arl",n)},setAccessToken({commit:e},a){let{accessToken:n,saveOnLocalStorage:i}=a;i=typeof i=="undefined"?!0:i,e("SET_ACCESS_TOKEN",n),i&&localStorage.setItem("accessToken",n)},removeARL({commit:e}){e("SET_ARL",""),localStorage.removeItem("arl")},removeAccessToken({commit:e}){e("SET_ACCESS_TOKEN",""),localStorage.removeItem("accessToken")},setUser({commit:e},a){e("SET_USER",a)},setClientMode({commit:e},a){e("SET_CLIENT_MODE",a)}},getters$1={getARL:e=>e.arl,getAccessToken:e=>e.accessToken,getUser:e=>e.user,getSpotifyUser:e=>e.spotifyUser,getClientMode:e=>e.clientMode,isLoggedIn:e=>!!e.arl,isLoggedWithSpotify:e=>!!e.spotifyUser.id&&!!e.spotifyUser.name},mutations$1={SET_ARL(e,a){e.arl=a},SET_ACCESS_TOKEN(e,a){e.accessToken=a},SET_STATUS(e,a){e.status=a},SET_USER(e,a){e.user=a},SET_CLIENT_MODE(e,a){e.clientMode=a},RESET_LOGIN(e){const a=e.clientMode;Object.assign(e,getDefaultState()),e.clientMode=a}};var login={state:state$1,getters:getters$1,actions:actions$1,mutations:mutations$1};const state=()=>({artist:"",bitrate:"",cover:"",downloaded:0,errors:[],failed:0,id:"",progress:0,silent:!0,size:0,title:"",type:"",uuid:""}),actions={setErrors({commit:e},a){e("SET_ERRORS",a)}},getters={getErrors:e=>e},mutations={SET_ERRORS(e,a){for(const n in e)if(e.hasOwnProperty(n)){const i=a[n];e[n]=i}}};var errors={state,getters,actions,mutations};Vue$2.use(index);var store=new index.Store({modules:{appInfo,login,errors},strict:!1});const favoriteArtists=ref([]),favoriteAlbums=ref([]),favoriteSpotifyPlaylists=ref([]),favoritePlaylists=ref([]),favoriteTracks=ref([]),isRefreshingFavorites=ref(!1);function refreshFavorites({isInitial:e=!1}){e||(isRefreshingFavorites.value=!0),fetchData("getUserFavorites").then(setAllFavorites).catch(console.error),store.getters.isLoggedWithSpotify&&fetchData("getUserSpotifyPlaylists",{spotifyUser:store.getters.getSpotifyUser.id}).then(a=>{favoriteSpotifyPlaylists.value=a}).catch(console.error)}function setAllFavorites(e){const{tracks:a,albums:n,artists:i,playlists:r}=e;isRefreshingFavorites.value=!1,favoriteArtists.value=i,favoriteAlbums.value=n,favoritePlaylists.value=r,favoriteTracks.value=a}function useFavorites(){return{favoriteArtists,favoriteAlbums,favoriteSpotifyPlaylists,favoritePlaylists,favoriteTracks,isRefreshingFavorites,refreshFavorites}}var script$e=defineComponent({components:{PreviewControls,CoverContainer,BaseTabs,BaseTab},setup(e,a){const n=reactive({activeTab:"playlist",tabs:["playlist","album","artist","track"]}),{favoriteArtists:i,favoriteAlbums:r,favoriteSpotifyPlaylists:s,favoritePlaylists:l,favoriteTracks:c,isRefreshingFavorites:o,refreshFavorites:u}=useFavorites();return u({isInitial:!0}),watch(o,(d,f)=>{!(f&&!d)||toast(a.root.$t("toasts.refreshFavs"),"done",!0)}),{...toRefs(n),tracks:c,albums:r,artists:i,playlists:l,spotifyPlaylists:s,refreshFavorites:u,isRefreshingFavorites:o}},computed:{activeTabEmpty(){return this.getActiveRelease()?.length===0}},methods:{playPausePreview,convertDuration,downloadAllOfType(){try{const e=this.getActiveRelease();if(this.activeTab==="track"){const a=this.getLovedTracksPlaylist();sendAddToQueue(a.link)}else sendAddToQueue(aggregateDownloadLinks(e))}catch(e){console.error(e.message)}},addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)},getActiveRelease(e=this.activeTab){let a;switch(e){case"playlist":a=this.playlists;break;case"album":a=this.albums;break;case"artist":a=this.artists;break;case"track":a=this.tracks;break}return a},getTabLength(e=this.activeTab){return this[`${e}s`]?.length||0},getLovedTracksPlaylist(){const e=this.playlists.filter(a=>a.is_loved_track);if(e.length!==0)return e[0];throw new Error("No loved tracks playlist!")}}});const __vue_script__$e=script$e;var __vue_render__$e=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",[n("h1",{staticClass:"mb-8 text-5xl"},[e._v(` +`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var CoverContainer=__vue_normalize__$f({render:__vue_render__$f,staticRenderFns:__vue_staticRenderFns__$f},__vue_inject_styles__$f,__vue_script__$f,__vue_scope_id__$f,__vue_is_functional_template__$f,__vue_module_identifier__$3,__vue_create_injector__$3);let settingsData={},defaultSettingsData={},spotifyCredentials={};async function getSettingsData(){{const e=await fetchData("getSettings"),{settings:a,defaultSettings:n,spotifySettings:i}=e;settingsData=a,defaultSettingsData=n,spotifyCredentials=i||{}}return{settingsData,defaultSettingsData,spotifyCredentials}}function getInitialPreviewVolume(){let e=parseInt(localStorage.getItem("previewVolume"));return isNaN(e)&&(e=80,localStorage.setItem("previewVolume",e.toString())),e}function checkInitialSlimDownloads(){return localStorage.getItem("slimDownloads")==="true"}function checkInitialSlimSidebar(){return localStorage.getItem("slimSidebar")==="true"}const state$2=()=>({currentCommit:null,latestCommit:null,updateAvailable:!1,deemixVersion:null,previewVolume:getInitialPreviewVolume(),hasSlimDownloads:checkInitialSlimDownloads(),hasSlimSidebar:checkInitialSlimSidebar()}),actions$2={setAppInfo({commit:e},a){e("SET_CURRENT_COMMIT",a.currentCommit),e("SET_LATEST_COMMIT",a.latestCommit),e("SET_UPDATE_AVAILABLE",a.updateAvailable),e("SET_DEEMIX_VERSION",a.deemixVersion)},setPreviewVolume({commit:e},a){e("SET_PREVIEW_VOLUME",a),localStorage.setItem("previewVolume",a.toString())},setSlimDownloads({commit:e},a){e("SET_SLIM_DOWNLOADS",a),localStorage.setItem("slimDownloads",a.toString())},setSlimSidebar({commit:e},a){e("SET_SLIM_SIDEBAR",a),localStorage.setItem("slimSidebar",a.toString()),Array.from(document.getElementsByClassName("toastify")).forEach(n=>{n.style.transform=`translate(${a?"3rem":"14rem"}, 0)`})}},getters$2={getAppInfo:e=>e,getPreviewVolume:e=>e.previewVolume,getSlimDownloads:e=>e.hasSlimDownloads,getSlimSidebar:e=>e.hasSlimSidebar},mutations$2={SET_CURRENT_COMMIT(e,a){e.currentCommit=a},SET_LATEST_COMMIT(e,a){e.latestCommit=a},SET_UPDATE_AVAILABLE(e,a){e.updateAvailable=a},SET_DEEMIX_VERSION(e,a){e.deemixVersion=a},SET_PREVIEW_VOLUME(e,a){e.previewVolume=a},SET_SLIM_DOWNLOADS(e,a){e.hasSlimDownloads=a},SET_SLIM_SIDEBAR(e,a){e.hasSlimSidebar=a}};var appInfo={state:state$2,getters:getters$2,actions:actions$2,mutations:mutations$2};const getDefaultState=()=>({arl:localStorage.getItem("arl")||"",accessToken:localStorage.getItem("accessToken")||"",status:null,user:{id:null,name:"",picture:""},spotifyUser:{id:localStorage.getItem("spotifyUser"),name:null,picture:null},clientMode:!1}),state$1=()=>getDefaultState(),actions$1={login({commit:e,dispatch:a},n){const{arl:i,user:r,status:s}=n;a("setARL",{arl:i}),e("SET_USER",r),e("SET_STATUS",s)},logout({commit:e}){localStorage.removeItem("arl"),localStorage.removeItem("accessToken"),e("RESET_LOGIN")},setARL({commit:e},a){let{arl:n,saveOnLocalStorage:i}=a;i=typeof i=="undefined"?!0:i,e("SET_ARL",n),i&&localStorage.setItem("arl",n)},setAccessToken({commit:e},a){let{accessToken:n,saveOnLocalStorage:i}=a;i=typeof i=="undefined"?!0:i,e("SET_ACCESS_TOKEN",n),i&&localStorage.setItem("accessToken",n)},removeARL({commit:e}){e("SET_ARL",""),localStorage.removeItem("arl")},removeAccessToken({commit:e}){e("SET_ACCESS_TOKEN",""),localStorage.removeItem("accessToken")},setUser({commit:e},a){e("SET_USER",a)},setClientMode({commit:e},a){e("SET_CLIENT_MODE",a)}},getters$1={getARL:e=>e.arl,getAccessToken:e=>e.accessToken,getUser:e=>e.user,getSpotifyUser:e=>e.spotifyUser,getClientMode:e=>e.clientMode,isLoggedIn:e=>!!e.arl,isLoggedWithSpotify:e=>!!e.spotifyUser.id},mutations$1={SET_ARL(e,a){e.arl=a},SET_ACCESS_TOKEN(e,a){e.accessToken=a},SET_STATUS(e,a){e.status=a},SET_USER(e,a){e.user=a},SET_CLIENT_MODE(e,a){e.clientMode=a},RESET_LOGIN(e){const a=e.clientMode;Object.assign(e,getDefaultState()),e.clientMode=a}};var login={state:state$1,getters:getters$1,actions:actions$1,mutations:mutations$1};const state=()=>({artist:"",bitrate:"",cover:"",downloaded:0,errors:[],failed:0,id:"",progress:0,silent:!0,size:0,title:"",type:"",uuid:""}),actions={setErrors({commit:e},a){e("SET_ERRORS",a)}},getters={getErrors:e=>e},mutations={SET_ERRORS(e,a){for(const n in e)if(e.hasOwnProperty(n)){const i=a[n];e[n]=i}}};var errors={state,getters,actions,mutations};Vue$2.use(index);var store=new index.Store({modules:{appInfo,login,errors},strict:!1});const favoriteArtists=ref([]),favoriteAlbums=ref([]),favoriteSpotifyPlaylists=ref([]),favoritePlaylists=ref([]),favoriteTracks=ref([]),isRefreshingFavorites=ref(!1);function refreshFavorites({isInitial:e=!1}){e||(isRefreshingFavorites.value=!0),fetchData("getUserFavorites").then(setAllFavorites).catch(console.error),store.getters.isLoggedWithSpotify&&fetchData("getUserSpotifyPlaylists",{spotifyUser:store.getters.getSpotifyUser.id}).then(a=>{favoriteSpotifyPlaylists.value=a}).catch(console.error)}function setAllFavorites(e){const{tracks:a,albums:n,artists:i,playlists:r}=e;isRefreshingFavorites.value=!1,favoriteArtists.value=i,favoriteAlbums.value=n,favoritePlaylists.value=r,favoriteTracks.value=a}function useFavorites(){return{favoriteArtists,favoriteAlbums,favoriteSpotifyPlaylists,favoritePlaylists,favoriteTracks,isRefreshingFavorites,refreshFavorites}}var script$e=defineComponent({components:{PreviewControls,CoverContainer,BaseTabs,BaseTab},setup(e,a){const n=reactive({activeTab:"playlist",tabs:["playlist","album","artist","track"]}),{favoriteArtists:i,favoriteAlbums:r,favoriteSpotifyPlaylists:s,favoritePlaylists:l,favoriteTracks:c,isRefreshingFavorites:o,refreshFavorites:u}=useFavorites();return u({isInitial:!0}),watch(o,(d,f)=>{!(f&&!d)||toast(a.root.$t("toasts.refreshFavs"),"done",!0)}),{...toRefs(n),tracks:c,albums:r,artists:i,playlists:l,spotifyPlaylists:s,refreshFavorites:u,isRefreshingFavorites:o}},computed:{activeTabEmpty(){return this.getActiveRelease()?.length===0}},methods:{playPausePreview,convertDuration,downloadAllOfType(){try{const e=this.getActiveRelease();if(this.activeTab==="track"){const a=this.getLovedTracksPlaylist();sendAddToQueue(a.link)}else sendAddToQueue(aggregateDownloadLinks(e))}catch(e){console.error(e.message)}},addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)},getActiveRelease(e=this.activeTab){let a;switch(e){case"playlist":a=this.playlists;break;case"album":a=this.albums;break;case"artist":a=this.artists;break;case"track":a=this.tracks;break}return a},getTabLength(e=this.activeTab){return this[`${e}s`]?.length||0},getLovedTracksPlaylist(){const e=this.playlists.filter(a=>a.is_loved_track);if(e.length!==0)return e[0];throw new Error("No loved tracks playlist!")}}});const __vue_script__$e=script$e;var __vue_render__$e=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",[n("h1",{staticClass:"mb-8 text-5xl"},[e._v(` `+e._s(e.$t("favorites.title"))+` `),n("div",{ref:"reloadButton",staticClass:"inline-block clickable",attrs:{"aria-label":"reload",role:"button"},on:{click:e.refreshFavorites}},[n("i",{staticClass:"material-icons",class:{spin:e.isRefreshingFavorites}},[e._v("sync")])])]),e._v(" "),n("BaseTabs",e._l(e.tabs,function(i){return n("BaseTab",{key:i,class:{active:e.activeTab===i},on:{click:function(r){e.activeTab=i}}},[e._v(` `+e._s(e.$tc("globals.listTabs."+i,2))+` diff --git a/src/store/modules/login.js b/src/store/modules/login.js index b4d0265..cd67165 100644 --- a/src/store/modules/login.js +++ b/src/store/modules/login.js @@ -81,7 +81,7 @@ const getters = { getClientMode: state => state.clientMode, isLoggedIn: state => !!state.arl, - isLoggedWithSpotify: state => !!state.spotifyUser.id && !!state.spotifyUser.name + isLoggedWithSpotify: state => !!state.spotifyUser.id } const mutations = {