mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 08:15:02 -05: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
|
||||
<code>{{ spotify_required_scope | join }}</code>.
|
||||
</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>
|
||||
</template>
|
||||
@ -141,7 +146,7 @@ export default {
|
||||
},
|
||||
|
||||
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 []
|
||||
@ -176,6 +181,10 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
logout_spotify () {
|
||||
webapi.spotify_logout()
|
||||
},
|
||||
|
||||
login_lastfm () {
|
||||
webapi.lastfm_login(this.lastfm_login).then(response => {
|
||||
this.lastfm_login.user = ''
|
||||
|
@ -356,6 +356,10 @@ export default {
|
||||
return axios.post('./api/spotify-login', credentials)
|
||||
},
|
||||
|
||||
spotify_logout () {
|
||||
return axios.get('./api/spotify-logout')
|
||||
},
|
||||
|
||||
lastfm () {
|
||||
return axios.get('./api/lastfm')
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user