start adding current user data to dashboard
This commit is contained in:
parent
8ee3f43fec
commit
81493fc479
|
@ -3,6 +3,7 @@ require 'routes/route'
|
|||
TravisRoute = Travis.Route
|
||||
|
||||
Route = TravisRoute.extend
|
||||
needsAuth: true
|
||||
activate: ->
|
||||
@get('stylesheetsManager').disable('main')
|
||||
@get('stylesheetsManager').enable('dashboard')
|
||||
|
|
|
@ -7,7 +7,8 @@ Route = TravisRoute.extend
|
|||
filter: { replace: true }
|
||||
model: ->
|
||||
apiEndpoint = @get('config').api_endpoint
|
||||
$.ajax(apiEndpoint + '/repos?member=lislis', {
|
||||
login = @controllerFor('currentUser').get('login')
|
||||
$.ajax(apiEndpoint + '/repos?member='+ login, {
|
||||
beforeSend: (xhr) ->
|
||||
xhr.setRequestHeader('accept', 'application/json; version=2')
|
||||
}).then (response) ->
|
||||
|
|
|
@ -15,9 +15,18 @@
|
|||
</div> -->
|
||||
<div class="small-2 medium-5 columns no-padding" id="user">
|
||||
<ul>
|
||||
<li>
|
||||
<p>Justine Arreche</p>
|
||||
<img src="images/dashboard/gravatar.png">
|
||||
<li class="menu">
|
||||
<p class="handle">
|
||||
{{#if auth.signedOut}}
|
||||
<a class="signed-out" href="#" {{action "signIn" target="auth"}}>Sign in with GitHub</a>
|
||||
{{/if}}
|
||||
{{#if auth.signedIn}}
|
||||
{{#link-to "profile" class="signed-in"}}<img {{bind-attr src="gravatarUrl"}}/>{{auth.currentUser.userName}}{{/link-to}}
|
||||
{{/if}}
|
||||
{{#if auth.signingIn}}
|
||||
<span class="signing-in">Signing In</span>
|
||||
{{/if}}
|
||||
</p>
|
||||
<ul>
|
||||
<li>Help</li>
|
||||
<li>Sign Out</li>
|
||||
|
|
Loading…
Reference in New Issue
Block a user