@electerm/electerm-react 1.38.11 → 1.38.19
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/components/setting-panel/keywords-form.jsx +2 -1
- package/client/components/setting-panel/setting-terminal.jsx +4 -2
- package/client/components/setting-sync/setting-sync-form.jsx +1 -3
- package/client/components/terminal/index.jsx +2 -2
- package/client/components/terminal/xterm-zmodem.js +3 -3
- package/package.json +1 -1
|
@@ -71,6 +71,7 @@ export default function KeywordForm (props) {
|
|
|
71
71
|
|
|
72
72
|
function renderBefore (name) {
|
|
73
73
|
const colors = ['red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white']
|
|
74
|
+
const { themeConfig } = props
|
|
74
75
|
return (
|
|
75
76
|
<FormItem name={[name, 'color']} noStyle>
|
|
76
77
|
<Select>
|
|
@@ -79,7 +80,7 @@ export default function KeywordForm (props) {
|
|
|
79
80
|
const ps = {
|
|
80
81
|
className: 'color-picker-choose iblock',
|
|
81
82
|
style: {
|
|
82
|
-
backgroundColor: color
|
|
83
|
+
backgroundColor: themeConfig[color]
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
86
|
return (
|
|
@@ -408,13 +408,15 @@ export default class SettingTerminal extends Component {
|
|
|
408
408
|
keywords = [{ color: 'red' }]
|
|
409
409
|
} = this.props.config
|
|
410
410
|
const {
|
|
411
|
-
appPath
|
|
411
|
+
appPath,
|
|
412
|
+
getThemeConfig
|
|
412
413
|
} = this.props.store
|
|
413
414
|
const ps = {
|
|
414
415
|
formData: {
|
|
415
416
|
keywords
|
|
416
417
|
},
|
|
417
|
-
submit: this.handleSubmitKeywords
|
|
418
|
+
submit: this.handleSubmitKeywords,
|
|
419
|
+
themeConfig: getThemeConfig()
|
|
418
420
|
}
|
|
419
421
|
const terminalLogPath = appPath
|
|
420
422
|
? osResolve(appPath, 'electerm', 'session_logs')
|
|
@@ -45,9 +45,7 @@ export default function SyncForm (props) {
|
|
|
45
45
|
if (res.gistId) {
|
|
46
46
|
up[syncType + 'GistId'] = res.gistId
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
up[syncType + 'SyncPassword'] = res.syncPassword
|
|
50
|
-
}
|
|
48
|
+
up[syncType + 'SyncPassword'] = res.syncPassword || ''
|
|
51
49
|
if (res.apiUrl) {
|
|
52
50
|
up[syncType + 'ApiUrl'] = res.apiUrl
|
|
53
51
|
}
|
|
@@ -613,7 +613,7 @@ class Term extends Component {
|
|
|
613
613
|
title: 'Choose some files to send',
|
|
614
614
|
message: 'Choose some files to send',
|
|
615
615
|
properties
|
|
616
|
-
})
|
|
616
|
+
}).catch(() => false)
|
|
617
617
|
if (!files || !files.length) {
|
|
618
618
|
return this.onZmodemEnd()
|
|
619
619
|
}
|
|
@@ -637,7 +637,7 @@ class Term extends Component {
|
|
|
637
637
|
'treatPackageAsDirectory',
|
|
638
638
|
'dontAddToRecent'
|
|
639
639
|
]
|
|
640
|
-
})
|
|
640
|
+
}).catch(() => false)
|
|
641
641
|
if (!savePaths || !savePaths.length) {
|
|
642
642
|
return false
|
|
643
643
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import zmodem from 'zmodem
|
|
2
|
-
|
|
1
|
+
// import zmodem from 'zmodem-ts/dist/zmodem.mjs'
|
|
2
|
+
import Sentry from 'zmodem-ts/dist/zsentry.js'
|
|
3
3
|
export class AddonZmodem {
|
|
4
4
|
_disposables = []
|
|
5
5
|
|
|
@@ -20,7 +20,7 @@ export class AddonZmodem {
|
|
|
20
20
|
this.socket = ctx.socket
|
|
21
21
|
this.term = ctx.term
|
|
22
22
|
this.ctx = ctx
|
|
23
|
-
this.zsentry = new
|
|
23
|
+
this.zsentry = new Sentry({
|
|
24
24
|
to_terminal: (octets) => {
|
|
25
25
|
if (ctx.onZmodem) {
|
|
26
26
|
this.term.write(String.fromCharCode.apply(String, octets))
|