@electerm/electerm-react 3.15.58 → 3.15.68

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.
@@ -64,6 +64,7 @@ export const sshBookmarkSchema = {
64
64
  sshAgent: z.string().optional().describe('SSH agent path'),
65
65
  serverHostKey: z.array(z.string()).optional().describe('Server host key algorithms'),
66
66
  cipher: z.array(z.string()).optional().describe('Cipher list'),
67
+ compress: z.array(z.string()).optional().describe('Compression algorithms'),
67
68
  quickCommands: z.array(quickCommandSchema).optional().describe('Quick commands'),
68
69
  x11: z.boolean().optional().describe('Enable x11 forwarding, default is false'),
69
70
  term: z.string().optional().describe('Terminal type, default is xterm-256color'),
@@ -1,6 +1,6 @@
1
1
  export default [
2
2
  {
3
3
  name: 'homepage',
4
- url: 'https://electerm.html5beta.com'
4
+ url: 'https://electerm.org'
5
5
  }
6
6
  ]
@@ -22,6 +22,7 @@ const bookmarkSchema = {
22
22
  sshAgent: 'string - ssh agent path',
23
23
  serverHostKey: 'array - server host key algorithms',
24
24
  cipher: 'array - cipher list',
25
+ compress: 'array - compression algorithms (zlib@openssh.com, zlib, none)',
25
26
  runScripts: 'array - run scripts after connected ({delay,script})',
26
27
  quickCommands: 'array - quick commands ({name,command})',
27
28
  proxy: 'string - proxy address (socks5://...)',
@@ -35,6 +35,13 @@ const cipherOptions = [
35
35
  'curve25519-sha256@libssh.org'
36
36
  ]
37
37
 
38
+ // Available compress options
39
+ const compressOptions = [
40
+ 'zlib@openssh.com',
41
+ 'zlib',
42
+ 'none'
43
+ ]
44
+
38
45
  // Available serverHostKey options from ssh2-alg.js
39
46
  const serverHostKeyOptions = [
40
47
  'ssh-rsa',
@@ -98,6 +105,20 @@ export default function renderX11 ({ form }) {
98
105
  ))}
99
106
  </Select>
100
107
  </FormItem>
108
+ <FormItem
109
+ {...formItemLayout}
110
+ label='compress'
111
+ name='compress'
112
+ >
113
+ <Select
114
+ mode='tags'
115
+ style={{ width: '100%' }}
116
+ >
117
+ {compressOptions.map(c => (
118
+ <Option key={c} value={c}>{c}</Option>
119
+ ))}
120
+ </Select>
121
+ </FormItem>
101
122
  <FormItem
102
123
  {...formItemLayout}
103
124
  label='serverHostKey'
@@ -24,6 +24,7 @@ const sshConfig = {
24
24
  sshAgent: '',
25
25
  serverHostKey: [],
26
26
  cipher: [],
27
+ compress: [],
27
28
  ...getTerminalDefaults(store),
28
29
  ...getSshDefaults(),
29
30
  ...getTerminalBackgroundDefaults(defaultSetting),
@@ -2,8 +2,9 @@
2
2
  height 80px
3
3
  .logo-img-small
4
4
  height 28px
5
+ border-radius 28px
5
6
  @media (max-width: 500px)
6
7
  .logo-img
7
8
  height 40px
8
9
  .logo-img-small
9
- height 20px
10
+ height 20px
@@ -119,7 +119,7 @@ export default class ErrorBoundary extends React.PureComponent {
119
119
  </div>
120
120
  <div className='pd3y'>
121
121
  <img
122
- src='https://electerm.html5beta.com/electerm-wechat-group-qr.jpg'
122
+ src='https://electerm.org/electerm-wechat-group-qr.jpg'
123
123
  className='mwm-100'
124
124
  />
125
125
  </div>
@@ -70,7 +70,8 @@ export default auto(function SettingModalWrap (props) {
70
70
  'config',
71
71
  'checkedKeys',
72
72
  'expandedKeys',
73
- 'leftSidebarWidth'
73
+ 'leftSidebarWidth',
74
+ 'initLoadingData'
74
75
  ])
75
76
  }
76
77
  const items = [
@@ -13,7 +13,8 @@ export default auto(function BookmarkSelect (props) {
13
13
  leftSidebarWidth,
14
14
  expandedKeys,
15
15
  bookmarks,
16
- bookmarksMap
16
+ bookmarksMap,
17
+ initLoadingData
17
18
  } = store
18
19
  if (from === 'sidebar' && openedSideBar !== 'bookmarks') {
19
20
  return null
@@ -39,7 +40,8 @@ export default auto(function BookmarkSelect (props) {
39
40
  expandedKeys,
40
41
  leftSidebarWidth,
41
42
  bookmarkGroupTree: store.bookmarkGroupTree,
42
- autoFocus
43
+ autoFocus,
44
+ initLoadingData
43
45
  }
44
46
  return (
45
47
  <TreeList
@@ -6,13 +6,12 @@ import { PureComponent } from 'react'
6
6
  import {
7
7
  Popover
8
8
  } from 'antd'
9
- import logoRef from '@electerm/electerm-resource/res/imgs/electerm.svg'
9
+ import logoSvg from '@electerm/electerm-resource/res/imgs/electerm.svg?raw'
10
10
  import { shortcutDescExtend } from '../shortcuts/shortcut-handler.js'
11
11
  import MenuRender from './sys-menu.jsx'
12
12
  import { refsStatic } from '../common/ref.js'
13
13
 
14
14
  const e = window.translate
15
- const logo = logoRef.replace(/^\//, '')
16
15
 
17
16
  class MenuBtn extends PureComponent {
18
17
  componentDidMount () {
@@ -202,7 +201,10 @@ class MenuBtn extends PureComponent {
202
201
  <div
203
202
  {...pops}
204
203
  >
205
- <img src={logo} width={28} height={28} />
204
+ <span
205
+ className='menu-logo'
206
+ dangerouslySetInnerHTML={{ __html: logoSvg }}
207
+ />
206
208
  </div>
207
209
  </Popover>
208
210
  )
@@ -68,17 +68,23 @@
68
68
  width 28px
69
69
  height 28px
70
70
  border-radius 30px
71
- color var(--text-light)
71
+ color var(--text)
72
72
  font-size 16px
73
73
  text-align center
74
74
  display inline-block
75
75
  line-height 28px
76
76
  cursor pointer
77
+ color var(--text)
78
+
79
+ .menu-logo
80
+ display inline-block
81
+ width 28px
82
+ height 28px
83
+ vertical-align middle
84
+ color var(--text-disabled)
77
85
  &:hover
78
86
  color var(--text)
79
- .is-main
80
- .menu-control
81
- img
82
- border 1px solid var(--text-dark)
83
- border-radius 28px
84
- background #000
87
+ svg
88
+ fill currentColor
89
+ width 100%
90
+ height 100%
@@ -854,7 +854,7 @@ export default class ItemListTree extends Component {
854
854
 
855
855
  render () {
856
856
  const { ready } = this.state
857
- if (!ready) {
857
+ if (!ready || this.props.initLoadingData) {
858
858
  return (
859
859
  <div className='pd3 aligncenter'>
860
860
  <LoadingOutlined />
@@ -48,6 +48,7 @@ export default () => {
48
48
  // common
49
49
  wsInited: false,
50
50
  configLoaded: false,
51
+ initLoadingData: false,
51
52
  loadTime: 0,
52
53
  lastDataUpdateTime: 0,
53
54
  tabs: [],
@@ -182,55 +182,62 @@ export default (Store) => {
182
182
  }
183
183
  Store.prototype.initData = async function () {
184
184
  const { store } = window
185
- await store.initApp()
186
- const ext = {}
187
- const all = dbNames.map(async name => {
188
- const data = await fetchInitData(name)
189
- return {
190
- name,
191
- data
192
- }
193
- })
194
- await Promise.all(all)
195
- .then(arr => {
196
- for (const { name, data } of arr) {
197
- const dt = JSON.parse(data || '[]')
198
- refsStatic.add('oldState-' + name, dt)
199
- if (name === 'bookmarks') {
200
- ext.bookmarksMap = new Map(
201
- dt.map(d => [d.id, d])
202
- )
203
- }
204
- ext[name] = dt
185
+ store.initLoadingData = true
186
+ try {
187
+ await store.initApp()
188
+ const ext = {}
189
+ const all = dbNames.map(async name => {
190
+ const data = await fetchInitData(name)
191
+ return {
192
+ name,
193
+ data
205
194
  }
206
195
  })
207
- ext.lastDataUpdateTime = await getData('lastDataUpdateTime') || 0
208
- Object.assign(store, ext)
209
- store.loadFontList()
210
- store.fetchItermThemes()
211
- store.openInitSessions()
212
- store.fetchSshConfigItems()
213
- store.initCommandLine().catch(store.onError)
214
- initWatch(store)
215
- setTimeout(
216
- () => {
217
- store.fixProfiles()
218
- store.fixBookmarkGroups()
219
- },
220
- 1000
221
- )
222
- setTimeout(
223
- () => {
224
- store.autoSyncReady = true
225
- },
226
- 2000
227
- )
228
- if (store.config.checkUpdateOnStart) {
229
- store.onCheckUpdate(false)
196
+ await Promise.all(all)
197
+ .then(arr => {
198
+ for (const { name, data } of arr) {
199
+ const dt = JSON.parse(data || '[]')
200
+ refsStatic.add('oldState-' + name, dt)
201
+ if (name === 'bookmarks') {
202
+ ext.bookmarksMap = new Map(
203
+ dt.map(d => [d.id, d])
204
+ )
205
+ }
206
+ ext[name] = dt
207
+ }
208
+ })
209
+ ext.lastDataUpdateTime = await getData('lastDataUpdateTime') || 0
210
+ ext.initLoadingData = false
211
+ Object.assign(store, ext)
212
+ store.loadFontList()
213
+ store.fetchItermThemes()
214
+ store.openInitSessions()
215
+ store.fetchSshConfigItems()
216
+ store.initCommandLine().catch(store.onError)
217
+ initWatch(store)
218
+ setTimeout(
219
+ () => {
220
+ store.fixProfiles()
221
+ store.fixBookmarkGroups()
222
+ },
223
+ 1000
224
+ )
225
+ setTimeout(
226
+ () => {
227
+ store.autoSyncReady = true
228
+ },
229
+ 2000
230
+ )
231
+ if (store.config.checkUpdateOnStart) {
232
+ store.onCheckUpdate(false)
233
+ }
234
+ store.startAutoRunWidgets().catch(err => {
235
+ console.error('Failed to start autorun widgets:', err)
236
+ })
237
+ } catch (err) {
238
+ store.initLoadingData = false
239
+ store.onError(err)
230
240
  }
231
- store.startAutoRunWidgets().catch(err => {
232
- console.error('Failed to start autorun widgets:', err)
233
- })
234
241
  }
235
242
  Store.prototype.initCommandLine = async function () {
236
243
  const opts = await window.pre.runGlobalAsync('initCommandLine')
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "3.15.58",
3
+ "version": "3.15.68",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",
7
7
  "langugeRepo": "https://github.com/electerm/electerm-locales",
8
8
  "privacyNoticeLink": "https://github.com/electerm/electerm/wiki/privacy-notice",
9
9
  "knownIssuesLink": "https://github.com/electerm/electerm/wiki/Know-issues",
10
- "sponsorLink": "https://electerm.html5beta.com/sponsor-electerm.html",
10
+ "sponsorLink": "https://electerm.org/sponsor-electerm.html",
11
11
  "repository": {
12
12
  "type": "git",
13
13
  "url": "git+https://github.com/electerm/electerm.git"
@@ -20,7 +20,7 @@
20
20
  "bugs": {
21
21
  "url": "https://github.com/electerm/electerm/issues"
22
22
  },
23
- "homepage": "https://electerm.html5beta.com",
23
+ "homepage": "https://electerm.org",
24
24
  "releases": "https://github.com/electerm/electerm/releases",
25
25
  "engines": {
26
26
  "node": ">=18.0.0"