fix(onboarding): no longer show welcome page

This commit is contained in:
Evan Morikawa 2016-08-30 14:52:19 -07:00
parent 105a0526cb
commit 95aa6386fc
2 changed files with 1 additions and 35 deletions

View file

@ -67,22 +67,6 @@ export function buildGmailAuthURL(sessionKey) {
});
}
export function buildWelcomeURL(welcomeRoot, {source}) {
const identity = IdentityStore.identity();
if (!identity || !identity.id) { NylasEnv.reportError(new Error("buildWelcomeURL: Can't find Nylas ID")) }
const query = {
f: base64url(identity.firstname),
l: base64url(identity.lastname),
n: base64url(identity.id),
utm_medium: "N1",
}
if (source) { query.utm_source = source }
return url.format({
pathname: `${welcomeRoot}/welcome`,
query: query,
})
}
export function runAuthRequest(accountInfo) {
const {username, type, email, name} = accountInfo;

View file

@ -1,8 +1,7 @@
import OnboardingActions from './onboarding-actions';
import {AccountStore, Actions, IdentityStore} from 'nylas-exports';
import {shell, ipcRenderer} from 'electron';
import {ipcRenderer} from 'electron';
import NylasStore from 'nylas-store';
import {buildWelcomeURL} from './onboarding-helpers';
function accountTypeForProvider(provider) {
if (provider === 'eas') {
@ -79,20 +78,6 @@ class OnboardingStore extends NylasStore {
}
}
/**
* User hits nylas.com for the first time and is given cookieId
* All events must now be associated with cookieId or its current
* alias.
*
* When this page is opened we pass our new Nylas ID. This will get
* aliased to the current cookie on the page.
*/
_openWelcomePage() {
// open the external welcome page
const url = buildWelcomeURL(this.welcomeRoot, {source: "OnboardingStore"});
shell.openExternal(url, {activate: false});
}
_onOnboardingComplete = () => {
// When account JSON is received, we want to notify external services
// that it succeeded. Unfortunately in this case we're likely to
@ -134,9 +119,6 @@ class OnboardingStore extends NylasStore {
const isFirstAccount = AccountStore.accounts().length === 0;
Actions.setNylasIdentity(json);
if (!json.seen_welcome_page) {
this._openWelcomePage();
}
setTimeout(() => {
if (isFirstAccount) {