Closed b0bdN closed 2 years ago
Hello, can you assign this to me?
Hi!, thanks for your interest! Of course you can work on this :)
What do you think will be best, should the comma be mandatory?
Some cities can be multiple words right? We should keep the comma mandatory
I am new to electron. Could you show me where in your code to create a dialog box in your to show the error? I have the logic that handles if the input is valid.
No worries ;) I think it will be better to check the input in the renderer process when the user click on the Apply button before sending all the values to the Main process. https://github.com/b0bdN/prayer-times-menubar-app/blob/06db1671277492d48a40d719682de747b8de5d77/renderer.js#L228
dialog
work only in the Main process, so you need to create an Inter-process communication (IPC) between the Renderer and the Main.
You can use window.api.send('custom-channel', arg)
, add custom-channel
in preload.js and listen in main.js with ipcMain.on('custom-channel', () => {dialog...}
https://github.com/b0bdN/prayer-times-menubar-app/blob/15074588857dacaefe949cbc30705014df91b53c/main.js#L234
We need to check if there is a comma (,) in the input for the City, Country when the user enter manually the information.
I think of two options:
dialog
box to show the error.