refactor accounts, pt2
This commit is contained in:
parent
875ff4fb44
commit
b99dc5ee59
|
@ -1,10 +1,5 @@
|
||||||
`import Ember from 'ember'`
|
`import Ember from 'ember'`
|
||||||
|
|
||||||
Controller = Ember.ArrayController.extend
|
Controller = Ember.ArrayController.extend()
|
||||||
tab: 'accounts'
|
|
||||||
|
|
||||||
userName: (->
|
|
||||||
@get('user.name') || @get('user.login')
|
|
||||||
).property('user.login', 'user.name')
|
|
||||||
|
|
||||||
`export default Controller`
|
`export default Controller`
|
||||||
|
|
|
@ -21,9 +21,4 @@ Controller = Ember.Controller.extend
|
||||||
connectTab: (tab) ->
|
connectTab: (tab) ->
|
||||||
@set('tab', tab)
|
@set('tab', tab)
|
||||||
|
|
||||||
billingUrl: (->
|
|
||||||
id = if @get('account.type') == 'user' then 'user' else @get('account.login')
|
|
||||||
"#{@get('config').billingEndpoint}/subscriptions/#{id}"
|
|
||||||
).property('account.login', 'account.type')
|
|
||||||
|
|
||||||
`export default Controller`
|
`export default Controller`
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
<div class="media-elem">
|
<div class="media-elem">
|
||||||
{{#if avatarUrl}}
|
{{#if avatarUrl}}
|
||||||
<img src={{avatarUrl}} alt="avatar">
|
<img src={{avatarUrl}} alt="{{name}} avatar">
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="default-avatar--profile"></div>
|
<div class="default-avatar--profile"></div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
{{#link-to "account" account.login}}
|
{{#link-to "account" account.login}}
|
||||||
<h2>{{account.login}}</h2>
|
<h2>{{name}}</h2>
|
||||||
<p>Repositories <strong>{{reposCount}}</strong></p>
|
{{#if account.reposCount}}<p>Repositories <strong>{{account.reposCount}}</strong></p>{{else}}No repositories{{/if}}
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
|
|
||||||
{{#if isUser}}
|
{{#if isUser}}
|
||||||
|
|
|
@ -11,9 +11,10 @@
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{#if config.githubOrgsOauthAccessSettingsUrl}}
|
{{#if config.githubOrgsOauthAccessSettingsUrl}}
|
||||||
<section class="profile-additional">
|
<section class="profile-additional">
|
||||||
<p>Is an organization missing?<br>
|
<p>Is an organization missing?<br>
|
||||||
<a href={{config.githubOrgsOauthAccessSettingsUrl}} title="Orgs Oauth Access Settings on GitHub">Review and add</a> your authorized organizations.</p>
|
<a href={{config.githubOrgsOauthAccessSettingsUrl}} title="Organizations Oauth Access Settings on GitHub">Review and add</a> your authorized organizations.</p>
|
||||||
</section>
|
</section>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
@ -5,9 +5,5 @@ View = BasicView.extend
|
||||||
classNames: ['profile-orglist', 'columns', 'medium-4']
|
classNames: ['profile-orglist', 'columns', 'medium-4']
|
||||||
tagName: 'aside'
|
tagName: 'aside'
|
||||||
templateName: 'profile/accounts'
|
templateName: 'profile/accounts'
|
||||||
classAccounts: (->
|
|
||||||
'active' if @get('tab') == 'accounts'
|
|
||||||
).property('tab')
|
|
||||||
|
|
||||||
|
|
||||||
`export default View`
|
`export default View`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user