Merge branch 'upcoming' into upcoming
This commit is contained in:
commit
e0814e3c95
14 changed files with 432 additions and 138 deletions
|
@ -257,7 +257,7 @@ const app = new Vue({
|
|||
tmpVar: [],
|
||||
notification: false,
|
||||
chrome: {
|
||||
hideUserInfo: ipcRenderer.sendSync("is-dev"),
|
||||
hideUserInfo: ipcRenderer.sendSync("is-dev") || false,
|
||||
artworkReady: false,
|
||||
userinfo: {
|
||||
"id": "",
|
||||
|
@ -486,13 +486,21 @@ 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) {
|
||||
this.mk.privateEnabled = true
|
||||
// Hide UserInfo if Dev mode
|
||||
this.chrome.hideUserInfo = true
|
||||
} else {
|
||||
// Get Hide User from Settings
|
||||
this.chrome.hideUserInfo = !this.cfg.visual.showuserinfo
|
||||
}
|
||||
if (this.cfg.visual.hw_acceleration == "disabled") {
|
||||
document.body.classList.add("no-gpu")
|
||||
|
@ -560,7 +568,8 @@ const app = new Vue({
|
|||
app.mk.bitrate = app.cfg.audio.quality = 64
|
||||
break;
|
||||
default:
|
||||
app.mk.bitrate = app.cfg.audio.quality
|
||||
// app.mk.bitrate = app.cfg.audio.quality
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
@ -717,6 +726,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 }
|
||||
|
@ -3254,6 +3267,15 @@ const app = new Vue({
|
|||
return 0 !== s && (h = s > 0 ? "-" : "+"),
|
||||
`${h}${leadingZeros(n, 2)}:${leadingZeros(d, 2)}`
|
||||
},
|
||||
toggleHideUserInfo() {
|
||||
if(this.chrome.hideUserInfo) {
|
||||
this.cfg.visual.showuserinfo = true
|
||||
this.chrome.hideUserInfo = false
|
||||
} else {
|
||||
this.cfg.visual.showuserinfo = false
|
||||
this.chrome.hideUserInfo = true
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
@ -3518,4 +3540,4 @@ async function webGPU() {
|
|||
webGPU().then()
|
||||
|
||||
let screenWidth = screen.width;
|
||||
let screenHeight = screen.height;
|
||||
let screenHeight = screen.height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue