mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-23 00:36:50 +08:00
f22d154486
Summary: The new, styled folder and label picker! Some highlights: - Folder picker has custom icons and a divider - Label picker has checkboxes with off, checked, and intermediate state - Extracted LabelColorizer out of mail-label - Search will bold the results it found - Fixes to Tooltip to prevent it displaying at invalid moments - Keyboard UX improvements to Menu Test Plan: coming soon Reviewers: bengotow Reviewed By: bengotow Differential Revision: https://phab.nylas.com/D1790
24 lines
653 B
CoffeeScript
24 lines
653 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"
|
|
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
|