diff --git a/app/controllers/repos.coffee b/app/controllers/repos.coffee index 390500f6..7140daa6 100644 --- a/app/controllers/repos.coffee +++ b/app/controllers/repos.coffee @@ -50,14 +50,10 @@ Controller = Ember.ArrayController.extend Visibility.every @config.intervals.updateTimes, @updateTimes.bind(this) recentRepos: (-> - Ember.ArrayProxy.extend( - isLoadedBinding: 'repos.isLoaded' - repos: Repo.withLastBuild(@store) - sorted: Ember.computed.sort('repos', 'sortedReposKeys') - content: limit('sorted', 'limit') - sortedReposKeys: ['sortOrder:asc'] - limit: 30 - ).create() + # I return an empty array here, because we're removing left sidebar, but + # I don't want to refactor too much code (it will be all changed anyway + # when we switch to new dashboard) + [] ).property() updateTimes: -> diff --git a/app/router.coffee b/app/router.coffee index 42be37de..708354c1 100644 --- a/app/router.coffee +++ b/app/router.coffee @@ -3,8 +3,26 @@ `import Location from 'travis/utils/location'` Router = Ember.Router.extend - # TODO: we should use TravisLocation here - location: if Ember.testing then 'none' else 'travis' + location: (-> + if Ember.testing + 'none' + else + # this is needed, because in the location + # we need to decide if repositories or home needs + # to be displayed, based on the current login status + # + # we should probably think about a more general way to + # do this, location should not know about auth status + Location.create(auth: @container.lookup('auth:main')) + ).property() + + # TODO: this is needed, because in the original version + # the router tries to run `this.location`, which fails + # with computed properties. It can be removed once this is + # changed in Ember.js + generate: -> + url = this.router.generate.apply(this.router, arguments) + return this.get('location').formatURL(url) handleURL: (url) -> url = url.replace(/#.*?$/, '') diff --git a/app/routes/application.coffee b/app/routes/application.coffee index c46573fe..9838bfc5 100644 --- a/app/routes/application.coffee +++ b/app/routes/application.coffee @@ -51,6 +51,6 @@ Route = TravisRoute.extend BuildFaviconMixin, if @get('config').pro @transitionTo('auth') else - @transitionTo('main') + @transitionTo('home') `export default Route` diff --git a/app/templates/layouts/home.hbs b/app/templates/layouts/home.hbs index e0a94ab5..c5d677d2 100644 --- a/app/templates/layouts/home.hbs +++ b/app/templates/layouts/home.hbs @@ -1,5 +1,5 @@