ssight / native-prompt

Create native prompts with Node.js and Electron
MIT License
24 stars 1 forks source link

Fixed and updated windows input box and customizable ok and cancel labels #4

Open leo20481141 opened 7 months ago

leo20481141 commented 7 months ago

Hello, in this pull request I have made some improvements to the native-prompt package, I fixed a bug that made non ascii characters like á or ñ in windows to be a question when the string was returned and I have made a more acurate input box for windows, for it to feel more acurate to how a real input box in windows would look like.

The problem that windows input box didn't accept non ascii characters was not in the input box itself, it was a problem when the spawner recieved the string, so I made a codification for non ascii characters before passing it to the node side and then in node I decode before resolving the promise.

About the new input box, I've commented the old one because I have some problems with it. I mean, it fells more modern windows input box but it is slower to start because it has to run powershell to start, and I know a .exe would be the best option (because it would be inmediate and I can make it look like a windows input box) but at the same time it's not open source, so I'm not sure to put it in the project.

About the ok and cancel labels, in Linux when you don't set it it is not passed to the command so if it is modified by the language settings it is not affected, but in windows, as I have to set a label for the buttons, when you don't set it, it is set as Ok or Cancel.

I updated the readme.md, installed the @types/node for there no longer be type isues and created a simple test to make testing easier. they're some minor but important details.

JerryI commented 5 months ago

Hello @leo20481141, I looks like the maintainer probably lost interest in this project. However, I believe it has some real value as a nice and easy solution for simple dialog input.

Thank you for improving windows's version

Then I have a question, if you tried to test it on Windows 11. I have seen Microsoft dropped VBS support in some version. Have you tried to check if it still works?