@electerm/electerm-react 2.11.6 → 2.11.16
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.
- package/client/common/fetch.jsx +1 -1
- package/client/components/bg/css-overwrite.jsx +5 -1
- package/client/components/bookmark-form/ai-bookmark-form.jsx +2 -4
- package/client/components/main/main.jsx +1 -1
- package/client/components/setting-panel/deep-link-control.jsx +1 -1
- package/client/components/tabs/quick-connect.jsx +0 -3
- package/client/store/load-data.js +1 -1
- package/client/store/tab.js +9 -0
- package/package.json +1 -1
package/client/common/fetch.jsx
CHANGED
|
@@ -118,7 +118,11 @@ export default class CssOverwrite extends Component {
|
|
|
118
118
|
const selector = `#container .sessions .session-${tab.id} .xterm-screen::before`
|
|
119
119
|
const styles = []
|
|
120
120
|
if (st === 'index') {
|
|
121
|
-
styles.push(
|
|
121
|
+
styles.push(
|
|
122
|
+
`content: '${tab.tabCount}'`,
|
|
123
|
+
'background-image: none',
|
|
124
|
+
'opacity: 0.1'
|
|
125
|
+
)
|
|
122
126
|
} else if (st === 'text') {
|
|
123
127
|
const text = bg.terminalBackgroundText || this.props.terminalBackgroundText || ''
|
|
124
128
|
const size = bg.terminalBackgroundTextSize || this.props.terminalBackgroundTextSize || 48
|
|
@@ -25,7 +25,6 @@ import { fixBookmarkData } from './fix-bookmark-default.js'
|
|
|
25
25
|
import generate from '../../common/id-with-stamp'
|
|
26
26
|
import AiHistory, { addHistoryItem } from '../ai/ai-history.jsx'
|
|
27
27
|
import { getItem, setItem } from '../../common/safe-local-storage'
|
|
28
|
-
import newTerminal from '../../common/new-terminal'
|
|
29
28
|
|
|
30
29
|
const STORAGE_KEY_DESC = 'ai_bookmark_description'
|
|
31
30
|
const STORAGE_KEY_HISTORY = 'ai_bookmark_history'
|
|
@@ -110,12 +109,12 @@ export default function AIBookmarkForm (props) {
|
|
|
110
109
|
}
|
|
111
110
|
|
|
112
111
|
function getGeneratedData () {
|
|
113
|
-
if (!editorText) return
|
|
112
|
+
if (!editorText) return []
|
|
114
113
|
let parsed = null
|
|
115
114
|
try {
|
|
116
115
|
parsed = fixBookmarkData(JSON.parse(editorText))
|
|
117
116
|
} catch (err) {
|
|
118
|
-
return
|
|
117
|
+
return []
|
|
119
118
|
}
|
|
120
119
|
if (!parsed) return []
|
|
121
120
|
return Array.isArray(parsed) ? parsed : [parsed]
|
|
@@ -182,7 +181,6 @@ export default function AIBookmarkForm (props) {
|
|
|
182
181
|
|
|
183
182
|
const tabOptions = {
|
|
184
183
|
...bm,
|
|
185
|
-
...newTerminal(),
|
|
186
184
|
from: 'quickConnect'
|
|
187
185
|
}
|
|
188
186
|
|
|
@@ -48,7 +48,7 @@ export default auto(function Index (props) {
|
|
|
48
48
|
ipcOnEvent('open-about', store.openAbout)
|
|
49
49
|
ipcOnEvent('new-ssh', store.onNewSsh)
|
|
50
50
|
ipcOnEvent('add-tab-from-command-line', store.addTabFromCommandLine)
|
|
51
|
-
ipcOnEvent('open-tab', store.addTab)
|
|
51
|
+
ipcOnEvent('open-tab', (e, parsed) => store.addTab(parsed))
|
|
52
52
|
ipcOnEvent('openSettings', store.openSetting)
|
|
53
53
|
ipcOnEvent('selectall', store.selectall)
|
|
54
54
|
ipcOnEvent('focused', store.focus)
|
|
@@ -65,7 +65,7 @@ export default function DeepLinkControl () {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
const renderTooltipContent = () => {
|
|
68
|
-
const protocols = ['ssh', 'telnet', 'rdp', 'vnc', 'serial', 'spice', 'electerm']
|
|
68
|
+
const protocols = ['ssh', 'telnet', 'rdp', 'vnc', 'serial', 'spice', 'electerm', 'ftp']
|
|
69
69
|
const tip = `Register electerm to handle protocol URLs (${protocols.join('://, ')})`
|
|
70
70
|
|
|
71
71
|
return (
|
|
@@ -3,7 +3,6 @@ import { Button, Space } from 'antd'
|
|
|
3
3
|
import { ArrowRightOutlined, ThunderboltOutlined } from '@ant-design/icons'
|
|
4
4
|
import message from '../common/message'
|
|
5
5
|
import InputAutoFocus from '../common/input-auto-focus'
|
|
6
|
-
import newTerminal from '../../common/new-terminal'
|
|
7
6
|
import HelpIcon from '../common/help-icon'
|
|
8
7
|
|
|
9
8
|
const e = window.translate
|
|
@@ -17,7 +16,6 @@ function connectWithOptions (opts, batch) {
|
|
|
17
16
|
const { store } = window
|
|
18
17
|
const tabOptions = {
|
|
19
18
|
...opts,
|
|
20
|
-
...newTerminal(),
|
|
21
19
|
from: 'quickConnect',
|
|
22
20
|
batch
|
|
23
21
|
}
|
|
@@ -61,7 +59,6 @@ export default function QuickConnect ({ batch, inputOnly }) {
|
|
|
61
59
|
}
|
|
62
60
|
|
|
63
61
|
const opts = window.store.parseQuickConnect(inputValue)
|
|
64
|
-
console.log('quick connect opts', opts)
|
|
65
62
|
if (!opts) {
|
|
66
63
|
return message.error('Format error, please check the input', 10)
|
|
67
64
|
}
|
|
@@ -220,7 +220,7 @@ export default (Store) => {
|
|
|
220
220
|
Store.prototype.checkPendingDeepLink = async function () {
|
|
221
221
|
const pending = await window.pre.runGlobalAsync('getPendingDeepLink')
|
|
222
222
|
if (pending) {
|
|
223
|
-
|
|
223
|
+
window.store.addTab(pending)
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
Store.prototype.parseQuickConnect = function (url) {
|
package/client/store/tab.js
CHANGED
|
@@ -341,6 +341,15 @@ export default Store => {
|
|
|
341
341
|
const { tabs } = store
|
|
342
342
|
newTab.tabCount = store.nextTabCount()
|
|
343
343
|
newTab.batch = batch ?? newTab.batch ?? window.openTabBatch ?? window.store.currentLayoutBatch
|
|
344
|
+
if (!newTab.id) {
|
|
345
|
+
newTab.id = generate()
|
|
346
|
+
}
|
|
347
|
+
if (!newTab.status) {
|
|
348
|
+
newTab.status = statusMap.processing
|
|
349
|
+
}
|
|
350
|
+
if (!newTab.pane) {
|
|
351
|
+
newTab.pane = paneMap.terminal
|
|
352
|
+
}
|
|
344
353
|
if (typeof index === 'number' && index >= 0 && index <= tabs.length) {
|
|
345
354
|
tabs.splice(index, 0, newTab)
|
|
346
355
|
} else {
|