fredrik-corneliusson / click-web

Serve click scripts over the web
MIT License
265 stars 17 forks source link

ADD: support for password inputs #6

Closed Uzay-G closed 3 years ago

Uzay-G commented 3 years ago

Could be cool to implement password inputs, like here.

I'm going to see if I can figure it out looking at the click_inputs file

fredrik-corneliusson commented 3 years ago

Sounds great, Will probably be hard to support the interactive prompt feature in click as the actual click process is just initialized with the arguments and the stdout is just streamed to the web process. If you are ok with just having an password field in the browser take a look at how EmailInput is done. https://github.com/fredrik-corneliusson/click-web/blob/master/click_web/resources/input_fields.py#L252

You can probably do something similar but instead of type_attrs['type'] = 'email' use type_attrs['type'] = 'password'

Uzay-G commented 3 years ago

I just noticed this issue looking back. I managed to get it working on my end, would you like me to make a PR?

fredrik-corneliusson commented 3 years ago

Sorry for the late reply. Sure, that would be great.

fredrik-corneliusson commented 3 years ago

Now implemented.

Uzay-G commented 3 years ago

Nice!