@electerm/electerm-react 3.15.35 → 3.15.37

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.
@@ -90,6 +90,9 @@ export default class BookmarkIndex2 extends PureComponent {
90
90
 
91
91
  renderTypes (bookmarkType, isNew, keys) {
92
92
  if (!isNew || this.state.aiMode) return null
93
+ const filtered = window.et && Array.isArray(window.et.supportSessionTypes)
94
+ ? keys.filter(k => window.et.supportSessionTypes.includes(k))
95
+ : keys
93
96
  return (
94
97
  <Radio.Group
95
98
  buttonStyle='solid'
@@ -99,7 +102,7 @@ export default class BookmarkIndex2 extends PureComponent {
99
102
  disabled={!isNew}
100
103
  onChange={this.handleChange}
101
104
  >
102
- {keys.map(v => {
105
+ {filtered.map(v => {
103
106
  const txt = v === 'ssh' ? 'Ssh/Sftp' : e(v)
104
107
  return (<Radio.Button key={v} value={v}>{txt}</Radio.Button>)
105
108
  })}
@@ -329,10 +329,12 @@ export default Store => {
329
329
  batch
330
330
  ) {
331
331
  if (
332
- (!newTab.type || newTab.type === 'local') &&
333
- !newTab.host &&
332
+ newTab.type === 'local' &&
334
333
  !window.store.hasNodePty
335
334
  ) {
335
+ if (window.et.isWebApp) {
336
+ return
337
+ }
336
338
  return message.warning(
337
339
  'local terminal is not supported, due to node-pty not working in this build'
338
340
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "3.15.35",
3
+ "version": "3.15.37",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",