make sync-button on ownerpage and extension of the base sync button

This commit is contained in:
Lisa Passing 2015-04-20 13:16:48 +02:00
parent 66ef0dcfab
commit b735f08153
3 changed files with 22 additions and 7 deletions

View File

@ -0,0 +1,6 @@
`import Ember from 'ember'`
`import SyncButton from 'travis/components/sync-button'`
Component = SyncButton.extend()
`export default Component`

View File

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

View File

@ -9,13 +9,7 @@
<div class="media-body">
<h1 class="owner-title">Travis CI GmbH</h1>
<p class="owner-handle"><a href="//gtihub" title=""><span class="icon icon--github-circle"></span> travis-pro</a></p>
<div class="sync-button">
<p>
<button {{action sync}} class="button">
<span class="icon icon-sync"></span>Sync account</button>
</p>
<p class="sync-last">last synced {{format-time user.syncedAt}}</p>
</div>
{{ownerpage-sync-button}}
</div>
</div>
</section>