From c0fe47f2c18749d50facaec1d05af2b67cb8831c Mon Sep 17 00:00:00 2001 From: Lisa P Date: Tue, 25 Aug 2015 18:00:03 -0400 Subject: [PATCH 1/3] delete some templates that are not used anymore --- app/templates/profile/repo.hbs | 3 --- app/templates/profile/show.hbs | 4 ---- app/templates/profile/tabs.hbs | 21 --------------------- app/templates/profile/tabs/user.hbs | 29 ----------------------------- 4 files changed, 57 deletions(-) delete mode 100644 app/templates/profile/repo.hbs delete mode 100644 app/templates/profile/show.hbs delete mode 100644 app/templates/profile/tabs.hbs delete mode 100644 app/templates/profile/tabs/user.hbs diff --git a/app/templates/profile/repo.hbs b/app/templates/profile/repo.hbs deleted file mode 100644 index 43d6cf6c..00000000 --- a/app/templates/profile/repo.hbs +++ /dev/null @@ -1,3 +0,0 @@ -

Settings: {{slug}}

- -{{outlet}} diff --git a/app/templates/profile/show.hbs b/app/templates/profile/show.hbs deleted file mode 100644 index f1f831bf..00000000 --- a/app/templates/profile/show.hbs +++ /dev/null @@ -1,4 +0,0 @@ -{{!--
- {{outlet}} -
- --}} \ No newline at end of file diff --git a/app/templates/profile/tabs.hbs b/app/templates/profile/tabs.hbs deleted file mode 100644 index f7e232be..00000000 --- a/app/templates/profile/tabs.hbs +++ /dev/null @@ -1,21 +0,0 @@ - diff --git a/app/templates/profile/tabs/user.hbs b/app/templates/profile/tabs/user.hbs deleted file mode 100644 index b10cf139..00000000 --- a/app/templates/profile/tabs/user.hbs +++ /dev/null @@ -1,29 +0,0 @@ -{{!-- - -
-
-
- GitHub -
-
- {{user.login}} -
-
-
-
- Email -
-
- {{user.email}} -
-
-
-
- Token -
-
- {{user.token}} -
-
-
- --}} From 33c439a92886e440eb24d752f931edb0dd708c99 Mon Sep 17 00:00:00 2001 From: Lisa P Date: Tue, 25 Aug 2015 18:00:51 -0400 Subject: [PATCH 2/3] display right account name, but only in slug form --- app/controllers/account.coffee | 8 ++++++-- app/templates/account.hbs | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/controllers/account.coffee b/app/controllers/account.coffee index a922a5a8..5ffba74a 100644 --- a/app/controllers/account.coffee +++ b/app/controllers/account.coffee @@ -29,6 +29,10 @@ Controller = Ember.Controller.extend @set('allHooks', hooks) + accountName: (-> + @get('allHooks').get('firstObject.ownerName') + ).property('allHooks') + hooks: (-> @reloadHooks() unless hooks = @get('allHooks') @get('allHooks').filter (hook) -> hook.get('admin') @@ -41,11 +45,11 @@ Controller = Ember.Controller.extend showPrivateReposHint: (-> @config.show_repos_hint == 'private' - ) .property() + ).property() showPublicReposHint: (-> @config.show_repos_hint == 'public' - ) .property() + ).property() billingUrl: (-> id = if @get('model.type') == 'user' then 'user' else @get('model.login') diff --git a/app/templates/account.hbs b/app/templates/account.hbs index e535d52c..93a0d8f0 100644 --- a/app/templates/account.hbs +++ b/app/templates/account.hbs @@ -22,7 +22,7 @@ {{/if}}
-

{{user.name}}

+

{{accountName}}

{{#if user.isSyncing}} From 6ef0c1af96fa86478ce9dacd3596425ef5ae2c63 Mon Sep 17 00:00:00 2001 From: Lisa P Date: Wed, 26 Aug 2015 10:00:24 -0400 Subject: [PATCH 3/3] use data from model like Piotr said --- app/controllers/account.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/account.coffee b/app/controllers/account.coffee index 5ffba74a..f1ddb699 100644 --- a/app/controllers/account.coffee +++ b/app/controllers/account.coffee @@ -30,8 +30,8 @@ Controller = Ember.Controller.extend @set('allHooks', hooks) accountName: (-> - @get('allHooks').get('firstObject.ownerName') - ).property('allHooks') + @get('model.name') || @get('model.login') + ).property('model.name', 'model.login') hooks: (-> @reloadHooks() unless hooks = @get('allHooks')