mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
267a719016
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
24 lines
685 B
CoffeeScript
24 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
|