2015-10-08 04:55:54 +08:00
|
|
|
{Utils,
|
|
|
|
React,
|
|
|
|
FocusedContactsStore,
|
|
|
|
AccountStore,
|
|
|
|
Actions} = require 'nylas-exports'
|
|
|
|
{RetinaImg} = require 'nylas-component-kit'
|
|
|
|
|
|
|
|
class FeedbackButton extends React.Component
|
|
|
|
@displayName: 'FeedbackButton'
|
|
|
|
|
|
|
|
constructor: (@props) ->
|
|
|
|
|
|
|
|
componentDidMount: =>
|
2015-10-10 07:12:48 +08:00
|
|
|
@_unsubs = []
|
|
|
|
@_unsubs.push Actions.sendFeedback.listen(@_onSendFeedback)
|
2015-10-08 04:55:54 +08:00
|
|
|
|
|
|
|
componentWillUnmount: =>
|
2015-10-10 07:12:48 +08:00
|
|
|
unsub() for unsub in @_unsubs
|
2015-10-08 04:55:54 +08:00
|
|
|
|
|
|
|
render: =>
|
2015-10-22 02:03:27 +08:00
|
|
|
<div style={position:"absolute",height:0} title="Help & Feedback">
|
2016-01-21 03:26:14 +08:00
|
|
|
<div className="btn-feedback" onClick={@_onSendFeedback}>?</div>
|
2015-10-08 04:55:54 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
_onSendFeedback: =>
|
2015-11-12 02:25:11 +08:00
|
|
|
return if NylasEnv.inSpecMode()
|
2016-01-21 03:26:14 +08:00
|
|
|
require('electron').shell.openExternal('http://support.nylas.com/')
|
2015-10-08 04:55:54 +08:00
|
|
|
|
|
|
|
module.exports = FeedbackButton
|