Show dialog when starting, where user is able to input part of the URL?


#1

I have created an Electron JS app which visits a my external site. What I want to do is to show a dialog when the application opens, where the user is asked to input their username, when pressing OK the loadURL will append the username to the existing URL. And on the next launch it will show the dialog (but prefilled with the username).

This is how it looks right now:
mainWindow.loadURL('https://mydomain.com/u/user1')
and I want it to be
mainWindow.loadURL('https://mydomain.com/u/')

And after the dialog is saved the URL should be appended with “user1” that was input in the dialog.

Hope this is possible!