From 074cf2d427feb583eb75ef2d8bcf4b726bb9a1ad Mon Sep 17 00:00:00 2001 From: Lisa Passing Date: Mon, 2 Mar 2015 12:26:19 +0100 Subject: [PATCH] get dashboard sync button to work properly --- app/components/sync-button.coffee | 3 +-- app/styles/app/components/sync-button.sass | 2 ++ app/styles/app/modules/buttons.sass | 3 ++- app/templates/components/sync-button.hbs | 17 ++++++++++------- app/templates/dashboard/repositories.hbs | 2 -- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/app/components/sync-button.coffee b/app/components/sync-button.coffee index 86e3b3d7..8e2c4bd2 100644 --- a/app/components/sync-button.coffee +++ b/app/components/sync-button.coffee @@ -3,8 +3,7 @@ Component = Ember.Component.extend actions: { sync: -> - console.log(@get('user')); + @get('user').sync() } - `export default Component` diff --git a/app/styles/app/components/sync-button.sass b/app/styles/app/components/sync-button.sass index c843683d..eb67c4e5 100644 --- a/app/styles/app/components/sync-button.sass +++ b/app/styles/app/components/sync-button.sass @@ -1,5 +1,6 @@ .sync-button + padding: 0.8em 0 button @extend %border-radius-4px padding: 0 10px @@ -30,6 +31,7 @@ .sync-last display: inline-block + margin: 0 font-size: 12px color: #848384 text-align: right diff --git a/app/styles/app/modules/buttons.sass b/app/styles/app/modules/buttons.sass index bf61402a..b5047de4 100644 --- a/app/styles/app/modules/buttons.sass +++ b/app/styles/app/modules/buttons.sass @@ -99,7 +99,8 @@ $button-border-color: #d4d4d4 width: 8em // temp -#auth #navigation .button--signin +#auth #navigation .button--signin, +#auth #navigation .button--signingin display: none .button--grey diff --git a/app/templates/components/sync-button.hbs b/app/templates/components/sync-button.hbs index a2d2006a..2b72a9f6 100644 --- a/app/templates/components/sync-button.hbs +++ b/app/templates/components/sync-button.hbs @@ -1,11 +1,14 @@
-

last synced {{user.syncedAt}}

- - + {{#if user.isSyncing }} + + {{else}} +

last synced {{format-time user.syncedAt}}

+ + {{/if}}
diff --git a/app/templates/dashboard/repositories.hbs b/app/templates/dashboard/repositories.hbs index bf8dcb48..d6888d7e 100644 --- a/app/templates/dashboard/repositories.hbs +++ b/app/templates/dashboard/repositories.hbs @@ -1,8 +1,6 @@
- {{orgs-filter orgs=orgs selected=selectedOrg action="selectOrg"}} -
{{sync-button user=auth.currentUser}}