From 27eba6dfaacee8b666305e1671b6b6d06ebd04ef Mon Sep 17 00:00:00 2001 From: Jackie Luo Date: Thu, 30 Jun 2016 17:24:20 -0700 Subject: [PATCH] Add sync times and update styles --- packages/nylas-dashboard/public/css/app.css | 22 +++++++++++++++------ packages/nylas-dashboard/public/index.html | 4 +++- packages/nylas-dashboard/public/js/app.jsx | 8 ++++++++ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/packages/nylas-dashboard/public/css/app.css b/packages/nylas-dashboard/public/css/app.css index 081bdd647..7a6ea18f7 100644 --- a/packages/nylas-dashboard/public/css/app.css +++ b/packages/nylas-dashboard/public/css/app.css @@ -1,15 +1,21 @@ body { - background-image: -webkit-linear-gradient(top, rgba(232, 244, 250, 0.6), rgba(231, 231, 233, 1)), url(http://news.nationalgeographic.com/content/dam/news/2015/12/13/BookTalk%20K2/01BookTalkK2.jpg); + background-image: -webkit-linear-gradient(top, rgba(232, 244, 250, 0.2), rgba(231, 231, 233, 1)), url(http://news.nationalgeographic.com/content/dam/news/2015/12/13/BookTalk%20K2/01BookTalkK2.jpg); background-size: cover; - font-family: sans-serif; + font-family: Roboto, sans-serif; +} + +h2 { + padding-top: 10px; + text-align: center; } .account { - display:inline-block; + display: inline-block; + border-radius: 5px; width: 300px; - background-color: white; - padding:15px; - margin:5px; + background-color: rgba(255, 255, 255, 0.6); + padding: 15px; + margin: 5px; vertical-align: top; } @@ -17,6 +23,10 @@ body { margin: 0; padding: 0; } +.account .section { + text-align: center; +} + .account.errored { background-image: linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%); background-repeat: repeat-x; diff --git a/packages/nylas-dashboard/public/index.html b/packages/nylas-dashboard/public/index.html index dac87884b..076c209bd 100644 --- a/packages/nylas-dashboard/public/index.html +++ b/packages/nylas-dashboard/public/index.html @@ -5,9 +5,11 @@ + + K2 Dashboard -

Dashboard

+

K2 Dashboard

diff --git a/packages/nylas-dashboard/public/js/app.jsx b/packages/nylas-dashboard/public/js/app.jsx index 296d9f287..3598037a5 100644 --- a/packages/nylas-dashboard/public/js/app.jsx +++ b/packages/nylas-dashboard/public/js/app.jsx @@ -32,11 +32,19 @@ class Account extends React.Component { render() { const {account, assignment, active} = this.props; const errorClass = account.sync_error ? ' errored' : '' + const syncCompletions = [] + for (const time of account.lastSyncCompletions) { + syncCompletions.push( +
{new Date(time).toString()}
+ ) + } return (

{account.email_address} {active ? '🌕' : '🌑'}

{assignment}
{JSON.stringify(account.sync_policy, null, 2)}
+
Last Sync Completions
+
{syncCompletions}
{this.renderError()}
);