mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 20:44:32 -05:00
Fix Electron Build (#1926)
This commit is contained in:
@@ -129,7 +129,9 @@ global.Actual = {
|
||||
return worker;
|
||||
},
|
||||
|
||||
setTheme: () => {},
|
||||
setTheme: theme => {
|
||||
window.__actionsForMenu.saveGlobalPrefs({ theme: theme });
|
||||
},
|
||||
};
|
||||
|
||||
document.addEventListener('keydown', e => {
|
||||
|
||||
@@ -14,10 +14,6 @@ export function handleGlobalEvents(actions, store) {
|
||||
// to update.
|
||||
});
|
||||
|
||||
global.Actual.setTheme = theme => {
|
||||
actions.saveGlobalPrefs({ theme });
|
||||
};
|
||||
|
||||
listen('server-error', info => {
|
||||
actions.addGenericErrorNotification();
|
||||
});
|
||||
|
||||
@@ -407,3 +407,11 @@ ipcMain.on('apply-update', () => {
|
||||
ipcMain.on('update-menu', (event, isBudgetOpen) => {
|
||||
updateMenu(isBudgetOpen);
|
||||
});
|
||||
|
||||
ipcMain.on('set-theme', theme => {
|
||||
let obj = { theme: theme };
|
||||
|
||||
clientWin.webContents.executeJavaScript(
|
||||
`window.__actionsForMenu && window.__actionsForMenu.saveGlobalPrefs(${obj})`,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -55,5 +55,7 @@ contextBridge.exposeInMainWorld('Actual', {
|
||||
return socketPromise;
|
||||
},
|
||||
|
||||
setTheme: () => {},
|
||||
setTheme: theme => {
|
||||
ipcRenderer.send('set-theme', theme);
|
||||
},
|
||||
});
|
||||
|
||||
6
upcoming-release-notes/1926.md
Normal file
6
upcoming-release-notes/1926.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [Shazib]
|
||||
---
|
||||
|
||||
Fix issue with electron builds being stuck on a blank screen.
|
||||
Reference in New Issue
Block a user