app will now reload on after logging in
This commit is contained in:
parent
5a661f3c01
commit
d2f384eecb
2 changed files with 9 additions and 2 deletions
|
@ -486,9 +486,12 @@ const app = new Vue({
|
||||||
let self = this
|
let self = this
|
||||||
clearTimeout(this.hangtimer)
|
clearTimeout(this.hangtimer)
|
||||||
this.mk = MusicKit.getInstance()
|
this.mk = MusicKit.getInstance()
|
||||||
|
let needsReload = (typeof localStorage["music.ampwebplay.media-user-token"] == "undefined")
|
||||||
this.mk.authorize().then(() => {
|
this.mk.authorize().then(() => {
|
||||||
self.mkIsReady = true
|
self.mkIsReady = true
|
||||||
//document.location.reload()
|
if(needsReload) {
|
||||||
|
document.location.reload()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
if (this.isDev) {
|
if (this.isDev) {
|
||||||
|
@ -708,6 +711,10 @@ const app = new Vue({
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
|
unauthorize() {
|
||||||
|
this.mk.unauthorize()
|
||||||
|
document.location.reload()
|
||||||
|
},
|
||||||
getAppClasses() {
|
getAppClasses() {
|
||||||
if (this.cfg.advanced.experiments.includes('compactui')) {
|
if (this.cfg.advanced.experiments.includes('compactui')) {
|
||||||
return { compact: true }
|
return { compact: true }
|
||||||
|
|
|
@ -252,7 +252,7 @@
|
||||||
<button class="usermenu-item" @click="appRoute('settings')">
|
<button class="usermenu-item" @click="appRoute('settings')">
|
||||||
Settings
|
Settings
|
||||||
</button>
|
</button>
|
||||||
<button class="usermenu-item" @click="mk.unauthorize()">
|
<button class="usermenu-item" @click="unauthorize()">
|
||||||
Sign Out
|
Sign Out
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue