refactor accounts, pt2
This commit is contained in:
parent
875ff4fb44
commit
b99dc5ee59
|
@ -1,10 +1,5 @@
|
|||
`import Ember from 'ember'`
|
||||
|
||||
Controller = Ember.ArrayController.extend
|
||||
tab: 'accounts'
|
||||
|
||||
userName: (->
|
||||
@get('user.name') || @get('user.login')
|
||||
).property('user.login', 'user.name')
|
||||
Controller = Ember.ArrayController.extend()
|
||||
|
||||
`export default Controller`
|
||||
|
|
|
@ -21,9 +21,4 @@ Controller = Ember.Controller.extend
|
|||
connectTab: (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`
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<div class="media-elem">
|
||||
{{#if avatarUrl}}
|
||||
<img src={{avatarUrl}} alt="avatar">
|
||||
<img src={{avatarUrl}} alt="{{name}} avatar">
|
||||
{{else}}
|
||||
<div class="default-avatar--profile"></div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="media-body">
|
||||
{{#link-to "account" account.login}}
|
||||
<h2>{{account.login}}</h2>
|
||||
<p>Repositories <strong>{{reposCount}}</strong></p>
|
||||
<h2>{{name}}</h2>
|
||||
{{#if account.reposCount}}<p>Repositories <strong>{{account.reposCount}}</strong></p>{{else}}No repositories{{/if}}
|
||||
{{/link-to}}
|
||||
|
||||
{{#if isUser}}
|
||||
|
|
|
@ -11,9 +11,10 @@
|
|||
{{/each}}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
{{#if config.githubOrgsOauthAccessSettingsUrl}}
|
||||
<section class="profile-additional">
|
||||
<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>
|
||||
{{/if}}
|
||||
|
|
|
@ -5,9 +5,5 @@ View = BasicView.extend
|
|||
classNames: ['profile-orglist', 'columns', 'medium-4']
|
||||
tagName: 'aside'
|
||||
templateName: 'profile/accounts'
|
||||
classAccounts: (->
|
||||
'active' if @get('tab') == 'accounts'
|
||||
).property('tab')
|
||||
|
||||
|
||||
`export default View`
|
||||
|
|
Loading…
Reference in New Issue
Block a user