sync button on dashbaord

This commit is contained in:
Lisa P 2016-02-17 15:18:58 +01:00
parent 192ebce0c3
commit 101a0ec71f
5 changed files with 36 additions and 31 deletions

View File

@ -1,6 +1,10 @@
.sync-button .sync-button
vertical-align: middle vertical-align: middle
display: flex
flex-flow: row-reverse wrap
.button .button
position: relative
z-index: 2
height: 2.6rem height: 2.6rem
padding: 0.6em 0.8em padding: 0.6em 0.8em
background-color: $agate-blue background-color: $agate-blue
@ -9,11 +13,27 @@
font-size: 14px font-size: 14px
&:hover &:hover
background-color: $oxide-blue background-color: $oxide-blue
.sync-last
position: relative
z-index: -1
transition: transform 150ms ease, opacity 250ms ease
transform: translateX(80%)
opacity: 0
.button:hover ~ .sync-last
transform: translateX(0)
opacity: 1
z-index: 1
.is-syncing .is-syncing
background-color: $oxide-blue background-color: $oxide-blue
.icon-trigger .icon-trigger
@extend %icon-line-trigger-white
@extend %icon
width: 1.5em
height: 1.5em
margin-right: 0.3em
.loading-indicator--white .loading-indicator--white
vertical-align: top vertical-align: top
@ -24,3 +44,4 @@
margin: 0 1em 0 margin: 0 1em 0
color: $asphalt-grey color: $asphalt-grey
text-align: right text-align: right
line-height: 2.6

View File

@ -4,12 +4,14 @@
.dashboard-header .dashboard-header
width: 100%
display: flex display: flex
flex-flow: column-reverse wrap flex-flow: column-reverse wrap
justify-content: space-between justify-content: space-between
padding: 2em 0 padding: 2em 0
@media #{$medium-up} @media #{$medium-up}
flex-direction: row flex-direction: row
align-items: baseline
.dashboard-repos .dashboard-repos
margin-bottom: 5rem margin-bottom: 5rem

View File

@ -13,23 +13,17 @@
header header
h1 h1
margin: 0 1.7rem 0 0 margin: 0 1.7rem 0 0
color: #808080 color: $asphalt-grey
font-size: 35px font-size: 36px
font-weight: 400 font-weight: 400
line-height: 1.45
p:not(.sync-last)
font-size: $font-size-sm
color: $cement-grey
margin: 2rem 0 1rem 0
a
color: $cement-grey
text-decoration: underline
@media #{$medium-up} @media #{$medium-up}
.profile-header, .sync-button .profile-header
display: inline-block display: inline-block
vertical-align: middle vertical-align: middle
.sync-button .sync-button
margin-top: .5em float: right
margin-top: .4em
@media #{$large-up} @media #{$large-up}
.profile-header .profile-header
position: relative position: relative
@ -39,13 +33,6 @@
&:after &:after
@include fadeOut(right, -90deg, white) @include fadeOut(right, -90deg, white)
.loading-indicator--white
vertical-align: top
margin-right: .5em
p
font-size: $font-size-m
color: $cement-grey
.cta-btn .cta-btn
text-align: right text-align: right
@ -111,9 +98,8 @@
.profile-orgs .profile-orgs
h1 h1
color: #898b8c
font-size: $font-size-sm font-size: $font-size-sm
border-bottom: solid 2px $cream-dark border-bottom: solid 2px $pebble-grey
.profile-user .profile-user
margin: 1rem 0 2rem margin: 1rem 0 2rem
@ -196,14 +182,10 @@ p.profile-user-last
.profile-additional .profile-additional
border-top: solid 2px #f3f2f2 border-top: solid 2px $pebble-grey
.profile-text, .profile-text,
.profile-additional p .profile-additional
color: #adaaab +linkStyle
line-height: $line-height-m
a
color: #adaaab
text-decoration: underline
.hooks-error .hooks-error
width: 100%; width: 100%;

View File

@ -48,12 +48,12 @@
=linkStyle =linkStyle
a a
text-decoration: none text-decoration: none
border-bottom: 1px solid #bfc0c1 border-bottom: 1px solid $cement-grey
padding-bottom: 0.1rem padding-bottom: 0.1rem
transition: color 200ms ease, border 200ms ease transition: color 200ms ease, border 200ms ease
&:hover, &:hover,
&:active &:active
color: #303030 color: $cement-grey
text-decoration: none text-decoration: none
border-color: transparent border-color: transparent

View File

@ -3,8 +3,8 @@
<span class="loading-indicator--white"><i></i><i></i><i></i></span>Syncing from GitHub <span class="loading-indicator--white"><i></i><i></i><i></i></span>Syncing from GitHub
</div> </div>
{{else}} {{else}}
<p class="sync-last">Last synced {{format-time user.syncedAt}}</p>
<button {{action 'sync'}} class="button" type="button"> <button {{action 'sync'}} class="button" type="button">
<span class="icon-trigger"></span>Sync account <span class="icon-trigger"></span>Sync account
</button> </button>
<p class="sync-last">Last synced {{format-time user.syncedAt}}</p>
{{/if}} {{/if}}