Mailspring/internal_packages/onboarding/lib/page-account-choose.jsx
Halla Moore 99e3f732d9 fix(custom-imap): Hide custom imap accounts and settings from onboarding
Summary:
IMAP no longer appears on the onboarding account list, and the option to
edit connection settings does not appear for any of the visible account
types. Custom IMAP accounts can still be added via a menu option.

Fixes T7474

Test Plan: tested locally

Reviewers: juan, jackie, evan

Reviewed By: evan

Maniphest Tasks: T7474

Differential Revision: https://phab.nylas.com/D3636
2017-01-12 10:25:33 -08:00

44 lines
1.2 KiB
JavaScript

import React from 'react';
import {RetinaImg} from 'nylas-component-kit';
import OnboardingActions from './onboarding-actions';
import AccountTypes from './account-types';
export default class AccountChoosePage extends React.Component {
static displayName = "AccountChoosePage";
static propTypes = {
accountInfo: React.PropTypes.object,
}
_renderAccountTypes() {
return AccountTypes.filter(accountType => !accountType.hidden).map((accountType) =>
<div
key={accountType.type}
className={`provider ${accountType.type}`}
onClick={() => OnboardingActions.setAccountType(accountType.type)}
>
<div className="icon-container">
<RetinaImg
name={accountType.icon}
mode={RetinaImg.Mode.ContentPreserve}
className="icon"
/>
</div>
<span className="provider-name">{accountType.displayName}</span>
</div>
);
}
render() {
return (
<div className="page account-choose">
<h2>
Connect an email account
</h2>
<div className="provider-list">
{this._renderAccountTypes()}
</div>
</div>
);
}
}