Add skymode event handling in preload.js
This commit is contained in:
@@ -80,3 +80,8 @@ ipcRenderer.on('theme-changed', (_e, theme) => {
|
||||
window.dispatchEvent(new CustomEvent('theme-changed', { detail: theme }));
|
||||
window.dispatchEvent(new CustomEvent('skymode-changed', { detail: theme === 'sky' }));
|
||||
});
|
||||
ipcRenderer.on('skymode-changed', (_e, val) => {
|
||||
const theme = val ? 'sky' : 'default';
|
||||
window.dispatchEvent(new CustomEvent('theme-changed', { detail: theme }));
|
||||
window.dispatchEvent(new CustomEvent('skymode-changed', { detail: val }));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user