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