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
|
||||
clearTimeout(this.hangtimer)
|
||||
this.mk = MusicKit.getInstance()
|
||||
let needsReload = (typeof localStorage["music.ampwebplay.media-user-token"] == "undefined")
|
||||
this.mk.authorize().then(() => {
|
||||
self.mkIsReady = true
|
||||
//document.location.reload()
|
||||
if(needsReload) {
|
||||
document.location.reload()
|
||||
}
|
||||
})
|
||||
this.$forceUpdate()
|
||||
if (this.isDev) {
|
||||
|
@ -708,6 +711,10 @@ const app = new Vue({
|
|||
this.$forceUpdate()
|
||||
}, 500)
|
||||
},
|
||||
unauthorize() {
|
||||
this.mk.unauthorize()
|
||||
document.location.reload()
|
||||
},
|
||||
getAppClasses() {
|
||||
if (this.cfg.advanced.experiments.includes('compactui')) {
|
||||
return { compact: true }
|
||||
|
|
|
@ -252,7 +252,7 @@
|
|||
<button class="usermenu-item" @click="appRoute('settings')">
|
||||
Settings
|
||||
</button>
|
||||
<button class="usermenu-item" @click="mk.unauthorize()">
|
||||
<button class="usermenu-item" @click="unauthorize()">
|
||||
Sign Out
|
||||
</button>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue