diff --git a/app/controllers/accounts.coffee b/app/controllers/accounts.coffee index d778bd6d..90b871bd 100644 --- a/app/controllers/accounts.coffee +++ b/app/controllers/accounts.coffee @@ -7,4 +7,10 @@ Controller = Ember.ArrayController.extend @get('user.name') || @get('user.login') ).property('user.login', 'user.name') + + actions: + tokenVisibility: () -> + @toggleProperty('isVisible') + return false + `export default Controller` diff --git a/app/styles/app/layouts/profile.sass b/app/styles/app/layouts/profile.sass index f9a135d5..28e85e87 100644 --- a/app/styles/app/layouts/profile.sass +++ b/app/styles/app/layouts/profile.sass @@ -100,7 +100,6 @@ li margin: 1.5rem 0 2.5rem a - @extend %inline-block width: 100% &:hover h1, h2 @@ -240,6 +239,27 @@ p.profile-user-last right: 1em @extend .icon--dismiss-red +.profile-token-toggle + .icon-eye + vertical-align: middle + path + fill: #B6B7B9 + circle + stroke: #B6B7B9 + fill: #fff + &:hover + path + fill: #666666 + circle + stroke: #666666 + fill: #fff + &.is-visible + .icon-eye + circle + fill: #B6B7B9 + &:hover + circle + fill: #666666 #unadministerable-hooks p diff --git a/app/styles/app/modules/tooltips.sass b/app/styles/app/modules/tooltips.sass index 7a8625dc..fb893cd5 100644 --- a/app/styles/app/modules/tooltips.sass +++ b/app/styles/app/modules/tooltips.sass @@ -84,3 +84,12 @@ height: 3.2em &:before left: 2em + +.tooltip--profile + @extend %tooltip + .tooltip-bubble + left: -2.4em + width: 6em + &:before + left: 2.5em + diff --git a/app/templates/profile/accounts.hbs b/app/templates/profile/accounts.hbs index 3d465e92..1dddcf0e 100644 --- a/app/templates/profile/accounts.hbs +++ b/app/templates/profile/accounts.hbs @@ -9,7 +9,26 @@

{{userName}}

Repositories {{user.reposCount}}

{{/link-to}} -

Token: {{auth.currentUser.token}}

+

Token: + + {{#if isVisible}} + {{auth.currentUser.token}} + {{/if}} + + + {{#if isVisible}}hide token{{else}}show token{{/if}} + + + + + + + + + +