@electerm/electerm-react 1.39.76 → 1.39.99

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 (112) hide show
  1. package/client/common/constants.js +8 -0
  2. package/client/common/create-title.jsx +3 -4
  3. package/client/common/default-setting.js +2 -1
  4. package/client/common/init-setting-item.js +3 -6
  5. package/client/common/new-terminal.js +1 -2
  6. package/client/common/terminal-theme.js +2 -3
  7. package/client/components/auth/login.jsx +2 -3
  8. package/client/components/batch-op/batch-op.jsx +18 -36
  9. package/client/components/bookmark-form/color-picker.jsx +1 -1
  10. package/client/components/bookmark-form/form-ssh-common.jsx +4 -7
  11. package/client/components/bookmark-form/form-tabs.jsx +4 -8
  12. package/client/components/bookmark-form/index.jsx +5 -9
  13. package/client/components/bookmark-form/local-form-ui.jsx +3 -6
  14. package/client/components/bookmark-form/proxy.jsx +1 -2
  15. package/client/components/bookmark-form/quick-command.jsx +7 -8
  16. package/client/components/bookmark-form/rdp-form-ui.jsx +2 -4
  17. package/client/components/bookmark-form/render-auth-ssh.jsx +1 -2
  18. package/client/components/bookmark-form/render-connection-hopping.jsx +9 -11
  19. package/client/components/bookmark-form/render-delayed-scripts.jsx +36 -35
  20. package/client/components/bookmark-form/render-ssh-tunnel.jsx +9 -12
  21. package/client/components/bookmark-form/serial-form-ui.jsx +4 -8
  22. package/client/components/bookmark-form/sftp-enable.jsx +1 -2
  23. package/client/components/bookmark-form/telnet-form-ui.jsx +2 -4
  24. package/client/components/bookmark-form/tree-delete.jsx +3 -4
  25. package/client/components/bookmark-form/use-quick-commands.jsx +5 -6
  26. package/client/components/bookmark-form/use-submit.jsx +1 -2
  27. package/client/components/bookmark-form/use-ui.jsx +4 -6
  28. package/client/components/bookmark-form/vnc-form-ui.jsx +2 -4
  29. package/client/components/bookmark-form/web-form-ui.jsx +2 -4
  30. package/client/components/common/markdown.jsx +1 -1
  31. package/client/components/context-menu/context-menu.jsx +3 -4
  32. package/client/components/context-menu/menu-btn.jsx +13 -18
  33. package/client/components/footer/batch-input.jsx +1 -2
  34. package/client/components/footer/footer-entry.jsx +2 -3
  35. package/client/components/footer/footer.styl +1 -1
  36. package/client/components/main/error-wrapper.jsx +2 -4
  37. package/client/components/main/upgrade.jsx +2 -4
  38. package/client/components/main/upgrade.styl +4 -1
  39. package/client/components/profile/profile-form-elem.jsx +28 -10
  40. package/client/components/quick-commands/quick-commands-box.jsx +1 -2
  41. package/client/components/quick-commands/quick-commands-form-elem.jsx +7 -12
  42. package/client/components/quick-commands/quick-commands-list-form.jsx +5 -6
  43. package/client/components/quick-commands/quick-commands-list.jsx +2 -3
  44. package/client/components/quick-commands/quick-commands-select.jsx +1 -2
  45. package/client/components/rdp/rdp-session.jsx +0 -3
  46. package/client/components/rdp/resolution-form.jsx +3 -6
  47. package/client/components/session/session.jsx +3 -5
  48. package/client/components/session/sessions.jsx +4 -6
  49. package/client/components/setting-panel/keywords-form.jsx +2 -3
  50. package/client/components/setting-panel/list.jsx +3 -6
  51. package/client/components/setting-panel/setting-common.jsx +10 -14
  52. package/client/components/setting-panel/setting-modal.jsx +7 -11
  53. package/client/components/setting-panel/setting-terminal.jsx +13 -16
  54. package/client/components/setting-panel/start-session-select.jsx +1 -2
  55. package/client/components/setting-panel/tab-history.jsx +2 -3
  56. package/client/components/setting-sync/data-import.jsx +4 -7
  57. package/client/components/setting-sync/data-select-item.jsx +25 -0
  58. package/client/components/setting-sync/data-select.jsx +39 -0
  59. package/client/components/setting-sync/setting-sync-form.jsx +8 -12
  60. package/client/components/setting-sync/setting-sync.jsx +12 -1
  61. package/client/components/sftp/address-bar.jsx +1 -2
  62. package/client/components/sftp/confirm-modal-store.jsx +1 -2
  63. package/client/components/sftp/file-item.jsx +8 -10
  64. package/client/components/sftp/file-mode-modal.jsx +1 -2
  65. package/client/components/sftp/file-props-modal.jsx +1 -2
  66. package/client/components/sftp/list-table-ui.jsx +1 -2
  67. package/client/components/sftp/permission-render.jsx +1 -2
  68. package/client/components/sftp/sftp-entry.jsx +21 -7
  69. package/client/components/sftp/transfer-tag.jsx +1 -2
  70. package/client/components/shortcuts/shortcuts.jsx +5 -28
  71. package/client/components/sidebar/bookmark.jsx +6 -9
  72. package/client/components/sidebar/history.jsx +4 -6
  73. package/client/components/sidebar/index.jsx +9 -16
  74. package/client/components/sidebar/info-modal.jsx +10 -15
  75. package/client/components/sidebar/side-panel.jsx +3 -2
  76. package/client/components/sidebar/transfer-history-modal.jsx +3 -6
  77. package/client/components/sidebar/transfer-list-control.jsx +1 -2
  78. package/client/components/sidebar/transfer-list.jsx +1 -2
  79. package/client/components/sidebar/transfer-modal.jsx +2 -4
  80. package/client/components/sidebar/transport-ui.jsx +1 -2
  81. package/client/components/tabs/index.jsx +28 -20
  82. package/client/components/tabs/tab-title.jsx +1 -1
  83. package/client/components/tabs/tab.jsx +30 -8
  84. package/client/components/tabs/tabs.styl +3 -0
  85. package/client/components/tabs/window-control.jsx +4 -5
  86. package/client/components/terminal/index.jsx +6 -8
  87. package/client/components/terminal/term-search.jsx +7 -7
  88. package/client/components/terminal/terminal-interactive.jsx +2 -4
  89. package/client/components/terminal-info/activity.jsx +4 -5
  90. package/client/components/terminal-info/base.jsx +3 -4
  91. package/client/components/terminal-info/data-cols-parser.jsx +13 -11
  92. package/client/components/terminal-info/terminal-info.styl +5 -4
  93. package/client/components/terminal-theme/index.jsx +6 -9
  94. package/client/components/terminal-theme/theme-list.jsx +1 -2
  95. package/client/components/text-editor/text-editor-form.jsx +4 -8
  96. package/client/components/text-editor/text-editor.jsx +2 -3
  97. package/client/components/tree-list/bookmark-transport.jsx +4 -7
  98. package/client/components/tree-list/tree-list-item.jsx +4 -7
  99. package/client/components/tree-list/tree-list.jsx +3 -6
  100. package/client/components/tree-list/tree-list.styl +3 -2
  101. package/client/components/vnc/vnc-form.jsx +2 -4
  102. package/client/components/vnc/vnc-session.jsx +1 -2
  103. package/client/entry/basic.js +4 -6
  104. package/client/store/common.js +10 -12
  105. package/client/store/index.js +4 -7
  106. package/client/store/init-state.js +2 -3
  107. package/client/store/load-data.js +10 -0
  108. package/client/store/setting.js +2 -3
  109. package/client/store/sync.js +104 -54
  110. package/client/store/system-menu.js +4 -6
  111. package/client/store/terminal-theme.js +2 -4
  112. package/package.json +1 -1
@@ -10,47 +10,48 @@ import { formItemLayout } from '../../common/form-layout'
10
10
 
11
11
  const FormItem = Form.Item
12
12
  const FormList = Form.List
13
- const { prefix } = window
14
- const e = prefix('form')
13
+ const e = window.translate
15
14
 
16
15
  export default function renderRunScripts () {
17
16
  function renderItem (field, i, add, remove) {
18
17
  return (
19
- <Space
20
- align='center'
21
- key={field.key}
22
- >
23
- <FormItem
24
- label=''
25
- name={[field.name, 'delay']}
26
- required
27
- >
28
- <InputNumber
29
- min={1}
30
- step={1}
31
- max={65535}
32
- addonBefore={e('loginScriptDelay')}
33
- className='compact-input'
34
- />
35
- </FormItem>
36
- <FormItem
37
- label=''
38
- name={[field.name, 'script']}
39
- required
40
- className='mg2x'
18
+ <div>
19
+ <Space
20
+ align='center'
21
+ key={field.key}
41
22
  >
42
- <Input.TextArea
43
- rows={1}
44
- placeholder={e('loginScript')}
45
- className='compact-input'
23
+ <FormItem
24
+ label=''
25
+ name={[field.name, 'delay']}
26
+ required
27
+ >
28
+ <InputNumber
29
+ min={1}
30
+ step={1}
31
+ max={65535}
32
+ addonBefore={e('loginScriptDelay')}
33
+ className='compact-input'
34
+ />
35
+ </FormItem>
36
+ <FormItem
37
+ label=''
38
+ name={[field.name, 'script']}
39
+ required
40
+ className='mg2x'
41
+ >
42
+ <Input.TextArea
43
+ rows={1}
44
+ placeholder={e('loginScript')}
45
+ className='compact-input'
46
+ />
47
+ </FormItem>
48
+ <Button
49
+ icon={<MinusCircleOutlined />}
50
+ onClick={() => remove(field.name)}
51
+ className='mg24b'
46
52
  />
47
- </FormItem>
48
- <Button
49
- icon={<MinusCircleOutlined />}
50
- onClick={() => remove(field.name)}
51
- className='mg24b'
52
- />
53
- </Space>
53
+ </Space>
54
+ </div>
54
55
  )
55
56
  }
56
57
 
@@ -18,10 +18,7 @@ const {
18
18
  Button: RadioButton,
19
19
  Group: RadioGroup
20
20
  } = Radio
21
- const { prefix } = window
22
- const e = prefix('ssh')
23
- const s = prefix('sftp')
24
- const m = prefix('menu')
21
+ const e = window.translate
25
22
 
26
23
  export default function renderSshTunnels (props) {
27
24
  const {
@@ -98,11 +95,11 @@ export default function renderSshTunnels (props) {
98
95
  return `${n}socks5://${sshTunnelLocalHost}:${sshTunnelLocalPort}`
99
96
  }
100
97
  const to = sshTunnel === 'forwardRemoteToLocal'
101
- ? `${s('local')}:${sshTunnelLocalHost}:${sshTunnelLocalPort}`
102
- : `${s('remote')}:${sshTunnelRemoteHost}:${sshTunnelRemotePort}`
98
+ ? `${e('local')}:${sshTunnelLocalHost}:${sshTunnelLocalPort}`
99
+ : `${e('remote')}:${sshTunnelRemoteHost}:${sshTunnelRemotePort}`
103
100
  const from = sshTunnel === 'forwardRemoteToLocal'
104
- ? `${s('remote')}:${sshTunnelRemoteHost}:${sshTunnelRemotePort}`
105
- : `${s('local')}:${sshTunnelLocalHost}:${sshTunnelLocalPort}`
101
+ ? `${e('remote')}:${sshTunnelRemoteHost}:${sshTunnelRemotePort}`
102
+ : `${e('local')}:${sshTunnelLocalHost}:${sshTunnelLocalPort}`
106
103
  return (
107
104
  <span>
108
105
  {name ? `[${name}] ` : ''}→ {from} → {to}
@@ -110,7 +107,7 @@ export default function renderSshTunnels (props) {
110
107
  )
111
108
  }
112
109
  }, {
113
- title: m('del'),
110
+ title: e('del'),
114
111
  key: 'op',
115
112
  dataIndex: 'id',
116
113
  render: (id) => {
@@ -168,7 +165,7 @@ export default function renderSshTunnels (props) {
168
165
  }
169
166
  return (
170
167
  <FormItem
171
- label={s('remote')}
168
+ label={e('remote')}
172
169
  {...formItemLayout}
173
170
  required
174
171
  className='ssh-tunnels-host'
@@ -245,7 +242,7 @@ export default function renderSshTunnels (props) {
245
242
  </FormItem>
246
243
  {renderRemote()}
247
244
  <FormItem
248
- label={s('local')}
245
+ label={e('local')}
249
246
  {...formItemLayout}
250
247
  required
251
248
  className='ssh-tunnels-host'
@@ -276,7 +273,7 @@ export default function renderSshTunnels (props) {
276
273
  </FormItem>
277
274
  <FormItem
278
275
  name='name'
279
- label={s('name')}
276
+ label={e('name')}
280
277
  {...formItemLayout}
281
278
  >
282
279
  <Input
@@ -37,11 +37,7 @@ import { ColorPickerItem } from './color-picker-item.jsx'
37
37
 
38
38
  const FormItem = Form.Item
39
39
  const { Option } = Select
40
- const { prefix } = window
41
- const e = prefix('form')
42
- const c = prefix('common')
43
- const s = prefix('setting')
44
- const m = prefix('menu')
40
+ const e = window.translate
45
41
 
46
42
  export default function SerialFormUi (props) {
47
43
  const [
@@ -124,7 +120,7 @@ export default function SerialFormUi (props) {
124
120
  </FormItem>
125
121
  <Spin spinning={loaddingSerials}>
126
122
  <span onClick={props.store.handleGetSerials}>
127
- <ReloadOutlined /> {m('reload')} serials
123
+ <ReloadOutlined /> {e('reload')} serials
128
124
  </span>
129
125
  </Spin>
130
126
  </FormItem>
@@ -262,7 +258,7 @@ export default function SerialFormUi (props) {
262
258
  </FormItem>
263
259
  <FormItem
264
260
  {...formItemLayout}
265
- label={c('bookmarkCategory')}
261
+ label={e('bookmarkCategory')}
266
262
  name='category'
267
263
  >
268
264
  <TreeSelect
@@ -285,7 +281,7 @@ export default function SerialFormUi (props) {
285
281
  },
286
282
  {
287
283
  key: 'settings',
288
- label: s('settings'),
284
+ label: e('settings'),
289
285
  forceRender: true,
290
286
  children: uis
291
287
  },
@@ -6,8 +6,7 @@ import {
6
6
  import { formItemLayout } from '../../common/form-layout'
7
7
 
8
8
  const FormItem = Form.Item
9
- const { prefix } = window
10
- const e = prefix('form')
9
+ const e = window.translate
11
10
 
12
11
  export default function renderEnableSftp () {
13
12
  return [
@@ -25,9 +25,7 @@ import { defaultsDeep, uniqBy } from 'lodash-es'
25
25
  import './bookmark-form.styl'
26
26
 
27
27
  const FormItem = Form.Item
28
- const { prefix } = window
29
- const e = prefix('form')
30
- const s = prefix('setting')
28
+ const e = window.translate
31
29
 
32
30
  export default function TelnetFormUI (props) {
33
31
  const [
@@ -125,7 +123,7 @@ export default function TelnetFormUI (props) {
125
123
  },
126
124
  {
127
125
  key: 'settings',
128
- label: s('settings'),
126
+ label: e('settings'),
129
127
  forceRender: true,
130
128
  children: uis
131
129
  },
@@ -5,8 +5,7 @@ import {
5
5
  } from 'antd'
6
6
  import { defaultBookmarkGroupId, settingMap } from '../../common/constants'
7
7
 
8
- const { prefix } = window
9
- const m = prefix('common')
8
+ const e = window.translate
10
9
 
11
10
  export default class BookmarkTreeDelete extends StartSessionSelect {
12
11
  onExpand = (expandedKeys) => {
@@ -72,12 +71,12 @@ export default class BookmarkTreeDelete extends StartSessionSelect {
72
71
  disabled={!len}
73
72
  onClick={this.handleDel}
74
73
  >
75
- {m('delSelected')} ({len})
74
+ {e('delSelected')} ({len})
76
75
  </Button>
77
76
  <Button
78
77
  onClick={this.handleCancel}
79
78
  >
80
- {m('cancel')}
79
+ {e('cancel')}
81
80
  </Button>
82
81
  </div>
83
82
  <Tree {...rProps} />
@@ -18,8 +18,7 @@ import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons'
18
18
 
19
19
  const FormItem = Form.Item
20
20
  const FormList = Form.List
21
- const { prefix } = window
22
- const t = prefix('quickCommands')
21
+ const e = window.translate
23
22
 
24
23
  export default function useQuickCmds (form, formData) {
25
24
  function renderItem (field, i, add, remove) {
@@ -35,7 +34,7 @@ export default function useQuickCmds (form, formData) {
35
34
  fieldKey={[field.fieldKey, 'first']}
36
35
  rules={[{ required: true, max: 30 }]}
37
36
  >
38
- <Input placeholder={t('quickCommandName')} />
37
+ <Input placeholder={e('quickCommandName')} />
39
38
  </FormItem>
40
39
  <FormItem
41
40
  {...field}
@@ -43,7 +42,7 @@ export default function useQuickCmds (form, formData) {
43
42
  fieldKey={[field.fieldKey, 'first']}
44
43
  rules={[{ required: true, max: 300 }]}
45
44
  >
46
- <Input placeholder={t('quickCommand')} />
45
+ <Input placeholder={e('quickCommand')} />
47
46
  </FormItem>
48
47
  <MinusCircleOutlined onClick={() => remove(field.name)} />
49
48
  </Space>
@@ -52,7 +51,7 @@ export default function useQuickCmds (form, formData) {
52
51
  return (
53
52
  <FormList
54
53
  {...formItemLayout}
55
- label={t('quickCommands')}
54
+ label={e('quickCommands')}
56
55
  name='quickCommands'
57
56
  >
58
57
  {
@@ -71,7 +70,7 @@ export default function useQuickCmds (form, formData) {
71
70
  block
72
71
  icon={<PlusOutlined />}
73
72
  >
74
- {t('newQuickCommand')}
73
+ {e('newQuickCommand')}
75
74
  </Button>
76
75
  </FormItem>
77
76
  </div>
@@ -17,8 +17,7 @@ import { tailFormItemLayout } from '../../common/form-layout'
17
17
  import useFuncs from './use-form-funcs'
18
18
 
19
19
  const FormItem = Form.Item
20
- const { prefix } = window
21
- const e = prefix('form')
20
+ const e = window.translate
22
21
 
23
22
  export default function useBookmarkSubmit (props) {
24
23
  const [
@@ -19,9 +19,7 @@ import mapper from '../../common/auto-complete-data-mapper'
19
19
  import { defaultEnvLang } from '../../common/constants'
20
20
 
21
21
  const FormItem = Form.Item
22
- const { prefix } = window
23
- const e = prefix('form')
24
- const s = prefix('setting')
22
+ const e = window.translate
25
23
 
26
24
  export default function useBookmarkFormUI (props) {
27
25
  const {
@@ -66,7 +64,7 @@ export default function useBookmarkFormUI (props) {
66
64
  </FormItem>,
67
65
  <FormItem
68
66
  {...formItemLayout}
69
- label={s('fontFamily')}
67
+ label={e('fontFamily')}
70
68
  key='fontFamily'
71
69
  name='fontFamily'
72
70
  rules={[{
@@ -78,7 +76,7 @@ export default function useBookmarkFormUI (props) {
78
76
  <FormItem
79
77
  key='fontSize'
80
78
  {...formItemLayout}
81
- label={s('fontSize')}
79
+ label={e('fontSize')}
82
80
  name='fontSize'
83
81
  >
84
82
  <InputNumber
@@ -91,7 +89,7 @@ export default function useBookmarkFormUI (props) {
91
89
  <FormItem
92
90
  key='keepaliveInterval'
93
91
  {...formItemLayout}
94
- label={s('keepaliveIntervalDesc')}
92
+ label={e('keepaliveIntervalDesc')}
95
93
  name='keepaliveInterval'
96
94
  >
97
95
  <InputNumber
@@ -27,9 +27,7 @@ import renderProxy from './proxy'
27
27
  import ConnectionHopping from './render-connection-hopping.jsx'
28
28
 
29
29
  const FormItem = Form.Item
30
- const { prefix } = window
31
- const e = prefix('form')
32
- const c = prefix('common')
30
+ const e = window.translate
33
31
 
34
32
  export default function VncFormUi (props) {
35
33
  const [
@@ -180,7 +178,7 @@ export default function VncFormUi (props) {
180
178
  </FormItem>
181
179
  <FormItem
182
180
  {...formItemLayout}
183
- label={c('bookmarkCategory')}
181
+ label={e('bookmarkCategory')}
184
182
  name='category'
185
183
  >
186
184
  <TreeSelect
@@ -22,9 +22,7 @@ import formatBookmarkGroups from './bookmark-group-tree-format'
22
22
  import findBookmarkGroupId from '../../common/find-bookmark-group-id'
23
23
 
24
24
  const FormItem = Form.Item
25
- const { prefix } = window
26
- const e = prefix('form')
27
- const c = prefix('common')
25
+ const e = window.translate
28
26
 
29
27
  export default function LocalFormUi (props) {
30
28
  const [
@@ -91,7 +89,7 @@ export default function LocalFormUi (props) {
91
89
  </FormItem>
92
90
  <FormItem
93
91
  {...formItemLayout}
94
- label={c('bookmarkCategory')}
92
+ label={e('bookmarkCategory')}
95
93
  name='category'
96
94
  >
97
95
  <TreeSelect
@@ -18,7 +18,7 @@ export default ({ text = '' }) => {
18
18
  )
19
19
  }
20
20
  return (
21
- <div className='pd1y'>
21
+ <div className='markdown-wrap'>
22
22
  {
23
23
  arr.map(render)
24
24
  }
@@ -44,8 +44,7 @@ import {
44
44
  ReloadOutlined
45
45
  } from '@ant-design/icons'
46
46
 
47
- const { prefix } = window
48
- const c = prefix('common')
47
+ const e = window.translate
49
48
 
50
49
  export default class ContextMenu extends React.PureComponent {
51
50
  state = {
@@ -288,9 +287,9 @@ export default class ContextMenu extends React.PureComponent {
288
287
  )
289
288
  return (
290
289
  <Popconfirm
291
- cancelText={c('cancel')}
290
+ cancelText={e('cancel')}
292
291
  key={`context-item-${i}-${text}`}
293
- okText={c('ok')}
292
+ okText={e('ok')}
294
293
  title={title}
295
294
  onConfirm={(e) => this.onClick(e, item)}
296
295
  >
@@ -8,12 +8,7 @@ import { commonActions } from '../../common/constants'
8
8
  import { shortcutDescExtend } from '../shortcuts/shortcut-handler.js'
9
9
  import generate from '../../common/uid'
10
10
 
11
- const { prefix } = window
12
- const e = prefix('control')
13
- const m = prefix('menu')
14
- const c = prefix('common')
15
- const t = prefix('tabs')
16
- const s = prefix('setting')
11
+ const e = window.translate
17
12
  const logo = logoRef.replace(/^\//, '')
18
13
 
19
14
  class MenuBtn extends Component {
@@ -115,7 +110,7 @@ class MenuBtn extends Component {
115
110
  {
116
111
  func: 'addTab',
117
112
  icon: 'RightSquareFilled',
118
- text: t('newTab')
113
+ text: e('newTab')
119
114
  },
120
115
  {
121
116
  func: 'onNewWindow',
@@ -128,19 +123,19 @@ class MenuBtn extends Component {
128
123
  {
129
124
  noCloseMenu: true,
130
125
  icon: 'BookOutlined',
131
- text: c('bookmarks'),
126
+ text: e('bookmarks'),
132
127
  submenu: 'Bookmark'
133
128
  },
134
129
  {
135
130
  noCloseMenu: true,
136
131
  icon: 'ClockCircleOutlined',
137
- text: c('history'),
132
+ text: e('history'),
138
133
  submenu: 'History'
139
134
  },
140
135
  {
141
136
  noCloseMenu: true,
142
137
  icon: 'BarsOutlined',
143
- text: t('sessions'),
138
+ text: e('sessions'),
144
139
  submenu: 'Tabs'
145
140
  },
146
141
  // {
@@ -149,17 +144,17 @@ class MenuBtn extends Component {
149
144
  {
150
145
  func: 'openAbout',
151
146
  icon: 'InfoCircleOutlined',
152
- text: m('about')
147
+ text: e('about')
153
148
  },
154
149
  {
155
150
  func: 'openSetting',
156
151
  icon: 'SettingOutlined',
157
- text: s('settings')
152
+ text: e('settings')
158
153
  },
159
154
  {
160
155
  func: 'openDevTools',
161
156
  icon: 'LeftSquareFilled',
162
- text: m('toggledevtools')
157
+ text: e('toggledevtools')
163
158
  },
164
159
  // {
165
160
  // type: 'hr'
@@ -170,17 +165,17 @@ class MenuBtn extends Component {
170
165
  {
171
166
  func: 'minimize',
172
167
  icon: 'SwitcherFilled',
173
- text: m('minimize')
168
+ text: e('minimize')
174
169
  },
175
170
  {
176
171
  func: 'maximize',
177
172
  icon: 'LayoutFilled',
178
- text: m('maximize')
173
+ text: e('maximize')
179
174
  },
180
175
  {
181
176
  func: 'reload',
182
177
  icon: 'ReloadOutlined',
183
- text: m('reload')
178
+ text: e('reload')
184
179
  },
185
180
  // {
186
181
  // type: 'hr'
@@ -196,12 +191,12 @@ class MenuBtn extends Component {
196
191
  {
197
192
  func: 'restart',
198
193
  icon: 'RedoOutlined',
199
- text: m('restart')
194
+ text: e('restart')
200
195
  },
201
196
  {
202
197
  func: 'close',
203
198
  icon: 'CloseOutlined',
204
- text: m('close')
199
+ text: e('close')
205
200
  }
206
201
  ]
207
202
  }
@@ -13,8 +13,7 @@ import { batchInputLsKey, commonActions } from '../../common/constants'
13
13
  import postMsg from '../../common/post-msg'
14
14
  import classNames from 'classnames'
15
15
 
16
- const { prefix } = window
17
- const e = prefix('ssh')
16
+ const e = window.translate
18
17
 
19
18
  export default class BatchInput extends Component {
20
19
  state = {
@@ -14,8 +14,7 @@ const {
14
14
  Option
15
15
  } = Select
16
16
 
17
- const { prefix } = window
18
- const f = prefix('form')
17
+ const e = window.translate
19
18
 
20
19
  export default class FooterEntry extends Component {
21
20
  handleInfoPanel = () => {
@@ -80,7 +79,7 @@ export default class FooterEntry extends Component {
80
79
  style: {
81
80
  minWidth: 30
82
81
  },
83
- placeholder: f('encode'),
82
+ placeholder: e('encode'),
84
83
  defaultValue: this.props.currentTab?.encode,
85
84
  onSelect: this.handleSwitchEncoding,
86
85
  size: 'small',
@@ -4,7 +4,7 @@
4
4
  background main
5
5
  height 36px
6
6
  position absolute
7
- left 43px
7
+ left 44px
8
8
  right 0
9
9
  bottom 0
10
10
  color text
@@ -5,9 +5,7 @@ import {
5
5
  logoPath1
6
6
  } from '../../common/constants'
7
7
 
8
- const { prefix } = window
9
- const e = prefix('main')
10
- const m = prefix('menu')
8
+ const e = window.translate
11
9
 
12
10
  export default class ErrorBoundary extends React.PureComponent {
13
11
  constructor (props) {
@@ -46,7 +44,7 @@ export default class ErrorBoundary extends React.PureComponent {
46
44
  className='iblock'
47
45
  icon={<ReloadOutlined />}
48
46
  >
49
- {m('reload')}
47
+ {e('reload')}
50
48
  </Button>
51
49
  </h1>
52
50
  <div className='pd1y'>{message}</div>
@@ -19,12 +19,10 @@ import Markdown from '../common/markdown'
19
19
  import downloadMirrors from '../../common/download-mirrors'
20
20
  import './upgrade.styl'
21
21
 
22
- const { prefix } = window
22
+ const e = window.translate
23
23
  const {
24
24
  homepage
25
25
  } = packInfo
26
- const e = prefix('updater')
27
- const c = prefix('common')
28
26
 
29
27
  export default class Upgrade extends PureComponent {
30
28
  state = {
@@ -347,7 +345,7 @@ export default class Upgrade extends PureComponent {
347
345
  >
348
346
  {
349
347
  upgrading
350
- ? <span>{`${e('upgrading')}... ${upgradePercent || 0}% ${c('cancel')}`}</span>
348
+ ? <span>{`${e('upgrading')}... ${upgradePercent || 0}% ${e('cancel')}`}</span>
351
349
  : e('upgrade')
352
350
  }
353
351
  </Button>
@@ -22,4 +22,7 @@
22
22
  .upgrade-panel-body
23
23
  padding 10px 15px
24
24
  .upgrade-panel-title
25
- border-bottom 1px solid darken(main, 30%)
25
+ border-bottom 1px solid darken(main, 30%)
26
+ .markdown-wrap
27
+ max-height 40vh
28
+ overflow-y auto