Mailspring/internal_packages/preferences/lib/tabs/preferences-general.jsx
Karim Hamidou 8235f33655 Remove UpdateChannelSection
Use staging autoupdater for staging.

fixed failing test

Fix autoupdater – we were using the wrong command.

Revert "Bump version to 1.5.0"

Temporarily reverting this because I need to test the upgrade path from
0.4.2 => 1.5.0

Revert "Revert "Bump version to 1.5.0""

Had to do this to test the autoupdater.

[fix] [channel drop-down list] Show the stable channel in all cases.

Conflicts:
	internal_packages/preferences/lib/tabs/update-channel-section.jsx

Fix broken autoupdater, for reals.

[master] Replace "Nylas N1" by "Nylas Mail" in build scripts

Summary: As discussed --- we need to make those changes to make the autoupdater work across versions.

Test Plan: Will run a build.

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3701

Revert "Revert "Revert "Bump version to 1.5.0"""

Need to set the version to 0.4.402 for testing purposes.

Set preferredChannel in the autoupdater instead of in the ChannelStore

It turns out that Squirrel checks for update at program launch. In some
cases, it would put Pro users on the "nylas-mail" channel because that's
the default channel if you don't pass a preferredChannel.

Conflicts:
	src/flux/stores/update-channel-store.es6

Set the autoupdater preferredChannel to stable.

Don't try to move the app file to the Application folder ourselves

Because of MacOS Gatekeeper path randomization issues
(https://github.com/Squirrel/Squirrel.Mac/issues/182) we need the user
to move the app themselves. Changed the dialog to ask them to do this
politely.

Conflicts:
	internal_packages/verify-install-location/lib/main.es6
2017-01-16 16:46:52 -08:00

91 lines
2.5 KiB
JavaScript

/* eslint global-require: 0*/
import React from 'react';
import {Actions} from 'nylas-exports'
import ConfigSchemaItem from './config-schema-item';
import WorkspaceSection from './workspace-section';
import SendingSection from './sending-section';
class PreferencesGeneral extends React.Component {
static displayName = 'PreferencesGeneral'
static propTypes = {
config: React.PropTypes.object,
configSchema: React.PropTypes.object,
};
_reboot = () => {
const app = require('electron').remote.app;
app.relaunch()
app.quit()
}
_resetAccountsAndSettings = () => {
const rimraf = require('rimraf')
rimraf(NylasEnv.getConfigDirPath(), {disableGlob: true}, (err) => {
if (err) console.log(err)
else this._reboot()
})
}
_resetEmailCache = () => {
Actions.resetEmailCache()
}
render() {
return (
<div className="container-general" style={{maxWidth: 600}}>
<WorkspaceSection config={this.props.config} configSchema={this.props.configSchema} />
<ConfigSchemaItem
configSchema={this.props.configSchema.properties.notifications}
keyName="Notifications"
keyPath="core.notifications"
config={this.props.config}
/>
<div className="platform-note platform-linux-only">
N1 desktop notifications on Linux require Zenity. You may need to install
it with your package manager (i.e., <code>sudo apt-get install zenity</code>).
</div>
<ConfigSchemaItem
configSchema={this.props.configSchema.properties.reading}
keyName="Reading"
keyPath="core.reading"
config={this.props.config}
/>
<ConfigSchemaItem
configSchema={this.props.configSchema.properties.composing}
keyName="Composing"
keyPath="core.composing"
config={this.props.config}
/>
<SendingSection
config={this.props.config}
configSchema={this.props.configSchema}
/>
<ConfigSchemaItem
configSchema={this.props.configSchema.properties.attachments}
keyName="Attachments"
keyPath="core.attachments"
config={this.props.config}
/>
<div className="local-data">
<h6>Local Data</h6>
<div className="btn" onClick={this._resetEmailCache}>Reset Email Cache</div>
<div className="btn" onClick={this._resetAccountsAndSettings}>Reset Accounts and Settings</div>
</div>
</div>
)
}
}
export default PreferencesGeneral;