I am currently developing an electron app powered by electron version 5.0.0
The issue I'm facing is with utilizing electron's power monitor feature, which can only be accessed from the main electron js file. However, I need to communicate this information to a vue component. I attempted using an event bus:
powerMonitor.on('lock-screen', () => {
console.log("locked")
EventBus.$emit('logout');
})
})
But it seems that the event bus only functions within vue components. Does anyone have any solutions on how I can transmit an event from the electron main js file to a vue component?