basic error message styling and fix {{#if}} nesting in accounts

This commit is contained in:
Lisa Passing 2015-04-22 15:23:31 +02:00
parent 249003d2ff
commit 3703194709
3 changed files with 80 additions and 62 deletions

View File

@ -128,12 +128,12 @@ p.profile-user-last
clear: both
margin-bottom: .8em
overflow: auto
> div
width: grid-calc(10, 24)
@media #{$medium-up}
width: grid-calc(7, 24)
@media #{$large-up}
width: grid-calc(5, 24)
.profile-hooks
width: grid-calc(10, 24)
@media #{$medium-up}
width: grid-calc(7, 24)
@media #{$large-up}
width: grid-calc(5, 24)
.switch
display: inline-block
.profile-settings
@ -194,4 +194,22 @@ p.profile-user-last
line-height: $line-height-m
a
color: #adaaab
text-decoration: underline
text-decoration: underline
.error
width: 100%;
padding: 0 $column-gutter/2;
p
position: relative
padding: $column-gutter/2;
color: #de4248
background-color: #f1b6ad
&:after
content: ""
position: absolute
top: -0.5em
left: 1.5em
width: 1.2em
height: 1.2em
background: #f1b6ad
transform: rotate(45deg)

View File

@ -1,47 +1,47 @@
{{#if allHooks.isLoaded}}
<header>
<div class="profile-header">
<h1>{{view.name}}</h1>
</div>
<div class="profile-header">
<h1>{{view.name}}</h1>
</div>
{{#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
</button>
<p class="sync-last">last synced {{format-time user.syncedAt}}</p>
</div>
{{#if config.billingEndpoint}}
<div class="cta-btn">
{{#if view.subscribed}}
<a class="btn btn-activated" {{bind-attr href="billingUrl"}}>
Subscription active!
</a>
{{else}}
{{#if view.education}}
{{#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>
{{else}}
<div class="sync-button">
<button {{action sync}} class="button">
<span class="icon icon-sync"></span>Sync
</button>
<p class="sync-last">last synced {{format-time user.syncedAt}}</p>
</div>
{{#if config.billingEndpoint}}
<div class="cta-btn">
{{#if view.subscribed}}
<a class="btn btn-activated" {{bind-attr href="billingUrl"}}>
Educational account!
Subscription active!
</a>
{{else}}
<a class="btn btn-activate" {{bind-attr href="billingUrl"}}>
Sign up this account!
</a>
{{#if view.education}}
<a class="btn btn-activated" {{bind-attr href="billingUrl"}}>
Educational account!
</a>
{{else}}
<a class="btn btn-activate" {{bind-attr href="billingUrl"}}>
Sign up this account!
</a>
{{/if}}
{{/if}}
</div>
{{/if}}
{{#if config.pro}}
<p>We're only showing your 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 your 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}}
</div>
{{/if}}
{{#if config.pro}}
<p>We're only showing your 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 your 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>
@ -86,26 +86,26 @@
</ul>
</div>
{{#if hooksWithoutAdmin.length}}
<div id="unadministerable-hooks">
<p>You require admin rights to enable these repositories</p>
{{#if hooksWithoutAdmin.length}}
<div id="unadministerable-hooks">
<p>You require admin rights to enable these repositories</p>
<ul class="profile-hooklist">
{{#each hook in hooksWithoutAdmin}}
<li {{bind-attr class="hook.active:active :row"}}>
<div class="columns">
<button class="switch disabled"></button>
</div>
<a {{bind-attr href="hook.urlGithub"}} rel="nofollow" class="profile-repo columns">
{{hook.slug}}
<span>{{hook.description}}</span>
</a>
</li>
{{/each}}
</ul>
</div>
{{/if}}
<ul class="profile-hooklist">
{{#each hook in hooksWithoutAdmin}}
<li {{bind-attr class="hook.active:active :row"}}>
<div class="columns">
<button class="switch disabled"></button>
</div>
<a {{bind-attr href="hook.urlGithub"}} rel="nofollow" class="profile-repo columns">
{{hook.slug}}
<span>{{hook.description}}</span>
</a>
</li>
{{/each}}
</ul>
</div>
{{/if}}
{{else}}
<span class="sync-spinner sync-spinner--grey"><i></i><i></i><i></i></span>
{{/if}}

View File

@ -1,4 +1,4 @@
<div class="columns">
<div class="profile-hooks columns">
{{hook-switch hook=hook onToggleError="handleToggleError"}}
{{!-- <button class="switch is-on"></button> --}}
{{#if hook.isSaving}}
@ -13,6 +13,6 @@
{{#if errorMessage}}
<div class="error">
{{errorMessage}}
<p>{{errorMessage}}</p>
</div>
{{/if}}