Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont show secrets unless action is taken by user #153

Merged
merged 2 commits into from
Jul 23, 2024
Merged

Conversation

nichochar
Copy link
Contributor

This prevents the security vulnerability of accidentally showing secrets when sharing screen / streaming video.

Now it requires an explicit action from the user (see video).

Also added cmd + enter shortcut for submitting the form

CleanShot.2024-07-23.at.16.34.12.mp4

@nichochar nichochar merged commit 2f69b26 into main Jul 23, 2024
1 check passed
@nichochar nichochar deleted the dont-show-secrets branch July 23, 2024 23:44
@@ -264,13 +282,23 @@ function SecretRow(props: {
function NewSecretForm(props: {
setError: (message: string | null, clearAfter?: number | null) => void;
}) {
useHotkeys(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In all cases I've seen thus far for inputs, i find this pattern to be less obvious (the code is located somewhere other than the Input) and heavier weight than:

onKeydown={(e) => e.key === 'Enter' && onSubmit()}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants