@electerm/electerm-react 2.3.136 → 2.3.166

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/client/common/constants.js +4 -2
  2. package/client/common/db.js +2 -1
  3. package/client/common/init-setting-item.js +7 -0
  4. package/client/components/batch-op/batch-op.jsx +3 -8
  5. package/client/components/bookmark-form/common/color-picker.jsx +16 -5
  6. package/client/components/bookmark-form/common/color-picker.styl +1 -2
  7. package/client/components/bookmark-form/common/connection-hopping.jsx +1 -0
  8. package/client/components/bookmark-form/config/common-fields.js +1 -0
  9. package/client/components/common/drawer.jsx +62 -0
  10. package/client/components/common/drawer.styl +34 -0
  11. package/client/components/common/modal.jsx +89 -0
  12. package/client/components/common/modal.styl +77 -0
  13. package/client/components/common/notification-with-details.jsx +34 -0
  14. package/client/components/file-transfer/conflict-resolve.jsx +2 -1
  15. package/client/components/file-transfer/transfer-speed-format.js +6 -0
  16. package/client/components/file-transfer/transfer.jsx +5 -2
  17. package/client/components/file-transfer/transports-action-store.jsx +14 -1
  18. package/client/components/main/main.jsx +2 -0
  19. package/client/components/profile/profile-form.jsx +1 -1
  20. package/client/components/quick-commands/qm.styl +2 -1
  21. package/client/components/quick-commands/quick-commands-form.jsx +1 -1
  22. package/client/components/setting-panel/list.jsx +1 -1
  23. package/client/components/setting-panel/setting-common.jsx +5 -4
  24. package/client/components/setting-panel/setting-terminal.jsx +1 -1
  25. package/client/components/setting-panel/setting-wrap.jsx +4 -10
  26. package/client/components/setting-panel/setting-wrap.styl +8 -6
  27. package/client/components/setting-panel/start-session-select.jsx +146 -21
  28. package/client/components/setting-panel/text-bg-modal.jsx +15 -4
  29. package/client/components/sftp/file-info-modal.jsx +2 -1
  30. package/client/components/sftp/file-item.jsx +2 -0
  31. package/client/components/sftp/paged-list.jsx +2 -1
  32. package/client/components/sftp/sftp-entry.jsx +1 -1
  33. package/client/components/sftp/sftp.styl +13 -0
  34. package/client/components/sidebar/info-modal.jsx +53 -34
  35. package/client/components/sidebar/info.styl +0 -7
  36. package/client/components/tabs/index.jsx +6 -58
  37. package/client/components/tabs/layout-menu.jsx +75 -0
  38. package/client/components/tabs/layout-select.jsx +60 -0
  39. package/client/components/tabs/tabs.styl +64 -0
  40. package/client/components/tabs/workspace-save-modal.jsx +117 -0
  41. package/client/components/tabs/workspace-select.jsx +79 -0
  42. package/client/components/terminal/attach-addon-custom.js +7 -1
  43. package/client/components/terminal/terminal-interactive.jsx +2 -1
  44. package/client/components/terminal/terminal.jsx +0 -1
  45. package/client/components/text-editor/text-editor.jsx +2 -1
  46. package/client/components/tree-list/move-item-modal.jsx +115 -30
  47. package/client/components/tree-list/tree-list.jsx +1 -1
  48. package/client/components/tree-list/tree-list.styl +6 -1
  49. package/client/components/vnc/vnc-session.jsx +2 -2
  50. package/client/components/widgets/widget-control.jsx +4 -5
  51. package/client/components/widgets/widget-form.jsx +3 -8
  52. package/client/components/widgets/widget-instance.jsx +44 -9
  53. package/client/components/widgets/widget-notification-with-details.jsx +34 -0
  54. package/client/css/basic.styl +3 -1
  55. package/client/store/init-state.js +4 -0
  56. package/client/store/load-data.js +15 -6
  57. package/client/store/store.js +2 -0
  58. package/client/store/workspace.js +108 -0
  59. package/package.json +1 -1
@@ -102,7 +102,8 @@ export const settingMap = buildConst([
102
102
  'quickCommands',
103
103
  'addressBookmarks',
104
104
  'profiles',
105
- 'widgets'
105
+ 'widgets',
106
+ 'workspaces'
106
107
  ])
107
108
 
108
109
  export const staticNewItemTabs = new Set([
@@ -331,7 +332,8 @@ export const syncDataMaps = {
331
332
  terminalThemes: ['terminalThemes'],
332
333
  quickCommands: ['quickCommands'],
333
334
  profiles: ['profiles'],
334
- addressBookmarks: ['addressBookmarks']
335
+ addressBookmarks: ['addressBookmarks'],
336
+ workspaces: ['workspaces']
335
337
  }
336
338
  export const terminalTypes = [
337
339
  'xterm-256color',
@@ -31,7 +31,8 @@ export const dbNames = without(
31
31
 
32
32
  export const dbNamesForWatch = without(
33
33
  Object.keys(settingMap),
34
- settingMap.setting
34
+ settingMap.setting,
35
+ settingMap.widgets
35
36
  )
36
37
 
37
38
  /**
@@ -36,5 +36,12 @@ export default (arr, tab) => {
36
36
  id: '',
37
37
  name: e(settingMap.widgets)
38
38
  }
39
+ } else if (tab === settingMap.workspaces) {
40
+ return {
41
+ id: '',
42
+ name: e(settingMap.workspaces),
43
+ layout: 'default',
44
+ tabsByBatch: {}
45
+ }
39
46
  }
40
47
  }
@@ -11,9 +11,9 @@ import {
11
11
  Input,
12
12
  Button,
13
13
  Table,
14
- Drawer,
15
14
  Tabs
16
15
  } from 'antd'
16
+ import Drawer from '../common/drawer'
17
17
  import {
18
18
  sidebarWidth,
19
19
  statusMap,
@@ -672,15 +672,10 @@ export default class BatchOp extends PureComponent {
672
672
  const pops = {
673
673
  open: showBatchOp,
674
674
  onClose: this.handleCancel,
675
- className: 'setting-wrap',
675
+ className: 'setting-wrap batch-op-wrap',
676
676
  size: innerWidth - sidebarWidth,
677
677
  zIndex: 888,
678
- placement: 'left',
679
- styles: {
680
- header: {
681
- display: 'none'
682
- }
683
- }
678
+ placement: 'left'
684
679
  }
685
680
  return (
686
681
  <Drawer
@@ -1,6 +1,5 @@
1
1
  import React, { useState } from 'react'
2
- import { Popover } from 'antd'
3
- import { HexColorPicker, RgbaColorPicker } from 'react-colorful'
2
+ import { Popover, ColorPicker as AntColorPicker } from 'antd'
4
3
  import { defaultColors, getRandomHexColor } from '../../../common/rand-hex-color.js'
5
4
  import { HexInput } from './hex-input.jsx'
6
5
  import './color-picker.styl'
@@ -18,8 +17,11 @@ export const ColorPicker = React.forwardRef((props, ref) => {
18
17
  setVisible(vis)
19
18
  }
20
19
 
20
+ function onColorChange (color) {
21
+ handleChange(props.isRgba ? color.toRgbString() : color.toHexString())
22
+ }
23
+
21
24
  function renderContent () {
22
- const Picker = props.isRgba ? RgbaColorPicker : HexColorPicker
23
25
  return (
24
26
  <div className='color-picker-box'>
25
27
  <div className='fix'>
@@ -40,7 +42,10 @@ export const ColorPicker = React.forwardRef((props, ref) => {
40
42
  }
41
43
  </div>
42
44
  <div className='fright'>
43
- <Picker color={value} onChange={handleChange} />
45
+ <AntColorPicker
46
+ value={value}
47
+ onChange={onColorChange}
48
+ />
44
49
  </div>
45
50
  </div>
46
51
  <div className='pd1y'>
@@ -57,7 +62,13 @@ export const ColorPicker = React.forwardRef((props, ref) => {
57
62
  if (props.disabled) return inner
58
63
 
59
64
  return (
60
- <Popover content={renderContent()} trigger='click' open={visible} placement='bottomLeft' onOpenChange={handleVisibleChange}>
65
+ <Popover
66
+ content={renderContent()}
67
+ trigger='click'
68
+ open={visible}
69
+ placement='bottomLeft'
70
+ onOpenChange={handleVisibleChange}
71
+ >
61
72
  {inner}
62
73
  </Popover>
63
74
  )
@@ -10,8 +10,7 @@
10
10
  width 92px
11
11
  .color-picker-box
12
12
  width 420px
13
- .react-colorful
14
- height 200px
13
+
15
14
  .color-picker-defaults
16
15
  width 200px
17
16
  .color-picker-choose
@@ -180,6 +180,7 @@ export default function renderConnectionHopping (props) {
180
180
  form={formChild}
181
181
  onFinish={handleFinish}
182
182
  initialValues={initialValues}
183
+ component='div'
183
184
  >
184
185
  {renderList()}
185
186
  {renderWarn()}
@@ -219,6 +219,7 @@ export const commonFields = {
219
219
  export const terminalSettings = [
220
220
  commonFields.envLang,
221
221
  commonFields.terminalType,
222
+ commonFields.proxy,
222
223
  commonFields.displayRaw,
223
224
  commonFields.fontFamily,
224
225
  commonFields.fontSize,
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Simple drawer component without animation
3
+ * Replaces antd Drawer for better performance
4
+ */
5
+
6
+ import classnames from 'classnames'
7
+ import './drawer.styl'
8
+
9
+ export default function Drawer (props) {
10
+ const {
11
+ open,
12
+ placement = 'left',
13
+ size,
14
+ zIndex = 1000,
15
+ className,
16
+ children,
17
+ styles = {},
18
+ onClose
19
+ } = props
20
+
21
+ function handleMaskClick (e) {
22
+ if (e.target === e.currentTarget && onClose) {
23
+ onClose()
24
+ }
25
+ }
26
+
27
+ if (!open) {
28
+ return null
29
+ }
30
+
31
+ const drawerStyle = {
32
+ zIndex
33
+ }
34
+
35
+ const contentStyle = {
36
+ width: typeof size === 'number' ? `${size}px` : size,
37
+ ...styles.content
38
+ }
39
+
40
+ const cls = classnames(
41
+ 'custom-drawer',
42
+ `custom-drawer-${placement}`,
43
+ className
44
+ )
45
+
46
+ return (
47
+ <div className={cls} style={drawerStyle}>
48
+ <div
49
+ className='custom-drawer-mask'
50
+ onClick={handleMaskClick}
51
+ />
52
+ <div
53
+ className='custom-drawer-content-wrapper'
54
+ style={contentStyle}
55
+ >
56
+ <div className='custom-drawer-content'>
57
+ {children}
58
+ </div>
59
+ </div>
60
+ </div>
61
+ )
62
+ }
@@ -0,0 +1,34 @@
1
+ .custom-drawer
2
+ position fixed
3
+ top 0
4
+ left 43px
5
+ right 0
6
+ bottom 0
7
+
8
+ .custom-drawer-mask
9
+ position absolute
10
+ top 0
11
+ left 0
12
+ right 0
13
+ bottom 0
14
+ background rgba(0, 0, 0, 0.45)
15
+
16
+ .custom-drawer-content-wrapper
17
+ position absolute
18
+ top 0
19
+ bottom 0
20
+ background var(--main)
21
+ box-shadow 2px 0 8px rgba(0, 0, 0, 0.15)
22
+ overflow auto
23
+ color var(--text)
24
+
25
+ .custom-drawer-left .custom-drawer-content-wrapper
26
+ left 0
27
+
28
+ .custom-drawer-right .custom-drawer-content-wrapper
29
+ right 0
30
+
31
+ .custom-drawer-content
32
+ position relative
33
+ height 100%
34
+ width 100%
@@ -0,0 +1,89 @@
1
+ /**
2
+ * Simple modal component without animation
3
+ * Replaces antd Modal for better performance
4
+ */
5
+
6
+ import { CloseOutlined } from '@ant-design/icons'
7
+ import classnames from 'classnames'
8
+ import './modal.styl'
9
+
10
+ export default function Modal (props) {
11
+ const {
12
+ open,
13
+ title,
14
+ width = 520,
15
+ zIndex = 1000,
16
+ className,
17
+ wrapClassName,
18
+ children,
19
+ footer,
20
+ maskClosable = true,
21
+ onCancel
22
+ } = props
23
+
24
+ function handleMaskClick (e) {
25
+ if (e.target === e.currentTarget && maskClosable && onCancel) {
26
+ onCancel()
27
+ }
28
+ }
29
+
30
+ function handleClose () {
31
+ if (onCancel) {
32
+ onCancel()
33
+ }
34
+ }
35
+
36
+ if (!open) {
37
+ return null
38
+ }
39
+
40
+ const modalStyle = {
41
+ zIndex
42
+ }
43
+
44
+ const contentStyle = {
45
+ width: typeof width === 'number' ? `${width}px` : width
46
+ }
47
+
48
+ const cls = classnames(
49
+ 'custom-modal-wrap',
50
+ wrapClassName,
51
+ className
52
+ )
53
+
54
+ return (
55
+ <div className={cls} style={modalStyle}>
56
+ <div
57
+ className='custom-modal-mask'
58
+ onClick={handleMaskClick}
59
+ />
60
+ <div className='custom-modal-container' onClick={handleMaskClick}>
61
+ <div
62
+ className='custom-modal-content'
63
+ style={contentStyle}
64
+ >
65
+ {title && (
66
+ <div className='custom-modal-header'>
67
+ <div className='custom-modal-title'>{title}</div>
68
+ <button
69
+ type='button'
70
+ className='custom-modal-close'
71
+ onClick={handleClose}
72
+ >
73
+ <CloseOutlined />
74
+ </button>
75
+ </div>
76
+ )}
77
+ <div className='custom-modal-body'>
78
+ {children}
79
+ </div>
80
+ {footer !== null && footer !== undefined && (
81
+ <div className='custom-modal-footer'>
82
+ {footer}
83
+ </div>
84
+ )}
85
+ </div>
86
+ </div>
87
+ </div>
88
+ )
89
+ }
@@ -0,0 +1,77 @@
1
+ .custom-modal-wrap
2
+ position fixed
3
+ top 0
4
+ left 0
5
+ right 0
6
+ bottom 0
7
+ overflow auto
8
+ outline 0
9
+
10
+ .custom-modal-mask
11
+ position fixed
12
+ top 0
13
+ left 0
14
+ right 0
15
+ bottom 0
16
+ background rgba(0, 0, 0, 0.45)
17
+
18
+ .custom-modal-container
19
+ position relative
20
+ display flex
21
+ align-items flex-start
22
+ justify-content center
23
+ min-height 100%
24
+ padding 24px
25
+
26
+ .custom-modal-content
27
+ position relative
28
+ background var(--main)
29
+ border-radius 8px
30
+ box-shadow 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)
31
+ margin-top 50px
32
+ max-width calc(100vw - 48px)
33
+
34
+ .custom-modal-header
35
+ display flex
36
+ align-items center
37
+ justify-content space-between
38
+ padding 16px 24px
39
+ border-bottom 1px solid var(--main-darker)
40
+
41
+ .custom-modal-title
42
+ font-size 16px
43
+ font-weight 600
44
+ color var(--text)
45
+ line-height 1.5
46
+ flex 1
47
+ overflow hidden
48
+ text-overflow ellipsis
49
+ white-space nowrap
50
+
51
+ .custom-modal-close
52
+ display flex
53
+ align-items center
54
+ justify-content center
55
+ width 32px
56
+ height 32px
57
+ padding 0
58
+ margin-left 8px
59
+ background transparent
60
+ border none
61
+ border-radius 4px
62
+ color var(--text)
63
+ cursor pointer
64
+ transition background-color 0.2s
65
+ &:hover
66
+ background var(--main-darker)
67
+ &:focus
68
+ outline none
69
+
70
+ .custom-modal-body
71
+ padding 0 24px 24px 24px
72
+ color var(--text)
73
+
74
+ .custom-modal-footer
75
+ padding 12px 24px
76
+ border-top 1px solid var(--main-darker)
77
+ text-align right
@@ -0,0 +1,34 @@
1
+ import { notification } from 'antd'
2
+ import { CopyOutlined } from '@ant-design/icons'
3
+ import { copy } from '../../common/clipboard'
4
+
5
+ export function showMsg (message, type = 'success', serverInfo = null, duration = 10, description = '') {
6
+ const handleCopy = () => {
7
+ if (serverInfo && serverInfo.url) {
8
+ copy(serverInfo.url)
9
+ }
10
+ }
11
+
12
+ let desc = description
13
+ if (serverInfo) {
14
+ desc = (
15
+ <div>
16
+ {description && <div>{description}</div>}
17
+ <div style={{ display: 'flex', alignItems: 'center' }}>
18
+ <span>URL: <b>{serverInfo.url}</b></span>
19
+ <CopyOutlined
20
+ className='pointer mg1l'
21
+ onClick={handleCopy}
22
+ />
23
+ </div>
24
+ <div>Path: <b>{serverInfo.path}</b></div>
25
+ </div>
26
+ )
27
+ }
28
+
29
+ notification[type]({
30
+ message,
31
+ description: desc,
32
+ duration
33
+ })
34
+ }
@@ -4,7 +4,8 @@
4
4
  */
5
5
 
6
6
  import { Component } from 'react'
7
- import { Modal, Button } from 'antd'
7
+ import { Button } from 'antd'
8
+ import Modal from '../common/modal'
8
9
  import { isString } from 'lodash-es'
9
10
  import AnimateText from '../common/animate-text'
10
11
  import formatTime from '../../common/time'
@@ -47,6 +47,12 @@ export const computePassedTime = (startTime) => {
47
47
  }
48
48
 
49
49
  export const computeLeftTime = (bytes, total, startTime) => {
50
+ if (total === 0) {
51
+ return {
52
+ leftTime: '0s',
53
+ leftTimeInt: 0
54
+ }
55
+ }
50
56
  let now = Date.now()
51
57
  if (now <= startTime) {
52
58
  now = startTime + 1
@@ -71,6 +71,9 @@ export default class TransportAction extends Component {
71
71
  this.transport = null
72
72
  this.fromFile = null
73
73
  refsTransfers.remove(this.id)
74
+ if (this.isFtp) {
75
+ window.initingFtpTabIds?.delete(this.tabId)
76
+ }
74
77
  }
75
78
 
76
79
  localCheckExist = (path) => {
@@ -185,9 +188,9 @@ export default class TransportAction extends Component {
185
188
  const up = {}
186
189
  const total = transfer.fromFile.size
187
190
  let percent = total === 0
188
- ? 0
191
+ ? 100
189
192
  : Math.floor(100 * transferred / total)
190
- percent = percent >= 100 ? 99 : percent
193
+ percent = percent >= 100 ? 100 : percent
191
194
  up.percent = percent
192
195
  up.status = 'active'
193
196
  up.transferred = transferred
@@ -9,6 +9,8 @@ import { maxTransport } from '../../common/constants'
9
9
  import { refsStatic } from '../common/ref'
10
10
  // import { action } from 'manate'
11
11
 
12
+ window.initingFtpTabIds = new Set()
13
+
12
14
  export default class TransportsActionStore extends Component {
13
15
  componentDidMount () {
14
16
  this.control()
@@ -71,7 +73,9 @@ export default class TransportsActionStore extends Component {
71
73
  typeTo,
72
74
  typeFrom,
73
75
  inited,
74
- id
76
+ id,
77
+ tabType,
78
+ tabId
75
79
  } = tr
76
80
 
77
81
  const isTransfer = typeTo !== typeFrom
@@ -80,6 +84,15 @@ export default class TransportsActionStore extends Component {
80
84
  continue
81
85
  }
82
86
 
87
+ // For ftp transfers, ensure only one per tabId is inited
88
+ if (tabType === 'ftp') {
89
+ const hasInited = fileTransfers.some(t => t.tabId === tabId && t.inited && t.id !== id)
90
+ if (hasInited || window.initingFtpTabIds.has(tabId)) {
91
+ continue
92
+ }
93
+ window.initingFtpTabIds.add(tabId)
94
+ }
95
+
83
96
  if (count < maxTransport) {
84
97
  count++
85
98
  refsStatic.get('transfer-queue')?.addToQueue(
@@ -31,6 +31,7 @@ import AIChat from '../ai/ai-chat'
31
31
  import Opacity from '../common/opacity'
32
32
  import MoveItemModal from '../tree-list/move-item-modal'
33
33
  import InputContextMenu from '../common/input-context-menu'
34
+ import WorkspaceSaveModal from '../tabs/workspace-save-modal'
34
35
  import { pick } from 'lodash-es'
35
36
  import deepCopy from 'json-deep-copy'
36
37
  import './wrapper.styl'
@@ -305,6 +306,7 @@ export default auto(function Index (props) {
305
306
  <ConnectionHoppingWarning {...warningProps} />
306
307
  <TerminalCmdSuggestions {...cmdSuggestionsProps} />
307
308
  <TransferQueue />
309
+ <WorkspaceSaveModal store={store} />
308
310
  </div>
309
311
  </ConfigProvider>
310
312
  )
@@ -12,7 +12,7 @@ export default class ProfleFormIndex extends PureComponent {
12
12
  this.setState({
13
13
  ready: true
14
14
  })
15
- }, 200)
15
+ }, 0)
16
16
  }
17
17
 
18
18
  componentWillUnmount () {
@@ -20,11 +20,12 @@
20
20
  .fil-keyword
21
21
  .fil-label
22
22
  .qm-item
23
- color var(--text-light)
23
+ color var(--text-disabled)
24
24
  .qm-item
25
25
  &.name-match
26
26
  &.label-match
27
27
  font-weight bold
28
+ color var(--text)
28
29
 
29
30
  .qm-search-input
30
31
  max-width 200px
@@ -12,7 +12,7 @@ export default class QuickCommandFormIndex extends PureComponent {
12
12
  this.setState({
13
13
  ready: true
14
14
  })
15
- }, 200)
15
+ }, 0)
16
16
  }
17
17
 
18
18
  componentWillUnmount () {
@@ -29,7 +29,7 @@ export default class ItemList extends React.PureComponent {
29
29
  this.setState({
30
30
  ready: true
31
31
  })
32
- }, 200)
32
+ }, 0)
33
33
  }
34
34
 
35
35
  componentWillUnmount () {
@@ -66,7 +66,7 @@ export default class SettingCommon extends Component {
66
66
  this.setState({
67
67
  ready: true
68
68
  })
69
- }, 200)
69
+ }, 0)
70
70
  }
71
71
 
72
72
  componentWillUnmount () {
@@ -518,6 +518,7 @@ export default class SettingCommon extends Component {
518
518
  onStartSessions: props.config.onStartSessions,
519
519
  bookmarks: props.bookmarks,
520
520
  bookmarkGroups: props.bookmarkGroups,
521
+ workspaces: props.store.workspaces,
521
522
  onChangeStartSessions: this.onChangeStartSessions
522
523
  }
523
524
  return (
@@ -528,7 +529,7 @@ export default class SettingCommon extends Component {
528
529
  <Select
529
530
  value={modifier}
530
531
  onChange={this.handleChangeModifier}
531
- className='iblock width100'
532
+ className='width100'
532
533
  popupMatchSelectWidth={false}
533
534
  showSearch
534
535
  >
@@ -536,10 +537,10 @@ export default class SettingCommon extends Component {
536
537
  modifiers.map(this.renderOption)
537
538
  }
538
539
  </Select>
539
- <span className='iblock mg1x'>+</span>
540
+ <span className='mg1x'>+</span>
540
541
  <Select
541
542
  value={key}
542
- className='iblock width100'
543
+ className='width100'
543
544
  onChange={this.handleChangeKey}
544
545
  popupMatchSelectWidth={false}
545
546
  showSearch
@@ -52,7 +52,7 @@ export default class SettingTerminal extends Component {
52
52
  this.setState({
53
53
  ready: true
54
54
  })
55
- }, 200)
55
+ }, 0)
56
56
  }
57
57
 
58
58
  componentWillUnmount () {
@@ -3,7 +3,7 @@
3
3
  */
4
4
 
5
5
  import { Component } from 'react'
6
- import { Drawer } from 'antd'
6
+ import Drawer from '../common/drawer'
7
7
  import { CloseCircleOutlined } from '@ant-design/icons'
8
8
  import { sidebarWidth } from '../../common/constants'
9
9
  import AppDrag from '../tabs/app-drag'
@@ -23,13 +23,7 @@ export default class SettingWrap extends Component {
23
23
  className: 'setting-wrap',
24
24
  size: this.props.innerWidth - sidebarWidth,
25
25
  zIndex: 888,
26
- placement: 'left',
27
- destroyOnHidden: true,
28
- styles: {
29
- header: {
30
- display: 'none'
31
- }
32
- }
26
+ placement: 'left'
33
27
  }
34
28
  return (
35
29
  <Drawer
@@ -40,13 +34,13 @@ export default class SettingWrap extends Component {
40
34
  onClick={this.props.onCancel}
41
35
  />
42
36
  <CloseCircleOutlined
43
- className='close-setting-wrap-icon alt-close-setting-wrap'
37
+ className='close-setting-wrap alt-close-setting-wrap'
44
38
  onClick={this.props.onCancel}
45
39
  />
46
40
  {
47
41
  this.props.useSystemTitleBar ? null : <AppDrag />
48
42
  }
49
- {this.props.visible ? this.props.children : null}
43
+ {this.props.children}
50
44
  </Drawer>
51
45
  )
52
46
  }