fix(auth): Resize the auth window after an update to the token status

This commit is contained in:
Ben Gotow 2015-10-06 17:55:44 -07:00
parent 3ed1256fd1
commit 5a2ddb67d5
3 changed files with 8 additions and 3 deletions

View file

@ -265,7 +265,6 @@ class AccountSettingsPage extends React.Component
errorMessage: "Sorry, something went wrong on the Nylas server. Please try again. If you're still having issues, contact us at support@nylas.com."
@_resize()
_onNetworkError: (err) =>
errorMessage = err.message
if errorMessage == "Invite code required"

View file

@ -25,10 +25,10 @@ class TokenAuthPage extends React.Component
@_usub = PageRouterStore.listen(@_onTokenAuthChange)
_onTokenAuthChange: =>
@setState({
@setState
tokenAuthEnabled: PageRouterStore.tokenAuthEnabled()
tokenAuthEnabledError: PageRouterStore.tokenAuthEnabledError()
})
@_resize()
componentWillUnmount: ->
@_usub?()

View file

@ -70,6 +70,12 @@ describe "the `atom` global", ->
out = atom.getDefaultWindowDimensions()
expect(out).toEqual x: 0, y: 0, width: 1000, height: 800
it "always rounds X and Y", ->
spyOn(screen, 'getPrimaryDisplay').andReturn workAreaSize: width: 1845, height: 955
out = atom.getDefaultWindowDimensions()
expect(out).toEqual x: 202, y: 27, width: 1440, height: 900
describe ".isReleasedVersion()", ->
it "returns false if the version is a SHA and true otherwise", ->