mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
chore: add dev help code
This commit is contained in:
parent
0b59dc74dc
commit
0412095342
@ -383,5 +383,8 @@ module.exports = {
|
||||
},
|
||||
t,
|
||||
T,
|
||||
store: {},
|
||||
store: {
|
||||
isDevelopment: false,
|
||||
appVersion: '',
|
||||
},
|
||||
};
|
||||
|
@ -111,6 +111,7 @@ function createWindow() {
|
||||
mainWindow.webContents.on('did-finish-load', () => {
|
||||
mainWindow.webContents.send(IPC_CHANNELS.STORE_ON_WINDOW, {
|
||||
appVersion: app.getVersion(),
|
||||
isDevelopment,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -41,6 +41,12 @@ async function reportError(errorLogObj: ErrorLog, cb?: Function) {
|
||||
stack: errorLogObj.stack,
|
||||
more: JSON.stringify(errorLogObj.more ?? {}),
|
||||
};
|
||||
|
||||
if (frappe.store.isDevelopment) {
|
||||
console.log('errorHandling');
|
||||
console.log(body);
|
||||
}
|
||||
|
||||
await ipcRenderer.invoke(IPC_ACTIONS.SEND_ERROR, JSON.stringify(body));
|
||||
cb?.();
|
||||
}
|
||||
|
@ -102,6 +102,11 @@ export async function connectToLocalDatabase(filePath) {
|
||||
telemetry.start();
|
||||
await telemetry.setCount();
|
||||
|
||||
if (frappe.store.isDevelopment) {
|
||||
// @ts-ignore
|
||||
window.telemetry = telemetry;
|
||||
}
|
||||
|
||||
return { connectionSuccess: true, reason: '' };
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user