get dashboard sync button to work properly

This commit is contained in:
Lisa Passing 2015-03-02 12:26:19 +01:00
parent 48551e291c
commit 074cf2d427
5 changed files with 15 additions and 12 deletions

View File

@ -3,8 +3,7 @@
Component = Ember.Component.extend
actions: {
sync: ->
console.log(@get('user'));
@get('user').sync()
}
`export default Component`

View File

@ -1,5 +1,6 @@
.sync-button
padding: 0.8em 0
button
@extend %border-radius-4px
padding: 0 10px
@ -30,6 +31,7 @@
.sync-last
display: inline-block
margin: 0
font-size: 12px
color: #848384
text-align: right

View File

@ -99,7 +99,8 @@ $button-border-color: #d4d4d4
width: 8em
// temp
#auth #navigation .button--signin
#auth #navigation .button--signin,
#auth #navigation .button--signingin
display: none
.button--grey

View File

@ -1,11 +1,14 @@
<div class="sync-button">
<p class="sync-last">last synced {{user.syncedAt}}</p>
<button {{action sync}} class="button">
<span class="icon icon-sync"></span>Sync account
</button>
<button class="button is-syncing">
<span class="sync-spinner"><i></i><i></i><i></i></span>Syncing from Github
</button>
{{#if user.isSyncing }}
<button class="button is-syncing">
<span class="sync-spinner"><i></i><i></i><i></i></span>Syncing from Github
</button>
{{else}}
<p class="sync-last">last synced {{format-time user.syncedAt}}</p>
<button {{action sync}} class="button">
<span class="icon icon-sync"></span>Sync account
</button>
{{/if}}
</div>

View File

@ -1,8 +1,6 @@
<div id="filters" class="section section--white section--maxheight">
<div class="row">
{{orgs-filter orgs=orgs selected=selectedOrg action="selectOrg"}}
<div class="float-right">
{{sync-button user=auth.currentUser}}
</div>