Separate O365, Outlook, add GMX and Yandex, add notes about required settings

This commit is contained in:
Ben Gotow 2018-08-05 15:20:36 -07:00
parent 36e7495ba6
commit 732322893c
14 changed files with 106 additions and 27 deletions

View file

@ -1,3 +1,5 @@
import { React } from 'mailspring-exports';
const AccountProviders = [ const AccountProviders = [
{ {
provider: 'gmail', provider: 'gmail',
@ -9,9 +11,9 @@ const AccountProviders = [
{ {
provider: 'office365', provider: 'office365',
displayName: 'Office 365', displayName: 'Office 365',
icon: 'ic-settings-account-outlook.png', icon: 'ic-settings-account-office365.png',
headerIcon: 'setup-icon-provider-outlook.png', headerIcon: 'setup-icon-provider-office365.png',
color: '#0078d7', color: '#D83B01',
}, },
{ {
provider: 'yahoo', provider: 'yahoo',
@ -20,9 +22,25 @@ const AccountProviders = [
headerIcon: 'setup-icon-provider-yahoo.png', headerIcon: 'setup-icon-provider-yahoo.png',
color: '#a76ead', color: '#a76ead',
}, },
{
provider: 'outlook',
displayName: 'Outlook.com / Hotmail',
displayNameShort: 'Outlook',
icon: 'ic-settings-account-outlook.png',
headerIcon: 'setup-icon-provider-outlook.png',
color: '#0078d7',
},
{ {
provider: 'icloud', provider: 'icloud',
displayName: 'iCloud', displayName: 'iCloud',
note: (
<span>
<strong>Important:</strong> iCloud requires that you create a unique app password for email
apps like Mailspring. Follow{' '}
<a href="https://support.apple.com/en-us/HT204397">these instructions</a> to create one and
then paste it below.
</span>
),
icon: 'ic-settings-account-icloud.png', icon: 'ic-settings-account-icloud.png',
headerIcon: 'setup-icon-provider-icloud.png', headerIcon: 'setup-icon-provider-icloud.png',
color: '#61bfe9', color: '#61bfe9',
@ -30,15 +48,47 @@ const AccountProviders = [
{ {
provider: 'fastmail', provider: 'fastmail',
displayName: 'FastMail', displayName: 'FastMail',
title: 'Set up your account',
icon: 'ic-settings-account-fastmail.png', icon: 'ic-settings-account-fastmail.png',
headerIcon: 'setup-icon-provider-fastmail.png', headerIcon: 'setup-icon-provider-fastmail.png',
color: '#24345a', color: '#24345a',
}, },
{
provider: 'gmx',
displayName: 'GMX',
note: (
<span>
Enter your email account credentials to get started.<br />
<strong>Important:</strong> GMX requires that you{' '}
<a href="https://support.gmx.com/pop-imap/toggle.html">enable IMAP</a> before using email
clients like Mailspring.
</span>
),
icon: 'ic-settings-account-gmx.png',
headerIcon: 'setup-icon-provider-gmx.png',
color: '#1D387F',
},
{
provider: 'yandex',
displayName: 'Yandex',
note: (
<span>
<strong>Important:</strong> You may need to{' '}
<a href="https://phone-passport.yandex.com/phones">link a phone number</a> to your Yandex
account before connecting email apps. If you use two-factor auth, you need to create an{' '}
<a href="https://yandex.com/support/passport/authorization/app-passwords.html">
App Password
</a>{' '}
for Mailspring.
</span>
),
icon: 'ic-settings-account-yandex.png',
headerIcon: 'setup-icon-provider-yandex.png',
color: '#fff',
},
{ {
provider: 'imap', provider: 'imap',
displayName: 'IMAP / SMTP', displayName: 'IMAP / SMTP',
title: 'Set up your IMAP account', displayNameShort: 'IMAP',
icon: 'ic-settings-account-imap.png', icon: 'ic-settings-account-imap.png',
headerIcon: 'setup-icon-provider-imap.png', headerIcon: 'setup-icon-provider-imap.png',
color: '#aaa', color: '#aaa',

View file

@ -23,6 +23,7 @@ const FormErrorMessage = props => {
); );
} }
if (typeof message === 'string') {
const linkMatch = RegExpUtils.urlRegex({ matchEntireString: false }).exec(message); const linkMatch = RegExpUtils.urlRegex({ matchEntireString: false }).exec(message);
if (linkMatch) { if (linkMatch) {
const link = linkMatch[0]; const link = linkMatch[0];
@ -35,6 +36,7 @@ const FormErrorMessage = props => {
</div> </div>
); );
} }
}
return ( return (
<div className="message error"> <div className="message error">
@ -45,8 +47,8 @@ const FormErrorMessage = props => {
}; };
FormErrorMessage.propTypes = { FormErrorMessage.propTypes = {
empty: PropTypes.string, empty: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
message: PropTypes.string, message: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
}; };
export default FormErrorMessage; export default FormErrorMessage;

View file

@ -26,7 +26,10 @@ class AccountOnboardingSuccess extends Component {
/> />
</div> </div>
<div> <div>
<h2>Successfully connected to {providerConfig.displayName}!</h2> <h2>
Successfully connected to{' '}
{providerConfig.displayNameShort || providerConfig.displayName}!
</h2>
<h3>Adding your account to Mailspring</h3> <h3>Adding your account to Mailspring</h3>
</div> </div>
</div> </div>

View file

@ -22,11 +22,17 @@ class AccountBasicSettingsForm extends React.Component {
}; };
static titleLabel = providerConfig => { static titleLabel = providerConfig => {
return providerConfig.title || `Add your ${providerConfig.displayName} account`; return (
providerConfig.title ||
`Add your ${providerConfig.displayNameShort || providerConfig.displayName} account`
);
}; };
static subtitleLabel = () => { static subtitleLabel = providerConfig => {
return `Enter your email account credentials to get started. Mailspring\nstores your email password securely and it is never sent to our servers.`; return (
providerConfig.note ||
`Enter your email account credentials to get started. Mailspring\nstores your email password securely and it is never sent to our servers.`
);
}; };
static validateAccount = account => { static validateAccount = account => {

View file

@ -260,7 +260,7 @@
.provider-list { .provider-list {
margin: auto; margin: auto;
width: 280px; width: 570px;
} }
.cloud-sync-note { .cloud-sync-note {
margin-bottom: 20px; margin-bottom: 20px;
@ -277,6 +277,14 @@
text-align: left; text-align: left;
cursor: default; cursor: default;
line-height: 63px; line-height: 63px;
width: 280px;
display: inline-block;
border: 1px solid rgba(35, 31, 32, 0.1);
border-radius: 4px;
margin-left: 2.5px;
margin-right: 2.5px;
margin-bottom: 5px;
background: rgba(255, 255, 255, 0.4);
.icon-container { .icon-container {
width: 50px; width: 50px;
@ -289,7 +297,7 @@
} }
} }
.provider:hover { .provider:hover {
background: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.7);
} }
} }

View file

@ -218,7 +218,13 @@ class PreferencesIdentity extends React.Component {
render() { render() {
const { identity } = this.state; const { identity } = this.state;
const { firstName, lastName, emailAddress, stripePlan, stripePlanEffective } = identity; const {
firstName,
lastName,
emailAddress,
stripePlan = '',
stripePlanEffective = '',
} = identity;
const logout = () => Actions.logoutNylasIdentity(); const logout = () => Actions.logoutNylasIdentity();

View file

@ -142,6 +142,9 @@ export default class ApplicationTouchBar {
}); });
flushGroupIfPresent(); flushGroupIfPresent();
global.application.getMainWindow().setTouchBar(new TouchBar(final));
const win = global.application.getMainWindow();
if (!win) return;
win.setTouchBar(new TouchBar(final));
} }
} }

View file

@ -118,7 +118,8 @@ export default class Application extends EventEmitter {
} }
getMainWindow() { getMainWindow() {
return this.windowManager.get(WindowManager.MAIN_WINDOW).browserWindow; const win = this.windowManager.get(WindowManager.MAIN_WINDOW);
return win ? win.browserWindow : null;
} }
getAllWindowDimensions() { getAllWindowDimensions() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB