Commit e18a08fd authored by Timothy Andrew's avatar Timothy Andrew

Implement second round of comments from @jschatz1.

- Just use a link for the clipboard button. Having a non-clickable
  container (that looks like a button) is confusing.
- Use `text-danger` for the "you won't be able to access it again" message.
- Highlight the created token so people know to look there.
parent 1779d68b
......@@ -200,6 +200,17 @@
text-align: center;
}
.created-personal-access-token-container {
#created-personal-access-token {
width: 90%;
display: inline;
}
.btn-clipboard {
margin-left: 5px;
}
}
.user-profile {
@media (max-width: $screen-xs-max) {
.cover-block {
......
......@@ -9,14 +9,13 @@
.col-lg-9
- if flash[:personal_access_token]
.created-personal-access-token
.created-personal-access-token-container
%h5.prepend-top-0
Your New Personal Access Token
.form-group
.input-group
= text_field_tag 'created-personal-access-token', flash[:personal_access_token], readonly: true, class: "form-control", 'aria-describedby' => "created-personal-access-token-help-block"
.input-group-addon= clipboard_button(clipboard_text: flash[:personal_access_token])
%span#created-personal-access-token-help-block.help-block Make sure you save it - you won't be able to access it again.
= clipboard_button(clipboard_text: flash[:personal_access_token])
%span#created-personal-access-token-help-block.help-block.text-danger Make sure you save it - you won't be able to access it again.
%hr
......@@ -111,3 +110,5 @@
$("#created-personal-access-token").click(function() {
this.select();
});
$("#created-personal-access-token").effect('highlight', { color: '#ffff99' }, 2000);
......@@ -12,7 +12,7 @@ describe 'Profile > Personal Access Tokens', feature: true, js: true do
end
def created_personal_access_token
find(".created-personal-access-token input").value
find("#created-personal-access-token").value
end
def disallow_personal_access_token_saves!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment