diff --git a/app/controllers/account.coffee b/app/controllers/account.coffee index c08ed3ce..a922a5a8 100644 --- a/app/controllers/account.coffee +++ b/app/controllers/account.coffee @@ -3,7 +3,7 @@ Controller = Ember.Controller.extend allHooks: [] needs: ['currentUser'] - userBinding: 'controllers.currentUser' + userBinding: 'controllers.currentUser.model' init: -> @_super.apply this, arguments diff --git a/app/controllers/build.coffee b/app/controllers/build.coffee index 4e868705..b25d61b1 100644 --- a/app/controllers/build.coffee +++ b/app/controllers/build.coffee @@ -3,10 +3,10 @@ `import GithubUrlPropertievs from 'travis/mixins/github-url-properties'` Controller = Ember.Controller.extend GithubUrlPropertievs, - needs: ['repo'] + needs: ['repo', 'currentUser'] repoBinding: 'controllers.repo.repo' commitBinding: 'build.commit' - currentUserBinding: 'controllers.repo.currentUser' + currentUserBinding: 'controllers.currentUser.model' tabBinding: 'controllers.repo.tab' sendFaviconStateChanges: true diff --git a/app/controllers/current-user.coffee b/app/controllers/current-user.coffee index af7231f6..b6b5d130 100644 --- a/app/controllers/current-user.coffee +++ b/app/controllers/current-user.coffee @@ -1,4 +1,4 @@ -Controller = Ember.ObjectController.extend +Controller = Ember.Controller.extend sync: -> @get('model').sync() diff --git a/app/controllers/first-sync.coffee b/app/controllers/first-sync.coffee index bc9e94a5..6ca0d82b 100644 --- a/app/controllers/first-sync.coffee +++ b/app/controllers/first-sync.coffee @@ -2,7 +2,7 @@ Controller = Ember.Controller.extend needs: ['currentUser'] - user: Ember.computed.alias('controllers.currentUser') + user: Ember.computed.alias('controllers.currentUser.model') isSyncing: Ember.computed.alias('user.isSyncing') diff --git a/app/controllers/flash.coffee b/app/controllers/flash.coffee index dff32821..650d2081 100644 --- a/app/controllers/flash.coffee +++ b/app/controllers/flash.coffee @@ -4,7 +4,7 @@ Controller = Ember.ArrayController.extend needs: ['currentUser'] - currentUserBinding: 'controllers.currentUser' + currentUserBinding: 'controllers.currentUser.model' init: -> @_super.apply this, arguments diff --git a/app/controllers/job.coffee b/app/controllers/job.coffee index f262a0e4..fb45da9c 100644 --- a/app/controllers/job.coffee +++ b/app/controllers/job.coffee @@ -2,12 +2,12 @@ `import { githubCommit } from 'travis/utils/urls'` Controller = Ember.Controller.extend - needs: ['repo'] + needs: ['repo', 'currentUser'] repoBinding: 'controllers.repo.repo' commitBinding: 'job.commit' annotationsBinding: 'job.annotations' - currentUserBinding: 'controllers.repo.currentUser' + currentUserBinding: 'controllers.currentUser.model' tabBinding: 'controllers.repo.tab' currentItemBinding: 'job' diff --git a/app/controllers/profile.coffee b/app/controllers/profile.coffee index 742fb083..d5dd0c5d 100644 --- a/app/controllers/profile.coffee +++ b/app/controllers/profile.coffee @@ -4,7 +4,7 @@ Controller = Ember.Controller.extend name: 'profile' needs: ['currentUser', 'accounts', 'account'] - userBinding: 'controllers.currentUser' + userBinding: 'controllers.currentUser.model' accountBinding: 'controllers.account.model' activate: (action, params) -> diff --git a/app/controllers/repo.coffee b/app/controllers/repo.coffee index e8b616ec..dd8ed09f 100644 --- a/app/controllers/repo.coffee +++ b/app/controllers/repo.coffee @@ -3,7 +3,7 @@ Controller = Ember.Controller.extend needs: ['repos', 'currentUser', 'build', 'request', 'job'] - currentUserBinding: 'controllers.currentUser' + currentUserBinding: 'controllers.currentUser.model' build: Ember.computed.alias('controllers.build.build') job: Ember.computed.alias('controllers.job.job') diff --git a/app/controllers/repos.coffee b/app/controllers/repos.coffee index 42a7e613..bce174fa 100644 --- a/app/controllers/repos.coffee +++ b/app/controllers/repos.coffee @@ -31,7 +31,7 @@ Controller = Ember.ArrayController.extend isLoadedBinding: 'content.isLoaded' needs: ['currentUser', 'repo', 'runningJobs', 'queue'] - currentUserBinding: 'controllers.currentUser' + currentUserBinding: 'controllers.currentUser.model' selectedRepo: (-> # we need to observe also repo.content here, because we use # ObjectProxy in repo controller diff --git a/app/controllers/top.coffee b/app/controllers/top.coffee index d70f1f6c..7ef3d5be 100644 --- a/app/controllers/top.coffee +++ b/app/controllers/top.coffee @@ -2,7 +2,7 @@ Controller = Ember.Controller.extend needs: ['currentUser'] - userBinding: 'controllers.currentUser' + userBinding: 'controllers.currentUser.model' userName: (-> @get('user.name') || @get('user.login') diff --git a/app/routes/accounts/index.coffee b/app/routes/accounts/index.coffee index 7cb2c715..b3f39679 100644 --- a/app/routes/accounts/index.coffee +++ b/app/routes/accounts/index.coffee @@ -5,7 +5,7 @@ Route = TravisRoute.extend # TODO: setting accounts model in ProfileRoute is wrong, but # at this stage it's better than what we had before accounts = @modelFor('accounts') - login = @controllerFor('currentUser').get('login') + login = @controllerFor('currentUser').get('model.login') account = accounts.find (account) -> account.get('login') == login @replaceWith 'account', account diff --git a/app/templates/components/builds-item.hbs b/app/templates/components/builds-item.hbs index 519420f9..eb6f3d65 100644 --- a/app/templates/components/builds-item.hbs +++ b/app/templates/components/builds-item.hbs @@ -1,7 +1,8 @@
- - + +
+

{{#if build.isPullRequest}} @@ -16,7 +17,9 @@ {{/link-to}} {{/if}}

-

{{build.commit.committerName}} committed

+

+ {{build.commit.committerName}} committed +

@@ -35,6 +38,7 @@

+

diff --git a/app/templates/dashboard/repositories.hbs b/app/templates/dashboard/repositories.hbs index 3e8abe9f..0fb099ea 100644 --- a/app/templates/dashboard/repositories.hbs +++ b/app/templates/dashboard/repositories.hbs @@ -8,7 +8,6 @@

-
diff --git a/app/utils/urls.coffee b/app/utils/urls.coffee index ac3ef3c3..65ebf9d6 100644 --- a/app/utils/urls.coffee +++ b/app/utils/urls.coffee @@ -23,7 +23,7 @@ githubAdmin = (slug) -> statusImage = (slug, branch) -> if config.pro - token = Travis.__container__.lookup('controller:currentUser').get('token') + token = Travis.__container__.lookup('controller:currentUser').get('model.token') "#{location.protocol}//#{location.host}/#{slug}.svg?token=#{token}" + if branch then "&branch=#{branch}" else '' else "#{location.protocol}//#{location.host}/#{slug}.svg" + if branch then "?branch=#{encodeURIComponent(branch)}" else '' @@ -35,7 +35,7 @@ ccXml = (slug, branch) -> if config.pro delimiter = if url.indexOf('?') == -1 then '?' else '&' - token = Travis.__container__.lookup('controller:currentUser').get('token') + token = Travis.__container__.lookup('controller:currentUser').get('model.token') url = "#{url}#{delimiter}token=#{token}" url diff --git a/app/views/pre.coffee b/app/views/pre.coffee index 67ffeea2..6607559f 100644 --- a/app/views/pre.coffee +++ b/app/views/pre.coffee @@ -25,7 +25,7 @@ Log.Scroll.prototype = $.extend new Log.Listener, View = BasicView.extend templateName: 'jobs/pre' - currentUserBinding: 'controller.currentUser' + currentUserBinding: 'controller.currentUser.model' logWillChange: (-> console.log 'log view: log will change' if Log.DEBUG diff --git a/app/views/repos-list-tabs.coffee b/app/views/repos-list-tabs.coffee index 4b2d272f..2a72c29b 100644 --- a/app/views/repos-list-tabs.coffee +++ b/app/views/repos-list-tabs.coffee @@ -3,7 +3,7 @@ View = Ember.View.extend templateName: 'repos/list/tabs' tabBinding: 'controller.tab' - currentUserBinding: 'controller.currentUser.id' + currentUserBinding: 'controller.currentUser.model' classRecent: (-> if @get('tab') == 'recent'