make sync-button on ownerpage and extension of the base sync button
This commit is contained in:
parent
66ef0dcfab
commit
b735f08153
6
app/components/ownerpage-sync-button.coffee
Normal file
6
app/components/ownerpage-sync-button.coffee
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
`import Ember from 'ember'`
|
||||||
|
`import SyncButton from 'travis/components/sync-button'`
|
||||||
|
|
||||||
|
Component = SyncButton.extend()
|
||||||
|
|
||||||
|
`export default Component`
|
15
app/templates/components/ownerpage-sync-button.hbs
Normal file
15
app/templates/components/ownerpage-sync-button.hbs
Normal 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>
|
|
@ -9,13 +9,7 @@
|
||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h1 class="owner-title">Travis CI GmbH</h1>
|
<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>
|
<p class="owner-handle"><a href="//gtihub" title=""><span class="icon icon--github-circle"></span> travis-pro</a></p>
|
||||||
<div class="sync-button">
|
{{ownerpage-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>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user