switch(env): Move N1 to Nylas production API

This commit is contained in:
Ben Gotow 2015-10-02 15:01:26 -07:00
parent 6a8334a75f
commit 7ae4c8209d
5 changed files with 7 additions and 8 deletions

View file

@ -322,7 +322,8 @@ class CategoryPicker extends React.Component
_isUserFacing: (allInInbox, category) =>
hiddenCategories = []
currentCategoryId = FocusedMailViewStore.mailView().categoryId()
currentCategoryId = FocusedMailViewStore.mailView()?.categoryId()
if @_account?.usesLabels()
hiddenCategories = ["all", "spam", "trash", "drafts", "sent"]
if allInInbox

View file

@ -90,7 +90,7 @@ class ActivitySidebar extends React.Component
<RetinaImg name="sending-spinner.gif" width={18} mode={RetinaImg.Mode.ContentPreserve} />
</div>
<div className="inner">
Syncing mail data&hellip;
Syncing your mailbox&hellip;
</div>
</div>

View file

@ -55,7 +55,7 @@ class InitialSyncActivity extends React.Component
else
<div className={classSet} key="initial-sync" onClick={=> @setState expandedSync: !@state.expandedSync}>
{@_renderProgressBar(totalProgress)}
<div className="inner">Syncing mail data&hellip;</div>
<div className="inner">Syncing your mailbox&hellip;</div>
{@_expandedSyncState()}
</div>

View file

@ -4,11 +4,10 @@ NylasStore = require 'nylas-store'
class NylasApiEnvironmentStore extends NylasStore
constructor: ->
@listenTo Actions.changeAPIEnvironment, @_setEnvironment
@_setEnvironment('production') unless atom.config.get('env')
defaultEnv = if atom.inDevMode() then 'staging' else 'staging'
@_setEnvironment(defaultEnv) unless atom.config.get('env')
getEnvironment: -> atom.config.get('env')
getEnvironment: ->
atom.config.get('env')
_setEnvironment: (env) ->
throw new Error("Environment #{env} is not allowed") unless env in ['development', 'experimental', 'staging', 'production']

View file

@ -18,7 +18,6 @@ class EdgehillAPI
_onConfigChanged: =>
env = atom.config.get('env')
if env is 'development'
# @APIRoot = "http://localhost:5009"
@APIRoot = "https://edgehill-dev.nylas.com"
else if env is 'experimental'
@APIRoot = "https://edgehill-experimental.nylas.com"