/* eslint global-require: 0*/ import React from 'react'; import fs from 'fs'; import ConfigSchemaItem from './config-schema-item'; import WorkspaceSection from './workspace-section'; import SendingSection from './sending-section'; import UpdateChannelSection from './update-channel-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 = () => { const dataPath = `${NylasEnv.getConfigDirPath()}/edgehill.db` fs.unlink(dataPath, (err) => { if (err) console.log(err) else this._reboot() }) } render() { return (
sudo apt-get install zenity
).