app chrome changes, added app.macOSEmu()

This commit is contained in:
booploops 2022-03-28 22:15:40 -07:00
parent 474084deb8
commit 0d5be827c0
8 changed files with 210 additions and 82 deletions

View file

@ -166,6 +166,9 @@ const app = new Vue({
"handle": "CiderUser",
"artwork": { "url": "./assets/logocut.png" }
}
},
forceDirectives: {
},
menuOpened: false,
maximized: false,
@ -573,6 +576,10 @@ const app = new Vue({
this.setTheme(this.cfg.visual.theme)
}
if(this.platform == "darwin") {
this.chrome.windowControlPosition = "left"
}
this.setLz(this.cfg.general.language)
this.setLzManual()
clearTimeout(this.hangtimer)
@ -933,13 +940,20 @@ const app = new Vue({
less.refresh()
}
},
macOSEmu () {
this.chrome.forceDirectives["macosemu"] = {
value: true
}
this.chrome.windowControlPosition = "left"
},
getThemeDirective(directive = "") {
let directives = {}
if (typeof this.chrome.appliedTheme.info.directives == "object") {
directives = this.chrome.appliedTheme.info.directives
}
directives = Object.assign(directives, this.chrome.forceDirectives)
if (directives[directive]) {
return this.chrome.appliedTheme.info.directives[directive].value
return directives[directive].value
} else if (this.cfg.visual.directives[directive]) {
return this.cfg.visual.directives.windowLayout
} else {
@ -966,6 +980,9 @@ const app = new Vue({
if (this.getThemeDirective('windowLayout') == 'twopanel') {
classes.twopanel = true
}
if(this.getThemeDirective("macosemu") == true){
classes.macosemu = true
}
return classes
},
invokeDrawer(panel) {