Mailspring/internal_packages/today/lib/today-icon.cjsx
Ben Gotow eb2e1b81b5 fix(friday): Bugs and initial pass at the Today view without content (see summary)
Summary:
Load unread counts from database again, not tags

fix(multiselect-list): Clear selection on esc

fix(onboarding): Make target=_blank links work in onboarding pages

fix(workspace): Items in header and footer regions are in a single column

fix(layout): Critical issue for things not 100% height

fix(activity-bar): Show in dev mode so you know you're in dev mode

fix(quoted-text): Support for #divRplyFwdMsg quoted text marker

Test Plan: Run specs

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1484
2015-05-08 16:36:48 -07:00

33 lines
716 B
CoffeeScript

React = require 'react'
_ = require "underscore-plus"
moment = require 'moment'
classNames = require 'classnames'
class TodayIcon extends React.Component
@displayName: 'TodayIcon'
constructor: (@props) ->
@state =
moment: moment()
componentDidMount: =>
@_setTimeState()
componentWillUnmount: =>
clearInterval(@_timer)
render: =>
classes = classNames
'today-icon': true
'selected': @props.selected
<div className={classes}>{@state.moment.format('D')}</div>
_setTimeState: =>
timeTillNextSecond = (60 - (new Date).getSeconds()) * 1000
@_timer = setTimeout(@_setTimeState, timeTillNextSecond)
@setState(moment: moment())
module.exports = TodayIcon