From 5f005267006a06b6880cdfcf98aa926faa72ddc1 Mon Sep 17 00:00:00 2001 From: Lisa P Date: Wed, 21 Oct 2015 10:59:22 +0200 Subject: [PATCH 1/3] add toggle functionality to profile token --- app/controllers/accounts.coffee | 6 ++++++ app/styles/app/layouts/profile.sass | 1 - app/templates/profile/accounts.hbs | 9 ++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) 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..e3a183e5 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 diff --git a/app/templates/profile/accounts.hbs b/app/templates/profile/accounts.hbs index 3d465e92..71226e63 100644 --- a/app/templates/profile/accounts.hbs +++ b/app/templates/profile/accounts.hbs @@ -9,7 +9,14 @@

{{userName}}

Repositories {{user.reposCount}}

{{/link-to}} -

Token: {{auth.currentUser.token}}

+

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

From 8c911fcc2ce984696b72a2c6513bcee2b10c40f3 Mon Sep 17 00:00:00 2001 From: Lisa P Date: Mon, 26 Oct 2015 12:34:57 +0100 Subject: [PATCH 2/3] add eye icon and tooltip to profile token toggle --- app/styles/app/layouts/profile.sass | 21 +++++++++++++++++++++ app/styles/app/modules/tooltips.sass | 8 ++++++++ app/templates/profile/accounts.hbs | 18 +++++++++++++++--- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/app/styles/app/layouts/profile.sass b/app/styles/app/layouts/profile.sass index e3a183e5..ca0634a6 100644 --- a/app/styles/app/layouts/profile.sass +++ b/app/styles/app/layouts/profile.sass @@ -239,6 +239,27 @@ p.profile-user-last right: 1em @extend .icon--dismiss-red +.profile-token-toggle + .icon-eye + vertical-align: middle + path + fill: #B6B7B9 + polygon + stroke: #B6B7B9 + fill: #fff + &:hover + path + fill: #666666 + polygon + stroke: #666666 + fill: #fff + &.is-visible + .icon-eye + polygon + fill: #B6B7B9 + &:hover + polygon + fill: #666666 #unadministerable-hooks p diff --git a/app/styles/app/modules/tooltips.sass b/app/styles/app/modules/tooltips.sass index 7a8625dc..cc6b17f2 100644 --- a/app/styles/app/modules/tooltips.sass +++ b/app/styles/app/modules/tooltips.sass @@ -84,3 +84,11 @@ height: 3.2em &:before left: 2em + +.tooltip--profile + @extend %tooltip + .tooltip-bubble + left: -120% + &:before + left: 35% + diff --git a/app/templates/profile/accounts.hbs b/app/templates/profile/accounts.hbs index 71226e63..f2805372 100644 --- a/app/templates/profile/accounts.hbs +++ b/app/templates/profile/accounts.hbs @@ -12,10 +12,22 @@

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

From 512450b7cedc4510a8794ed306966a06c4aca5f9 Mon Sep 17 00:00:00 2001 From: Lisa P Date: Mon, 26 Oct 2015 13:48:34 +0100 Subject: [PATCH 3/3] tweak icon iris and toolip --- app/styles/app/layouts/profile.sass | 8 ++++---- app/styles/app/modules/tooltips.sass | 5 +++-- app/templates/profile/accounts.hbs | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/styles/app/layouts/profile.sass b/app/styles/app/layouts/profile.sass index ca0634a6..28e85e87 100644 --- a/app/styles/app/layouts/profile.sass +++ b/app/styles/app/layouts/profile.sass @@ -244,21 +244,21 @@ p.profile-user-last vertical-align: middle path fill: #B6B7B9 - polygon + circle stroke: #B6B7B9 fill: #fff &:hover path fill: #666666 - polygon + circle stroke: #666666 fill: #fff &.is-visible .icon-eye - polygon + circle fill: #B6B7B9 &:hover - polygon + circle fill: #666666 #unadministerable-hooks diff --git a/app/styles/app/modules/tooltips.sass b/app/styles/app/modules/tooltips.sass index cc6b17f2..fb893cd5 100644 --- a/app/styles/app/modules/tooltips.sass +++ b/app/styles/app/modules/tooltips.sass @@ -88,7 +88,8 @@ .tooltip--profile @extend %tooltip .tooltip-bubble - left: -120% + left: -2.4em + width: 6em &:before - left: 35% + left: 2.5em diff --git a/app/templates/profile/accounts.hbs b/app/templates/profile/accounts.hbs index f2805372..1dddcf0e 100644 --- a/app/templates/profile/accounts.hbs +++ b/app/templates/profile/accounts.hbs @@ -24,7 +24,7 @@ - +