|
|
|
@ -1,4 +1,4 @@ |
|
|
|
import React, { PureComponent } from 'react'; |
|
|
|
import React, { Component } from 'react'; |
|
|
|
import { Select, message, Drawer, List, Switch, Divider, Icon, Button, Alert, Tooltip } from 'antd'; |
|
|
|
import { formatMessage } from 'umi/locale'; |
|
|
|
import { CopyToClipboard } from 'react-copy-to-clipboard'; |
|
|
|
@ -23,7 +23,7 @@ const Body = ({ children, title, style }) => ( |
|
|
|
); |
|
|
|
|
|
|
|
@connect(({ setting }) => ({ setting })) |
|
|
|
class SettingDrawer extends PureComponent { |
|
|
|
class SettingDrawer extends Component { |
|
|
|
state = { |
|
|
|
collapse: false, |
|
|
|
}; |
|
|
|
@ -207,17 +207,22 @@ class SettingDrawer extends PureComponent { |
|
|
|
<Divider /> |
|
|
|
|
|
|
|
<Body title={formatMessage({ id: 'app.setting.othersettings' })}> |
|
|
|
<List.Item |
|
|
|
actions={[ |
|
|
|
<Switch |
|
|
|
size="small" |
|
|
|
checked={!!colorWeak} |
|
|
|
onChange={checked => this.changeSetting('colorWeak', checked)} |
|
|
|
/>, |
|
|
|
<List |
|
|
|
split={false} |
|
|
|
renderItem={this.renderLayoutSettingItem} |
|
|
|
dataSource={[ |
|
|
|
{ |
|
|
|
title: formatMessage({ id: 'app.setting.weakmode' }), |
|
|
|
action: ( |
|
|
|
<Switch |
|
|
|
size="small" |
|
|
|
checked={!!colorWeak} |
|
|
|
onChange={checked => this.changeSetting('colorWeak', checked)} |
|
|
|
/> |
|
|
|
), |
|
|
|
}, |
|
|
|
]} |
|
|
|
> |
|
|
|
{formatMessage({ id: 'app.setting.weakmode' })} |
|
|
|
</List.Item> |
|
|
|
/> |
|
|
|
</Body> |
|
|
|
<Divider /> |
|
|
|
<CopyToClipboard |
|
|
|
|