mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-24 22:25:56 -05:00
[htdocs] Show message in admin web interface if forked-daapd is missing
a Spotify web API scope
This commit is contained in:
parent
a87059265d
commit
9ba1e24b6c
@ -213,6 +213,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-show="spotify.webapi_token_valid">
|
<div v-show="spotify.webapi_token_valid">
|
||||||
<p><b>Spotify Web API</b>: access authorized for <b>{{ spotify.webapi_user }}</b></p>
|
<p><b>Spotify Web API</b>: access authorized for <b>{{ spotify.webapi_user }}</b></p>
|
||||||
|
<p v-if="spotify_missing_scope.length > 0" class="help is-danger">Please reauthorize Web API access to grant forked-daapd the following additional access rights: <b>{{ spotify_missing_scope | join }}</b></p>
|
||||||
<a class="button" v-bind:href="spotify.oauth_uri">Reauthorize Web API access</a>
|
<a class="button" v-bind:href="spotify.oauth_uri">Reauthorize Web API access</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,6 +24,15 @@ var app = new Vue({
|
|||||||
this.loadLastfm();
|
this.loadLastfm();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
spotify_missing_scope () {
|
||||||
|
if (this.spotify.webapi_token_valid && this.spotify.webapi_granted_scope && this.spotify.webapi_required_scope) {
|
||||||
|
return this.spotify.webapi_required_scope.split(' ').filter(scope => this.spotify.webapi_granted_scope.indexOf(scope) < 0)
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
loadConfig: function() {
|
loadConfig: function() {
|
||||||
axios.get('/api/config').then(response => {
|
axios.get('/api/config').then(response => {
|
||||||
|
Loading…
Reference in New Issue
Block a user