add toggle functionality to profile token
This commit is contained in:
parent
def57c603b
commit
5f00526700
|
@ -7,4 +7,10 @@ Controller = Ember.ArrayController.extend
|
||||||
@get('user.name') || @get('user.login')
|
@get('user.name') || @get('user.login')
|
||||||
).property('user.login', 'user.name')
|
).property('user.login', 'user.name')
|
||||||
|
|
||||||
|
|
||||||
|
actions:
|
||||||
|
tokenVisibility: () ->
|
||||||
|
@toggleProperty('isVisible')
|
||||||
|
return false
|
||||||
|
|
||||||
`export default Controller`
|
`export default Controller`
|
||||||
|
|
|
@ -100,7 +100,6 @@
|
||||||
li
|
li
|
||||||
margin: 1.5rem 0 2.5rem
|
margin: 1.5rem 0 2.5rem
|
||||||
a
|
a
|
||||||
@extend %inline-block
|
|
||||||
width: 100%
|
width: 100%
|
||||||
&:hover
|
&:hover
|
||||||
h1, h2
|
h1, h2
|
||||||
|
|
|
@ -9,7 +9,14 @@
|
||||||
<h1>{{userName}}</h1>
|
<h1>{{userName}}</h1>
|
||||||
<p>Repositories <strong>{{user.reposCount}}</strong></p>
|
<p>Repositories <strong>{{user.reposCount}}</strong></p>
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
<p class="profile-user-last">Token: <strong>{{auth.currentUser.token}}</strong></p>
|
<p class="profile-user-last">Token:
|
||||||
|
|
||||||
|
{{#if isVisible}}
|
||||||
|
<strong>{{auth.currentUser.token}}</strong><a {{action 'tokenVisibility'}} class="profile-token-toggle">↼</a>
|
||||||
|
{{else}}
|
||||||
|
<a {{action 'tokenVisibility'}} class="profile-token-toggle">⇀</a>
|
||||||
|
{{/if}}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user