travis-web/app/templates/account.hbs

101 lines
3.5 KiB
Handlebars

{{#if allHooks.isLoaded}}
<header>
<h1>{{view.name}}</h1>
{{!-- {{sync-button user=auth.currentUser}} --}}
{{#if user.isSyncing}}
<div class="sync-button">
<button class="button is-syncing">
<span class="sync-spinner"><i></i><i></i><i></i></span>Syncing from Github
</button>
</div>
</header>
{{else}}
<div class="sync-button">
<button {{action sync}} class="button">
<span class="icon icon-sync"></span>Sync for all users
</button>
<p class="sync-last">last synced {{format-time user.syncedAt}}</p>
</div>
{{#if config.pro}}
<p>We're only showing you private repositories. You can find your public projects on <a href="https://travis-ci.org" title="travis-ci.org">travis-ci.org</a>.</p>
{{else}}
<p>We're only showing you public repositories. You can find your private projects on <a href="https://travis-ci.com" title="travis-ci.com">travis-ci.com</a>.</p>
{{/if}}
</header>
<section class="profile-getstarted">
<a href="#" class="dismiss"><span class="icon icon--dismiss-grey"></span></a>
<ol class="row">
<li class="columns medium-4">
<figure>
<img src="/images/svg/hooks-step-1-01.svg" alt="">
<figcaption>Flick the repository switch on</figcaption>
</figure>
</li>
<li class="columns medium-4">
<figure>
<img src="/images/svg/hooks-step-2-01.svg" alt="">
<figcaption>Add .travis.yml file to your repository</figcaption>
</figure>
</li>
<li class="columns medium-4">
<figure>
<img src="/images/svg/hooks-step-3-01.svg" alt="">
<figcaption>Trigger your first build with a git push</figcaption>
</figure>
</li>
</ol>
</section>
<div>
<ul class="profile-hooklist">
{{#each hook in hooks}}
<li {{bind-attr class="hook.active:active :row"}}>
<div class="columns">
{{travis-switch action="toggle" target=hook toggleAutomatically="false"}}
{{!-- <button class="switch is-on"></button> --}}
{{#link-to "settings" hook.ownerName hook.name class="profile-settings" title="Repository settings"}}<span class="icon icon--cog"></span>{{/link-to}}
</div>
{{#if hook.isSaving}}<span class="loading"></span>{{/if}}
<a {{bind-attr href="hook.urlGithub"}} rel="nofollow" class="profile-repo columns">{{hook.slug}}
<span>{{hook.description}}</span></a>
</li>
{{else}}
<li>
{{#if hooksWithoutAdmin.length}}
<p>Sorry, but we can't find any repositories you have admin access to.</p>
{{else}}
<p>Sorry, it seems like we couldn't find any repositories you have access to on GitHub.</p>
{{/if}}
</li>
{{/each}}
</ul>
</div>
{{#if hooksWithoutAdmin.length}}
<div id="unadministerable-hooks">
<p>Repositories without admin access</p>
<ul class="profile-hooklist">
{{#each hook in hooksWithoutAdmin}}
<li {{bind-attr class="hook.active:active :row"}}>
<a {{bind-attr href="hook.urlGithub"}} rel="nofollow" class="profile-repo columns">
{{hook.slug}}
<span>{{hook.description}}</span>
</a>
</li>
{{/each}}
</ul>
</div>
{{/if}}
{{/if}}
{{else}}
<span class="sync-spinner sync-spinner--grey"><i></i><i></i><i></i></span>
{{/if}}