mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 05:06:53 +08:00
feat(api): add api-experimental.nylas.com as login option
This commit is contained in:
parent
e8912e0e2e
commit
5067bd3cff
4 changed files with 7 additions and 1 deletions
|
@ -76,6 +76,7 @@ class LoginPage extends Page
|
|||
<div className="environment-selector">
|
||||
<select value={@state.environment} onChange={@_onEnvChange}>
|
||||
<option value="development">Development (edgehill-dev, api-staging)</option>
|
||||
<option value="experimental">Experimental (edgehill-staging, api-experimental)</option>
|
||||
<option value="staging">Staging (edgehill-staging, api-staging)</option>
|
||||
<option value="production">Production (edgehill, api)</option>
|
||||
</select>
|
||||
|
|
|
@ -11,7 +11,7 @@ class NylasApiEnvironmentStore extends NylasStore
|
|||
getEnvironment: -> atom.config.get('env')
|
||||
|
||||
_setEnvironment: (env) ->
|
||||
throw new Error("Environment #{env} is not allowed") unless env in ['development', 'staging', 'production']
|
||||
throw new Error("Environment #{env} is not allowed") unless env in ['development', 'experimental', 'staging', 'production']
|
||||
atom.config.set('env', env)
|
||||
@trigger()
|
||||
|
||||
|
|
|
@ -18,6 +18,8 @@ class EdgehillAPI
|
|||
if env is 'development'
|
||||
# @APIRoot = "http://localhost:5009"
|
||||
@APIRoot = "https://edgehill-dev.nylas.com"
|
||||
else if env is 'experimental'
|
||||
@APIRoot = "https://edgehill-staging.nylas.com"
|
||||
else if env is 'staging'
|
||||
@APIRoot = "https://edgehill-staging.nylas.com"
|
||||
else
|
||||
|
|
|
@ -91,6 +91,9 @@ class NylasAPI
|
|||
else if env in ['staging', 'development']
|
||||
@AppID = '54miogmnotxuo5st254trcmb9'
|
||||
@APIRoot = 'https://api-staging.nylas.com'
|
||||
else if env in ['experimental']
|
||||
@AppID = 'c5dis00do2vki9ib6hngrjs18'
|
||||
@APIRoot = 'https://api-experimental.nylas.com'
|
||||
|
||||
current = {@APIToken, @AppID, @APIRoot}
|
||||
|
||||
|
|
Loading…
Reference in a new issue