mirror of
https://github.com/owntone/owntone-server.git
synced 2025-05-24 02:46:17 -04:00
[web] Add option to remove spotify (logout) in settings
This commit is contained in:
parent
791d3610fd
commit
05e367a84b
@ -67,6 +67,11 @@
|
|||||||
Access to the Spotify Web API enables scanning of your Spotify library. Required scopes are
|
Access to the Spotify Web API enables scanning of your Spotify library. Required scopes are
|
||||||
<code>{{ spotify_required_scope | join }}</code>.
|
<code>{{ spotify_required_scope | join }}</code>.
|
||||||
</p>
|
</p>
|
||||||
|
<div v-if="spotify.webapi_token_valid" class="field fd-has-margin-top ">
|
||||||
|
<div class="control">
|
||||||
|
<a class="button is-danger" @click="logout_spotify">Logout</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -141,7 +146,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
spotify_required_scope () {
|
spotify_required_scope () {
|
||||||
if (this.spotify.webapi_token_valid && this.spotify.webapi_granted_scope && this.spotify.webapi_required_scope) {
|
if (this.spotify.webapi_required_scope) {
|
||||||
return this.spotify.webapi_required_scope.split(' ')
|
return this.spotify.webapi_required_scope.split(' ')
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
@ -176,6 +181,10 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
logout_spotify () {
|
||||||
|
webapi.spotify_logout()
|
||||||
|
},
|
||||||
|
|
||||||
login_lastfm () {
|
login_lastfm () {
|
||||||
webapi.lastfm_login(this.lastfm_login).then(response => {
|
webapi.lastfm_login(this.lastfm_login).then(response => {
|
||||||
this.lastfm_login.user = ''
|
this.lastfm_login.user = ''
|
||||||
|
@ -356,6 +356,10 @@ export default {
|
|||||||
return axios.post('./api/spotify-login', credentials)
|
return axios.post('./api/spotify-login', credentials)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
spotify_logout () {
|
||||||
|
return axios.get('./api/spotify-logout')
|
||||||
|
},
|
||||||
|
|
||||||
lastfm () {
|
lastfm () {
|
||||||
return axios.get('./api/lastfm')
|
return axios.get('./api/lastfm')
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user