Mailspring/internal_packages/message-list/lib/thread-archive-button.cjsx
dillon 267a719016 fix(toolbar): swap mark-as-unread and archive buttons
Summary:
fixes T3628

problem
- mark-as-read button was in most prominent location
- archive button is most used button, but unfortunately in less prominent location
- user is annoyed at inconvenient real estate allocation

Test Plan: tested manually for regressions. all previous tests still green.

Reviewers: bengotow

Maniphest Tasks: T3628

Differential Revision: https://phab.nylas.com/D2033
2015-09-16 17:48:56 -07:00

25 lines
685 B
CoffeeScript

_ = require 'underscore'
React = require 'react'
{Actions, DOMUtils} = require 'nylas-exports'
{RetinaImg} = require 'nylas-component-kit'
class ThreadArchiveButton extends React.Component
@displayName: "ThreadArchiveButton"
@containerRequired: false
render: =>
<button className="btn btn-toolbar btn-archive"
style={order: -106}
data-tooltip="Archive"
onClick={@_onArchive}>
<RetinaImg name="toolbar-archive.png" mode={RetinaImg.Mode.ContentIsMask}/>
</button>
_onArchive: (e) =>
return unless DOMUtils.nodeIsVisible(e.currentTarget)
Actions.archive()
e.stopPropagation()
module.exports = ThreadArchiveButton