message: refactor(options): add reset button
diff: import React from 'react'
  import { openURL } from '@/_helpers/browser-api'
  +import { resetConfig } from '@/_helpers/config-manager'
  +import { resetAllProfiles } from '@/_helpers/profile-manager'
  import { Props } from '../typings'
  import { updateConfigOrProfile, formItemLayout } from '../helpers'
  @@ -9,10 +11,26 @@ import { Form, Select, Switch, Button } from 'antd'
  const isChrome = navigator.userAgent.includes('Chrome')
  export class General extends React.Component<Props & FormComponentProps> {
  + isReseted = false
  +
  openShortcuts = () => {
  openURL('chrome://extensions/shortcuts')
  }
  + resetConfigs = async () => {
  + await resetConfig()
  + this.isReseted = true
  + await resetAllProfiles()
  + this.isReseted = true
  + }
  +
  + componentDidUpdate () {
  + if (this.isReseted) {
  + this.isReseted = false
  + this.props.form.resetFields()
  + }
  + }
  +
  render () {
  const { t, config } = this.props
  const { getFieldDecorator } = this.props.form
  @@ -60,6 +78,15 @@ export class General extends React.Component<Props & FormComponentProps> {
  </Select>
  )
  }</Form.Item>
  + <Form.Item
  + {...formItemLayout}
  + label={t('opt_config_reset')}
  + >
  + <Button
  + type='danger'
  + onClick={this.resetConfigs}
  + >{t('opt_config_reset')}</Button>
  + </Form.Item>
  </Form>
  )
  }
  