From 29513b744d93bd0024b34f27c6c1b338126d06f2 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Tue, 17 Feb 2015 09:48:08 +0100 Subject: [PATCH 1/2] Set charm key by default for pro --- config/environment.js | 1 + 1 file changed, 1 insertion(+) diff --git a/config/environment.js b/config/environment.js index 2b873c01..ebfabdc0 100644 --- a/config/environment.js +++ b/config/environment.js @@ -47,6 +47,7 @@ module.exports = function(environment) { sshKey: true, caches: true }; + ENV.charmKey = 'gy5gx7dy6dh86hxzkz1wmtvupwvievu'; } } From f7f274f5d508dad5060d85fac30ec9a65ab583bb Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Tue, 17 Feb 2015 10:38:01 +0100 Subject: [PATCH 2/2] Fix search In search there was a check on 'auth' in the view and we no longer inject auth into views. That's why the check needs to be done on the controller. The other thing is that slash breaks the URL currently, so this commit also changes slash in the search phrase into %2F character. --- app/controllers/repos.coffee | 2 +- app/routes/main/search.coffee | 2 +- app/views/repos-list-tabs.coffee | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/repos.coffee b/app/controllers/repos.coffee index 98ee9538..5299869a 100644 --- a/app/controllers/repos.coffee +++ b/app/controllers/repos.coffee @@ -77,7 +77,7 @@ Controller = Ember.ArrayController.extend searchFor: (phrase) -> Ember.run.cancel(@searchLater) if @searchLater @searchLater = Ember.run.later(this, (-> - @transitionTo('main.search', phrase) + @transitionTo('main.search', phrase.replace(/\//g, '%2F')) ), 500) noReposMessage: (-> diff --git a/app/routes/main/search.coffee b/app/routes/main/search.coffee index b2623693..db0e011d 100644 --- a/app/routes/main/search.coffee +++ b/app/routes/main/search.coffee @@ -14,7 +14,7 @@ Route = MainTabRoute.extend @controllerFor('repos').addObserver('firstObject', this, 'currentRepoDidChange') model: (params) -> - params.phrase + params.phrase.replace(/%2F/g, '/') deactivate: -> @_super.apply(this, arguments) diff --git a/app/views/repos-list-tabs.coffee b/app/views/repos-list-tabs.coffee index 7500b450..964f925a 100644 --- a/app/views/repos-list-tabs.coffee +++ b/app/views/repos-list-tabs.coffee @@ -8,7 +8,7 @@ View = Ember.View.extend classRecent: (-> if @get('tab') == 'recent' 'active' - else if @get('tab') == 'search' && @auth.get('signedIn') + else if @get('tab') == 'search' && @get('controller').auth.get('signedIn') 'hidden' ).property('tab')