fix(feedback): Remove feedback btn, update "N1 Help" in menu bar

This commit is contained in:
Ben Gotow 2016-02-24 13:49:15 -08:00
parent 1f29cb3cea
commit afa22729aa
11 changed files with 7 additions and 94 deletions

View file

@ -1,29 +0,0 @@
{Utils,
React,
FocusedContactsStore,
AccountStore,
Actions} = require 'nylas-exports'
{RetinaImg} = require 'nylas-component-kit'
class FeedbackButton extends React.Component
@displayName: 'FeedbackButton'
constructor: (@props) ->
componentDidMount: =>
@_unsubs = []
@_unsubs.push Actions.sendFeedback.listen(@_onSendFeedback)
componentWillUnmount: =>
unsub() for unsub in @_unsubs
render: =>
<div style={position:"absolute",height:0} title="Help & Feedback">
<div className="btn-feedback" onClick={@_onSendFeedback}>?</div>
</div>
_onSendFeedback: =>
return if NylasEnv.inSpecMode()
require('electron').shell.openExternal('https://nylas.zendesk.com/hc/en-us/sections/203638587-N1')
module.exports = FeedbackButton

View file

@ -1,13 +0,0 @@
{WorkspaceStore, ComponentRegistry} = require 'nylas-exports'
FeedbackButton = require './feedback-button'
protocol = require('remote').require('protocol')
module.exports =
activate: (@state) ->
ComponentRegistry.register FeedbackButton,
location: WorkspaceStore.Sheet.Global.Footer
serialize: ->
deactivate: ->
ComponentRegistry.unregister(FeedbackButton)

View file

@ -1,12 +0,0 @@
{
"name": "feedback",
"main": "./lib/main",
"version": "0.1.0",
"engines": {
"nylas": "*"
},
"description": "Intercom feeedback",
"dependencies": {
},
"private":true
}

View file

@ -1,27 +0,0 @@
@import "ui-variables";
@import "ui-mixins";
.btn-feedback {
position: fixed;
bottom: 7px;
right: 7px;
background: linear-gradient(to bottom, #419bf9 0%, #1081f7 100%);
width: 38px;
height: 38px;
border-radius: 25px;
display: inline-block;
font-size: 28px;
text-align: center;
line-height: 37px;
color: rgba(255, 255, 255, 0.9);
border: 1px solid #0668ce;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
cursor: default;
}
.btn-feedback:hover {
color:rgba(255,255,255,1);
background: linear-gradient(to bottom, lighten(@blue,5%) 0%, darken(@blue, 5%) 100%);
}
.btn-feedback:active {
background: linear-gradient(to bottom, darken(@blue,20%) 0%, darken(@blue, 10%) 100%);
}

View file

@ -52,9 +52,6 @@ class DeveloperBar extends React.Component
<span>Requests: {@state.curlHistory.length}</span>
</div>
</div>
<div className="btn-container pull-right">
<div className="btn" onClick={ => Actions.sendFeedback() }>Feedback</div>
</div>
</div>
{@_sectionContent()}
<div className="footer">

View file

@ -90,7 +90,7 @@
{
label: 'Help'
submenu: [
{ label: 'Send Feedback to Nylas', command: 'application:send-feedback' }
{ label: 'Nylas N1 Help', command: 'application:view-help' }
]
}
]

View file

@ -62,7 +62,7 @@
submenu: [
{ label: "VERSION", enabled: false }
{ type: 'separator' }
{ label: 'Send Feedback to Nylas', command: 'application:send-feedback' }
{ label: 'Nylas N1 Help', command: 'application:view-help' }
]
}
]

View file

@ -50,7 +50,7 @@
{ label: 'Check for Update', command: 'application:check-for-update', visible: false}
{ label: 'Downloading Update', enabled: false, visible: false}
{ type: 'separator' }
{ label: 'Send Feedback to Nylas', command: 'application:send-feedback' }
{ label: 'Nylas N1 Help', command: 'application:view-help' }
]
}
{ type: 'separator' }

View file

@ -273,7 +273,9 @@ class Application
@on 'application:add-account', => @windowManager.ensureOnboardingWindow()
@on 'application:new-message', => @windowManager.sendToMainWindow('new-message')
@on 'application:send-feedback', => @windowManager.sendToMainWindow('send-feedback')
@on 'application:view-help', =>
url = 'https://nylas.zendesk.com/hc/en-us/sections/203638587-N1'
require('electron').shell.openExternal(url)
@on 'application:open-preferences', => @windowManager.sendToMainWindow('open-preferences')
@on 'application:show-main-window', => @openWindowsForTokenState()
@on 'application:show-work-window', => @windowManager.showWorkWindow()

View file

@ -126,7 +126,6 @@ class Actions
@longPollOffline: ActionScopeWorkWindow
@willMakeAPIRequest: ActionScopeWorkWindow
@didMakeAPIRequest: ActionScopeWorkWindow
@sendFeedback: ActionScopeWindow
###
Public: Retry the initial sync

View file

@ -30,10 +30,6 @@ class WindowEventHandler
@subscribe ipcRenderer, 'update-available', (event, detail) ->
NylasEnv.updateAvailable(detail)
@subscribe ipcRenderer, 'send-feedback', (detail) ->
Actions = require './flux/actions'
Actions.sendFeedback()
@subscribe ipcRenderer, 'browser-window-focus', ->
document.body.classList.remove('is-blurred')