Completely remove left sidebar for not logged in users
This commit is contained in:
parent
ecc635bde5
commit
6695a8e19a
|
@ -65,9 +65,6 @@ Controller = Ember.ArrayController.extend
|
||||||
@set('tab', tab)
|
@set('tab', tab)
|
||||||
this["view_#{tab}".camelize()](params)
|
this["view_#{tab}".camelize()](params)
|
||||||
|
|
||||||
viewRecent: ->
|
|
||||||
@set('content', @get('recentRepos'))
|
|
||||||
|
|
||||||
viewOwned: ->
|
viewOwned: ->
|
||||||
@set('content', @get('userRepos'))
|
@set('content', @get('userRepos'))
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,7 @@ Route = TravisRoute.extend
|
||||||
|
|
||||||
setupController: (controller)->
|
setupController: (controller)->
|
||||||
# TODO: this is redundant with repositories and recent routes
|
# TODO: this is redundant with repositories and recent routes
|
||||||
toActivate = if @signedIn() then 'owned' else 'recent'
|
@container.lookup('controller:repos').activate('owned')
|
||||||
@container.lookup('controller:repos').activate(toActivate)
|
|
||||||
|
|
||||||
activate: ->
|
activate: ->
|
||||||
# subscribe to pusher only if we're at a main route
|
# subscribe to pusher only if we're at a main route
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
Route = TravisRoute.extend
|
Route = TravisRoute.extend
|
||||||
redirect: ->
|
redirect: ->
|
||||||
target = if @signedIn() then 'repositories' else 'recent'
|
if @signedIn()
|
||||||
@transitionTo("main.#{target}")
|
@transitionTo('main.repositories')
|
||||||
|
else
|
||||||
|
@transitionTo('home')
|
||||||
|
|
||||||
`export default Route`
|
`export default Route`
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
`import TravisRoute from 'travis/routes/basic'`
|
`import Ember from 'ember'`
|
||||||
`import MainTabRoute from 'travis/routes/main-tab'`
|
|
||||||
|
|
||||||
Route = MainTabRoute.extend
|
Route = Ember.Route.extend
|
||||||
reposTabName: 'recent'
|
redirect: ->
|
||||||
|
@transitionTo('main')
|
||||||
activate: ->
|
|
||||||
@_super.apply(this, arguments)
|
|
||||||
@store.set('isRecentTabOpen', true)
|
|
||||||
|
|
||||||
deactivate: ->
|
|
||||||
@_super.apply(this, arguments)
|
|
||||||
@store.set('isRecentTabOpen', false)
|
|
||||||
|
|
||||||
`export default Route`
|
`export default Route`
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
Route = TravisRoute.extend
|
Route = TravisRoute.extend
|
||||||
setupController: ->
|
setupController: ->
|
||||||
$('body').attr('id', 'simple')
|
$('body').attr('id', 'simple')
|
||||||
toActivate = if @signedIn() then 'owned' else 'recent'
|
@container.lookup('controller:repos').activate('owned')
|
||||||
@container.lookup('controller:repos').activate(toActivate)
|
|
||||||
@_super.apply(this, arguments)
|
@_super.apply(this, arguments)
|
||||||
|
|
||||||
renderTemplate: ->
|
renderTemplate: ->
|
||||||
|
|
|
@ -63,30 +63,35 @@
|
||||||
margin-left: -100%
|
margin-left: -100%
|
||||||
max-width: 325px
|
max-width: 325px
|
||||||
|
|
||||||
.wrapper-main
|
.wrapper-main.non-centered
|
||||||
width: grid-calc(18, 24)
|
width: grid-calc(18, 24)
|
||||||
float: left
|
float: left
|
||||||
margin-left: grid-calc(6, 24)
|
margin-left: grid-calc(6, 24)
|
||||||
overflow: visible
|
overflow: visible
|
||||||
|
|
||||||
|
.wrapper-main.centered
|
||||||
|
max-width: 1024px
|
||||||
|
margin-left: auto
|
||||||
|
margin-right: auto
|
||||||
|
|
||||||
@media #{$xlarge-up}
|
@media #{$xlarge-up}
|
||||||
#left
|
#left
|
||||||
width: grid-calc(7, 36)
|
width: grid-calc(7, 36)
|
||||||
.wrapper-main
|
.wrapper-main.non-centered
|
||||||
width: grid-calc(29, 36)
|
width: grid-calc(29, 36)
|
||||||
margin-left: grid-calc(7, 36)
|
margin-left: grid-calc(7, 36)
|
||||||
|
|
||||||
@media #{$xxlarge-up}
|
@media #{$xxlarge-up}
|
||||||
#left
|
#left
|
||||||
width: grid-calc(6, 36)
|
width: grid-calc(6, 36)
|
||||||
.wrapper-main
|
.wrapper-main.non-centered
|
||||||
width: grid-calc(30, 36)
|
width: grid-calc(30, 36)
|
||||||
margin-left: grid-calc(6, 36)
|
margin-left: grid-calc(6, 36)
|
||||||
|
|
||||||
@media screen and (min-width: 2200px)
|
@media screen and (min-width: 2200px)
|
||||||
#left
|
#left
|
||||||
width: grid-calc(5, 36)
|
width: grid-calc(5, 36)
|
||||||
.wrapper-main
|
.wrapper-main.non-centered
|
||||||
width: grid-calc(31, 36)
|
width: grid-calc(31, 36)
|
||||||
margin-left: grid-calc(5, 36)
|
margin-left: grid-calc(5, 36)
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
{{render "flash"}}
|
{{render "flash"}}
|
||||||
|
|
||||||
<div class="wrapper-main">
|
<div {{bind-attr class=":wrapper-main auth.signedIn:non-centered:centered"}}>
|
||||||
<div id="main" role="main">
|
<div id="main" role="main">
|
||||||
{{yield}}
|
{{yield}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,12 +4,6 @@
|
||||||
<a href="#" {{action "showMyRepositories"}}>My Repositories</a>
|
<a href="#" {{action "showMyRepositories"}}>My Repositories</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
{{#unless config.pro}}
|
|
||||||
<li id="tab_recent" {{bind-attr class="view.classRecent"}}>
|
|
||||||
{{#link-to "main.recent"}}Recent{{/link-to}}
|
|
||||||
</li>
|
|
||||||
{{/unless}}
|
|
||||||
|
|
||||||
{{#if config.pro}}
|
{{#if config.pro}}
|
||||||
<li id="tab_running" {{bind-attr class="view.classRunning"}}>
|
<li id="tab_running" {{bind-attr class="view.classRunning"}}>
|
||||||
<a href="#" {{action "showRunningJobs"}}>Running ({{startedJobsCount}}/{{allJobsCount}})</a>
|
<a href="#" {{action "showRunningJobs"}}>Running ({{startedJobsCount}}/{{allJobsCount}})</a>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user