Change to secret inputs in response to #6338 in st2 #1035
+89
−49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes made:
1, removed password field type as it no longer serves any purpose. only the base primitive types are left (string / number / int...)
2, added a wrapper
3, secrets are now obfuscated using -webkit-text-security and this can be toggled by clicking on an "eye" icon.
4, if a field is marked as secret and the secret is not shown via visibility toggle, spellcheck is disabled
5, if input is secret, validation returns "*".repeat(v.length) instead of the value for types that return value in the error message
6, moved the "eye" icon a bit to the right to not overlap with the scrollbar
Feedback is welcome, I'm not a very good developer and I may not know all the things there is to know and may have missed something. These changes were tested in firefox / Edge and Chrome.
My 'gulp test' fails due to binding issues (TypeError: bind EINVAL 0.0.0.0). If anyone knows how to get around that, I'm all ears.