React = require 'react' shell = require 'shell' classnames = require 'classnames' {RetinaImg} = require 'nylas-component-kit' PageRouterStore = require './page-router-store' OnboardingActions = require './onboarding-actions' class WelcomePage extends React.Component @displayName: "WelcomePage" constructor: (@props) -> @state = step: 0 lastStep: 0 render: ->
OnboardingActions.closeWindow() }>
{@_renderSteps()}
{@_renderButtons()}
_renderButtons: -> buttons = [] # if @state.step > 0 # buttons.push Back btnText = if @state.step is 2 then "Get Started" else "Continue" buttons.push return buttons _renderSteps: -> [ @_renderStep0() @_renderStep1() @_renderStep2() ] _stepClass: (n) -> obj = "step-wrap": true "active": @state.step is n obj["step-#{n}-wrap"] = true className = classnames(obj) return className _renderStep0: ->

Say hello to N1.

The next-generation email platform.

Built with by Nylas
{@_renderNavBubble(0)}
_renderStep1: ->

Developers welcome.

{@_gears()}

N1 is built with modern web technologies and is easy to extend with JavaScript.

{@_renderNavBubble(1)}
_gears: -> gears = [] for i in [0..3] gears.push return gears _renderStep2: ->

N1 is made possible by the Nylas Sync Engine

A modern API layer for
email, contacts & calendar

@_open("https://github.com/nylas/sync-engine")}>more info

Secured using
bank-grade encryption

@_open("https://nylas.com/security/")}>more info
{@_renderNavBubble(2)}
_open: (link) -> shell.openExternal(link) return _renderNavBubble: (step=0) -> bubbles = [0..2].map (n) => active = if n is step then "active" else ""
@setState step: n }>
{bubbles}
_onBack: => @setState(step: @state.step - 1) _onContinue: => if @state.step < 2 @setState(step: @state.step + 1) else if PageRouterStore.tokenAuthEnabled() is "no" OnboardingActions.moveToPage("account-choose") else OnboardingActions.moveToPage("token-auth") module.exports = WelcomePage