mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 12:40:08 +08:00
0bd303865e
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
32 lines
716 B
CoffeeScript
32 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
|