mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-14 01:04:18 +08:00
fix(auth): Resize the auth window after an update to the token status
This commit is contained in:
parent
3ed1256fd1
commit
5a2ddb67d5
3 changed files with 8 additions and 3 deletions
|
@ -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"
|
||||
|
|
|
@ -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?()
|
||||
|
|
|
@ -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", ->
|
||||
|
|
Loading…
Reference in a new issue