Skip to content

[feature request - ui tweak] ssh key adding form UI usability #6298

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

Closed
mateusza opened this issue Mar 10, 2019 · 5 comments
Closed

[feature request - ui tweak] ssh key adding form UI usability #6298

mateusza opened this issue Mar 10, 2019 · 5 comments
Labels
issue/stale type/enhancement An improvement of existing functionality

Comments

@mateusza
Copy link

Description

When adding new SSH key, key title should be automatically populated from public key comment field.

Additionally, in my personal opinion, swapping order of these two fields (making the key content textarea go above the title) would make it more intuitive. I often just paste the key into the first field available before realizing it's the "title" and the key should go into the other one.

The JS code:

var $sshKeyContent = $('#ssh-key-content')
$sshKeyContent.change(function() {
	var $sshKeyTitle = $('#ssh-key-title');
	if ( $sshKeyContent.val().length > 0 && $sshKeyTitle.val() === "" ){
		$sshKeyTitle.val( $sshKeyContent.val().trimRight().match( /^ssh-[^ ]* [^ ]* (.*)$/ )[1] );
	}
} );

Screenshots

image

@lunny
Copy link
Member

lunny commented Mar 11, 2019

Please send a PR to fix that.

@lunny lunny added the type/enhancement An improvement of existing functionality label Mar 11, 2019
mateusza added a commit to mateusza/gitea that referenced this issue Mar 12, 2019
@mateusza
Copy link
Author

I just noticed this was already implemented 2 YEARS AGO in #950 but it only works when the key comment does not contain any spaces. I will fix that.

@Piraty
Copy link

Piraty commented Mar 18, 2019

please don't swap the textboxes. Since their purpose is clearly stated, it makes sense they way it is. And yes, the comment is inserted automatically into the "key name" field

@stale
Copy link

stale bot commented May 17, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale stale bot added the issue/stale label May 17, 2019
@lunny
Copy link
Member

lunny commented May 19, 2019

This has been resolved.

@lunny lunny closed this as completed May 19, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/stale type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

3 participants