fix(composer): default warning is now 'Send Anyway' instead of 'Cancel'

Summary: Fixes T2433

Test Plan: Updated composer specs

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2433

Differential Revision: https://phab.nylas.com/D1861
This commit is contained in:
dillon 2015-08-10 12:19:40 -07:00
parent 5ddbe34e58
commit 8c1303e23f
2 changed files with 5 additions and 5 deletions

View file

@ -673,11 +673,11 @@ class ComposerView extends React.Component
if warnings.length > 0 and not options.force
dialog.showMessageBox remote.getCurrentWindow(), {
type: 'warning',
buttons: ['Cancel', 'Send Anyway'],
buttons: ['Send Anyway', 'Cancel'],
message: 'Are you sure?',
detail: "Send #{warnings.join(' and ')}?"
}, (response) =>
if response is 1 # button array index 1
if response is 0 # response is button array index
@_sendDraft({force: true})
return

View file

@ -378,7 +378,7 @@ describe "populated composer", ->
expect(Actions.sendDraft).not.toHaveBeenCalled()
expect(@dialog.showMessageBox).toHaveBeenCalled()
dialogArgs = @dialog.showMessageBox.mostRecentCall.args[1]
expect(dialogArgs.buttons).toEqual ['Cancel', 'Send Anyway']
expect(dialogArgs.buttons).toEqual ['Send Anyway', 'Cancel']
it "does not warn if the body of the email is all quoted text, but the email is a forward", ->
useDraft.call @,
@ -407,7 +407,7 @@ describe "populated composer", ->
expect(Actions.sendDraft).not.toHaveBeenCalled()
expect(@dialog.showMessageBox).toHaveBeenCalled()
dialogArgs = @dialog.showMessageBox.mostRecentCall.args[1]
expect(dialogArgs.buttons).toEqual ['Cancel', 'Send Anyway']
expect(dialogArgs.buttons).toEqual ['Send Anyway', 'Cancel']
it "doesn't show a warning if requirements are satisfied", ->
useFullDraft.apply(@); makeComposer.call(@)
@ -422,7 +422,7 @@ describe "populated composer", ->
expect(Actions.sendDraft).not.toHaveBeenCalled()
expect(@dialog.showMessageBox).toHaveBeenCalled()
dialogArgs = @dialog.showMessageBox.mostRecentCall.args[1]
expect(dialogArgs.buttons).toEqual ['Cancel', 'Send Anyway']
expect(dialogArgs.buttons).toEqual ['Send Anyway', 'Cancel']
noWarn = (body) ->
useDraft.call @, subject: "Subject", to: [u1], body: body