added app.isDev variable, privacy is now disabled by default unless dev is enabled
This commit is contained in:
parent
82301cde95
commit
1d2a072358
3 changed files with 12 additions and 2 deletions
3
index.js
3
index.js
|
@ -36,6 +36,9 @@ app.commandLine.appendSwitch('js-flags', '--max-old-space-size=1024')
|
|||
app.on('ready', () => {
|
||||
if (app.isQuiting) { app.quit(); return; }
|
||||
console.log('[Cider] Application is Ready. Creating Window.')
|
||||
if(!app.isPackaged) {
|
||||
console.info('[Cider] Running in development mode.')
|
||||
}
|
||||
CreateWindow()
|
||||
});
|
||||
|
||||
|
|
|
@ -183,6 +183,10 @@ const CiderBase = {
|
|||
event.returnValue = process.platform
|
||||
})
|
||||
|
||||
ipcMain.on("is-dev", (event) => {
|
||||
event.returnValue = !app.isPackaged
|
||||
})
|
||||
|
||||
// IPC stuff (listeners)
|
||||
ipcMain.on('close', () => { // listen for close event
|
||||
win.close();
|
||||
|
|
|
@ -109,6 +109,7 @@ class NavigationEvent {
|
|||
const app = new Vue({
|
||||
el: "#app",
|
||||
data: {
|
||||
isDev: ipcRenderer.sendSync("is-dev"),
|
||||
drawertest: false,
|
||||
platform: "",
|
||||
mk: {},
|
||||
|
@ -210,7 +211,7 @@ const app = new Vue({
|
|||
tmpVar: [],
|
||||
notification: false,
|
||||
chrome: {
|
||||
hideUserInfo: false,
|
||||
hideUserInfo: ipcRenderer.sendSync("is-dev"),
|
||||
artworkReady: false,
|
||||
userinfo: {
|
||||
"id": "",
|
||||
|
@ -300,7 +301,9 @@ const app = new Vue({
|
|||
this.mk = MusicKit.getInstance()
|
||||
this.mk.authorize()
|
||||
this.$forceUpdate()
|
||||
this.mk.privateEnabled = true
|
||||
if(this.isDev) {
|
||||
this.mk.privateEnabled = true
|
||||
}
|
||||
this.mk._services.timing.mode = 0
|
||||
this.platform = ipcRenderer.sendSync('cider-platform');
|
||||
// Set profile name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue