mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-10-07 19:57:56 +08:00
fix(feedback): Remove feedback btn, update "N1 Help" in menu bar
This commit is contained in:
parent
1f29cb3cea
commit
afa22729aa
11 changed files with 7 additions and 94 deletions
|
@ -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
|
|
|
@ -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)
|
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"name": "feedback",
|
|
||||||
"main": "./lib/main",
|
|
||||||
"version": "0.1.0",
|
|
||||||
"engines": {
|
|
||||||
"nylas": "*"
|
|
||||||
},
|
|
||||||
"description": "Intercom feeedback",
|
|
||||||
"dependencies": {
|
|
||||||
},
|
|
||||||
"private":true
|
|
||||||
}
|
|
|
@ -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%);
|
|
||||||
}
|
|
|
@ -52,9 +52,6 @@ class DeveloperBar extends React.Component
|
||||||
<span>Requests: {@state.curlHistory.length}</span>
|
<span>Requests: {@state.curlHistory.length}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="btn-container pull-right">
|
|
||||||
<div className="btn" onClick={ => Actions.sendFeedback() }>Feedback</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{@_sectionContent()}
|
{@_sectionContent()}
|
||||||
<div className="footer">
|
<div className="footer">
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
{
|
{
|
||||||
label: 'Help'
|
label: 'Help'
|
||||||
submenu: [
|
submenu: [
|
||||||
{ label: 'Send Feedback to Nylas', command: 'application:send-feedback' }
|
{ label: 'Nylas N1 Help', command: 'application:view-help' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
submenu: [
|
submenu: [
|
||||||
{ label: "VERSION", enabled: false }
|
{ label: "VERSION", enabled: false }
|
||||||
{ type: 'separator' }
|
{ type: 'separator' }
|
||||||
{ label: 'Send Feedback to Nylas', command: 'application:send-feedback' }
|
{ label: 'Nylas N1 Help', command: 'application:view-help' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
{ label: 'Check for Update', command: 'application:check-for-update', visible: false}
|
{ label: 'Check for Update', command: 'application:check-for-update', visible: false}
|
||||||
{ label: 'Downloading Update', enabled: false, visible: false}
|
{ label: 'Downloading Update', enabled: false, visible: false}
|
||||||
{ type: 'separator' }
|
{ type: 'separator' }
|
||||||
{ label: 'Send Feedback to Nylas', command: 'application:send-feedback' }
|
{ label: 'Nylas N1 Help', command: 'application:view-help' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
{ type: 'separator' }
|
{ type: 'separator' }
|
||||||
|
|
|
@ -273,7 +273,9 @@ class Application
|
||||||
|
|
||||||
@on 'application:add-account', => @windowManager.ensureOnboardingWindow()
|
@on 'application:add-account', => @windowManager.ensureOnboardingWindow()
|
||||||
@on 'application:new-message', => @windowManager.sendToMainWindow('new-message')
|
@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:open-preferences', => @windowManager.sendToMainWindow('open-preferences')
|
||||||
@on 'application:show-main-window', => @openWindowsForTokenState()
|
@on 'application:show-main-window', => @openWindowsForTokenState()
|
||||||
@on 'application:show-work-window', => @windowManager.showWorkWindow()
|
@on 'application:show-work-window', => @windowManager.showWorkWindow()
|
||||||
|
|
|
@ -126,8 +126,7 @@ class Actions
|
||||||
@longPollOffline: ActionScopeWorkWindow
|
@longPollOffline: ActionScopeWorkWindow
|
||||||
@willMakeAPIRequest: ActionScopeWorkWindow
|
@willMakeAPIRequest: ActionScopeWorkWindow
|
||||||
@didMakeAPIRequest: ActionScopeWorkWindow
|
@didMakeAPIRequest: ActionScopeWorkWindow
|
||||||
@sendFeedback: ActionScopeWindow
|
|
||||||
|
|
||||||
###
|
###
|
||||||
Public: Retry the initial sync
|
Public: Retry the initial sync
|
||||||
|
|
||||||
|
|
|
@ -30,10 +30,6 @@ class WindowEventHandler
|
||||||
@subscribe ipcRenderer, 'update-available', (event, detail) ->
|
@subscribe ipcRenderer, 'update-available', (event, detail) ->
|
||||||
NylasEnv.updateAvailable(detail)
|
NylasEnv.updateAvailable(detail)
|
||||||
|
|
||||||
@subscribe ipcRenderer, 'send-feedback', (detail) ->
|
|
||||||
Actions = require './flux/actions'
|
|
||||||
Actions.sendFeedback()
|
|
||||||
|
|
||||||
@subscribe ipcRenderer, 'browser-window-focus', ->
|
@subscribe ipcRenderer, 'browser-window-focus', ->
|
||||||
document.body.classList.remove('is-blurred')
|
document.body.classList.remove('is-blurred')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue