@electerm/electerm-react 2.1.16 → 2.2.0
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/bookmark-form/common/fields.jsx +1 -1
- package/client/components/bookmark-form/common/init-values.js +10 -1
- package/client/components/bookmark-form/common/terminal-background.jsx +11 -2
- package/client/components/bookmark-form/config/ftp.js +3 -2
- package/client/components/bookmark-form/config/local.js +8 -2
- package/client/components/bookmark-form/config/rdp.js +3 -2
- package/client/components/bookmark-form/config/ssh.js +3 -2
- package/client/components/bookmark-form/config/telnet.js +8 -2
- package/client/components/bookmark-form/config/vnc.js +3 -2
- package/client/components/bookmark-form/form-renderer.jsx +5 -3
- package/client/components/common/animate-text.jsx +1 -2
- package/client/components/profile/profile-form-elem.jsx +22 -3
- package/client/components/profile/profile-tabs.jsx +33 -20
- package/client/components/setting-panel/setting-common.jsx +1 -1
- package/client/components/setting-panel/terminal-bg-config.jsx +21 -9
- package/client/components/sftp/address-bar.jsx +0 -1
- package/client/components/sftp/file-icon.jsx +1 -1
- package/client/components/sftp/sftp-entry.jsx +0 -1
- package/client/components/sidebar/index.jsx +1 -1
- package/client/components/sidebar/sidebar.styl +0 -38
- package/client/components/sidebar/transfer-list.jsx +7 -5
- package/client/components/ssh-config/ssh-config-load-notify.jsx +2 -1
- package/client/components/terminal/command-tracker-addon.js +6 -0
- package/client/store/common.js +9 -0
- package/client/store/store.js +6 -0
- package/package.json +1 -1
- package/client/components/common/animate-text.styl +0 -39
|
@@ -145,7 +145,7 @@ export function renderFormItem (item, formItemLayout, form, ctxProps, index) {
|
|
|
145
145
|
/>
|
|
146
146
|
)
|
|
147
147
|
case 'terminalBackground':
|
|
148
|
-
return <TerminalBackgroundField key={name}
|
|
148
|
+
return <TerminalBackgroundField key={name} />
|
|
149
149
|
case 'profileItem':
|
|
150
150
|
return <ProfileItem key={name} store={ctxProps.store} profileFilter={item.profileFilter} />
|
|
151
151
|
case 'quickCommands':
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Common utilities for config initValues
|
|
3
3
|
*/
|
|
4
|
-
import { newBookmarkIdPrefix } from '../../../common/constants.js'
|
|
4
|
+
import { newBookmarkIdPrefix, authTypeMap } from '../../../common/constants.js'
|
|
5
5
|
import { getColorFromCategory } from '../../../common/get-category-color.js'
|
|
6
6
|
import findBookmarkGroupId from '../../../common/find-bookmark-group-id.js'
|
|
7
7
|
import deepCopy from 'json-deep-copy'
|
|
@@ -81,3 +81,12 @@ export function getTerminalBackgroundDefaults (defaultSetting) {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
|
|
85
|
+
export function getAuthTypeDefault (props) {
|
|
86
|
+
const r = {}
|
|
87
|
+
if (window.store.defaultProfileId) {
|
|
88
|
+
r.profile = window.store.defaultProfileId
|
|
89
|
+
r.authType = authTypeMap.profiles
|
|
90
|
+
}
|
|
91
|
+
return r
|
|
92
|
+
}
|
|
@@ -11,7 +11,7 @@ const FormItem = Form.Item
|
|
|
11
11
|
const e = window.translate
|
|
12
12
|
|
|
13
13
|
// Custom form control that implements the antd form control interface
|
|
14
|
-
const TerminalBgControl = ({ value
|
|
14
|
+
const TerminalBgControl = ({ value, onChange }) => {
|
|
15
15
|
const handleChange = (newValue, name) => {
|
|
16
16
|
const updatedValue = {
|
|
17
17
|
...value,
|
|
@@ -20,16 +20,25 @@ const TerminalBgControl = ({ value = {}, onChange }) => {
|
|
|
20
20
|
onChange(updatedValue)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
const handleBatchUpdate = (updates) => {
|
|
24
|
+
const updatedValue = {
|
|
25
|
+
...value,
|
|
26
|
+
...updates
|
|
27
|
+
}
|
|
28
|
+
onChange(updatedValue)
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
return (
|
|
24
32
|
<TerminalBackgroundConfig
|
|
25
33
|
config={value}
|
|
26
34
|
onChangeValue={handleChange}
|
|
35
|
+
batchUpdate={handleBatchUpdate}
|
|
27
36
|
name='terminalBackgroundImagePath'
|
|
28
37
|
/>
|
|
29
38
|
)
|
|
30
39
|
}
|
|
31
40
|
|
|
32
|
-
export default function renderTermBg (
|
|
41
|
+
export default function renderTermBg () {
|
|
33
42
|
const formProps = {
|
|
34
43
|
...formItemLayout,
|
|
35
44
|
name: 'terminalBackground',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formItemLayout } from '../../../common/form-layout.js'
|
|
2
2
|
import { terminalFtpType } from '../../../common/constants.js'
|
|
3
|
-
import { createBaseInitValues } from '../common/init-values.js'
|
|
3
|
+
import { createBaseInitValues, getAuthTypeDefault } from '../common/init-values.js'
|
|
4
4
|
import { commonFields } from './common-fields.js'
|
|
5
5
|
import { isEmpty } from 'lodash-es'
|
|
6
6
|
|
|
@@ -14,7 +14,8 @@ const ftpConfig = {
|
|
|
14
14
|
port: 21,
|
|
15
15
|
user: '',
|
|
16
16
|
password: '',
|
|
17
|
-
secure: false
|
|
17
|
+
secure: false,
|
|
18
|
+
...getAuthTypeDefault(props)
|
|
18
19
|
})
|
|
19
20
|
},
|
|
20
21
|
layout: formItemLayout,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { formItemLayout } from '../../../common/form-layout.js'
|
|
2
2
|
import { terminalLocalType, terminalTypes } from '../../../common/constants.js'
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
createBaseInitValues,
|
|
5
|
+
getTerminalDefaults,
|
|
6
|
+
getSshDefaults,
|
|
7
|
+
getTerminalBackgroundDefaults
|
|
8
|
+
} from '../common/init-values.js'
|
|
4
9
|
import defaultSettings from '../../../common/default-setting.js'
|
|
5
10
|
import { commonFields } from './common-fields.js'
|
|
6
11
|
|
|
@@ -13,7 +18,8 @@ const localConfig = {
|
|
|
13
18
|
const { store } = props
|
|
14
19
|
return createBaseInitValues(props, terminalLocalType, {
|
|
15
20
|
...getTerminalDefaults(store),
|
|
16
|
-
...getSshDefaults()
|
|
21
|
+
...getSshDefaults(),
|
|
22
|
+
...getTerminalBackgroundDefaults(defaultSettings)
|
|
17
23
|
})
|
|
18
24
|
},
|
|
19
25
|
layout: formItemLayout,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formItemLayout } from '../../../common/form-layout.js'
|
|
2
2
|
import { terminalRdpType } from '../../../common/constants.js'
|
|
3
|
-
import { createBaseInitValues } from '../common/init-values.js'
|
|
3
|
+
import { createBaseInitValues, getAuthTypeDefault } from '../common/init-values.js'
|
|
4
4
|
import { isEmpty } from 'lodash-es'
|
|
5
5
|
import { commonFields } from './common-fields.js'
|
|
6
6
|
|
|
@@ -11,7 +11,8 @@ const rdpConfig = {
|
|
|
11
11
|
type: terminalRdpType,
|
|
12
12
|
initValues: (props) => {
|
|
13
13
|
return createBaseInitValues(props, terminalRdpType, {
|
|
14
|
-
port: 3389
|
|
14
|
+
port: 3389,
|
|
15
|
+
...getAuthTypeDefault(props)
|
|
15
16
|
})
|
|
16
17
|
},
|
|
17
18
|
layout: formItemLayout,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { formItemLayout } from '../../../common/form-layout.js'
|
|
3
3
|
import { connectionMap, authTypeMap, defaultEnvLang } from '../../../common/constants.js'
|
|
4
4
|
import defaultSetting from '../../../common/default-setting.js'
|
|
5
|
-
import { createBaseInitValues, getTerminalDefaults, getSshDefaults, getTerminalBackgroundDefaults } from '../common/init-values.js'
|
|
5
|
+
import { createBaseInitValues, getTerminalDefaults, getSshDefaults, getTerminalBackgroundDefaults, getAuthTypeDefault } from '../common/init-values.js'
|
|
6
6
|
import { sshAuthFields, sshSettings, quickCommandsTab, sshTunnelTab, connectionHoppingTab } from './common-fields.js'
|
|
7
7
|
|
|
8
8
|
const e = window.translate
|
|
@@ -24,7 +24,8 @@ const sshConfig = {
|
|
|
24
24
|
cipher: [],
|
|
25
25
|
...getTerminalDefaults(store),
|
|
26
26
|
...getSshDefaults(),
|
|
27
|
-
...getTerminalBackgroundDefaults(defaultSetting)
|
|
27
|
+
...getTerminalBackgroundDefaults(defaultSetting),
|
|
28
|
+
...getAuthTypeDefault(props)
|
|
28
29
|
})
|
|
29
30
|
},
|
|
30
31
|
layout: formItemLayout,
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { formItemLayout } from '../../../common/form-layout.js'
|
|
2
2
|
import { terminalTelnetType, authTypeMap } from '../../../common/constants.js'
|
|
3
3
|
import defaultSettings from '../../../common/default-setting.js'
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
createBaseInitValues,
|
|
6
|
+
getSshDefaults,
|
|
7
|
+
getTerminalBackgroundDefaults,
|
|
8
|
+
getAuthTypeDefault
|
|
9
|
+
} from '../common/init-values.js'
|
|
5
10
|
import { telnetAuthFields, terminalSettings, quickCommandsTab } from './common-fields.js'
|
|
6
11
|
|
|
7
12
|
const e = window.translate
|
|
@@ -18,7 +23,8 @@ const telnetConfig = {
|
|
|
18
23
|
authType: authTypeMap.password,
|
|
19
24
|
term: defaultSettings.terminalType,
|
|
20
25
|
...getSshDefaults(),
|
|
21
|
-
...getTerminalBackgroundDefaults(defaultSettings)
|
|
26
|
+
...getTerminalBackgroundDefaults(defaultSettings),
|
|
27
|
+
...getAuthTypeDefault(props)
|
|
22
28
|
})
|
|
23
29
|
},
|
|
24
30
|
layout: formItemLayout,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { formItemLayout } from '../../../common/form-layout.js'
|
|
2
2
|
import { terminalVncType } from '../../../common/constants.js'
|
|
3
|
-
import { createBaseInitValues } from '../common/init-values.js'
|
|
3
|
+
import { createBaseInitValues, getAuthTypeDefault } from '../common/init-values.js'
|
|
4
4
|
import { isEmpty } from 'lodash-es'
|
|
5
5
|
import { commonFields, connectionHoppingTab } from './common-fields.js'
|
|
6
6
|
|
|
@@ -14,7 +14,8 @@ const vncConfig = {
|
|
|
14
14
|
port: 5900,
|
|
15
15
|
viewOnly: false,
|
|
16
16
|
scaleViewport: true,
|
|
17
|
-
connectionHoppings: []
|
|
17
|
+
connectionHoppings: [],
|
|
18
|
+
...getAuthTypeDefault(props)
|
|
18
19
|
})
|
|
19
20
|
},
|
|
20
21
|
layout: formItemLayout,
|
|
@@ -22,9 +22,10 @@ import { isValidIP } from '../../common/is-ip'
|
|
|
22
22
|
import { action as manateAction } from 'manate'
|
|
23
23
|
|
|
24
24
|
export default function FormRenderer ({ config, props }) {
|
|
25
|
+
const initialValues = config.initValues(props)
|
|
25
26
|
const [form] = Form.useForm()
|
|
26
27
|
const [ips, setIps] = useState([])
|
|
27
|
-
const [authType, setAuthType] = useState(
|
|
28
|
+
const [authType, setAuthType] = useState(initialValues.authType || authTypeMap.password)
|
|
28
29
|
const [testing, setTesting] = useState(false)
|
|
29
30
|
const action = useRef('submit')
|
|
30
31
|
|
|
@@ -156,6 +157,9 @@ export default function FormRenderer ({ config, props }) {
|
|
|
156
157
|
...props.formData,
|
|
157
158
|
...res
|
|
158
159
|
}
|
|
160
|
+
if (!obj.terminalBackground?.terminalBackgroundImagePath) {
|
|
161
|
+
delete obj.terminalBackground
|
|
162
|
+
}
|
|
159
163
|
if (isTest) {
|
|
160
164
|
return test(obj)
|
|
161
165
|
}
|
|
@@ -266,7 +270,6 @@ export default function FormRenderer ({ config, props }) {
|
|
|
266
270
|
setAuthType(newAuthType)
|
|
267
271
|
}
|
|
268
272
|
|
|
269
|
-
// Context props for specialized components
|
|
270
273
|
const ctxProps = {
|
|
271
274
|
...props,
|
|
272
275
|
form,
|
|
@@ -282,7 +285,6 @@ export default function FormRenderer ({ config, props }) {
|
|
|
282
285
|
useIp
|
|
283
286
|
}
|
|
284
287
|
|
|
285
|
-
const initialValues = config.initValues(props)
|
|
286
288
|
const tabs = typeof config.tabs === 'function' ? (config.tabs() || []) : (config.tabs || [])
|
|
287
289
|
let content = null
|
|
288
290
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import React from 'react'
|
|
6
|
-
import './animate-text.styl'
|
|
7
6
|
|
|
8
7
|
export default class AnimateText extends React.PureComponent {
|
|
9
8
|
constructor (props) {
|
|
@@ -13,7 +12,7 @@ export default class AnimateText extends React.PureComponent {
|
|
|
13
12
|
|
|
14
13
|
componentDidUpdate () {
|
|
15
14
|
const dom = this.textRef.current
|
|
16
|
-
dom.className = (this.props.className || 'animate-text-wrap')
|
|
15
|
+
dom.className = (this.props.className || 'animate-text-wrap')
|
|
17
16
|
this.timer = setTimeout(() => {
|
|
18
17
|
if (dom) {
|
|
19
18
|
dom.className = this.props.className || 'animate-text-wrap'
|
|
@@ -2,14 +2,16 @@ import { useState } from 'react'
|
|
|
2
2
|
import {
|
|
3
3
|
Form,
|
|
4
4
|
message,
|
|
5
|
+
Switch,
|
|
5
6
|
Button
|
|
6
7
|
} from 'antd'
|
|
7
8
|
import InputAutoFocus from '../common/input-auto-focus'
|
|
8
9
|
import { formItemLayout } from '../../common/form-layout'
|
|
10
|
+
import HelpIcon from '../common/help-icon'
|
|
9
11
|
import {
|
|
10
12
|
settingMap
|
|
11
13
|
} from '../../common/constants'
|
|
12
|
-
|
|
14
|
+
import { action } from 'manate'
|
|
13
15
|
import ProfileTabs from './profile-tabs'
|
|
14
16
|
|
|
15
17
|
const FormItem = Form.Item
|
|
@@ -28,13 +30,15 @@ export default function ProfileFormElem (props) {
|
|
|
28
30
|
}
|
|
29
31
|
return id
|
|
30
32
|
}
|
|
31
|
-
async function
|
|
33
|
+
const handleSubmit = action(async function (res) {
|
|
32
34
|
const { formData } = props
|
|
33
35
|
const update1 = {
|
|
34
36
|
...res,
|
|
35
37
|
id: genId()
|
|
36
38
|
}
|
|
39
|
+
let defaultId = update1.id
|
|
37
40
|
if (formData.id) {
|
|
41
|
+
defaultId = formData.id
|
|
38
42
|
props.store.editItem(formData.id, res, settingMap.profiles)
|
|
39
43
|
} else {
|
|
40
44
|
props.store.addItem(update1, settingMap.profiles)
|
|
@@ -43,14 +47,21 @@ export default function ProfileFormElem (props) {
|
|
|
43
47
|
name: e('profile')
|
|
44
48
|
})
|
|
45
49
|
}
|
|
50
|
+
window.store.makeSureProfileDefault(defaultId)
|
|
46
51
|
message.success(e('saved'))
|
|
47
|
-
}
|
|
52
|
+
})
|
|
48
53
|
const tabsProps = {
|
|
49
54
|
activeTab,
|
|
50
55
|
onChangeTab: setActiveTab,
|
|
51
56
|
form,
|
|
52
57
|
store: props.store
|
|
53
58
|
}
|
|
59
|
+
const profileDefaultWikiLink = 'https://github.com/electerm/electerm/wiki/Default-Profile'
|
|
60
|
+
const defaultLabel = (
|
|
61
|
+
<span>
|
|
62
|
+
{e('default')} <HelpIcon link={profileDefaultWikiLink} />
|
|
63
|
+
</span>
|
|
64
|
+
)
|
|
54
65
|
return (
|
|
55
66
|
<Form
|
|
56
67
|
form={form}
|
|
@@ -73,6 +84,14 @@ export default function ProfileFormElem (props) {
|
|
|
73
84
|
>
|
|
74
85
|
<InputAutoFocus />
|
|
75
86
|
</FormItem>
|
|
87
|
+
<FormItem
|
|
88
|
+
{...formItemLayout}
|
|
89
|
+
label={defaultLabel}
|
|
90
|
+
name='isDefault'
|
|
91
|
+
valuePropName='checked'
|
|
92
|
+
>
|
|
93
|
+
<Switch />
|
|
94
|
+
</FormItem>
|
|
76
95
|
<ProfileTabs {...tabsProps} />
|
|
77
96
|
<FormItem>
|
|
78
97
|
<Button
|
|
@@ -5,32 +5,45 @@ import ProfileFormVnc from './profile-form-vnc'
|
|
|
5
5
|
import ProfileFormFtp from './profile-form-ftp'
|
|
6
6
|
import ProfileFormTelnet from './profile-form-telnet'
|
|
7
7
|
|
|
8
|
-
const { TabPane } = Tabs
|
|
9
|
-
|
|
10
8
|
export default function ProfileTabs (props) {
|
|
11
9
|
const { activeTab, onChangeTab, form, store } = props
|
|
12
10
|
const tabsProps = {
|
|
13
11
|
activeKey: activeTab,
|
|
14
12
|
onChange: onChangeTab
|
|
15
13
|
}
|
|
14
|
+
const items = [
|
|
15
|
+
{
|
|
16
|
+
label: 'ssh',
|
|
17
|
+
key: 'ssh',
|
|
18
|
+
forceRender: true,
|
|
19
|
+
children: <ProfileFormSsh form={form} store={store} />
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: 'telnet',
|
|
23
|
+
key: 'telnet',
|
|
24
|
+
forceRender: true,
|
|
25
|
+
children: <ProfileFormTelnet form={form} store={store} />
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: 'vnc',
|
|
29
|
+
key: 'vnc',
|
|
30
|
+
forceRender: true,
|
|
31
|
+
children: <ProfileFormVnc />
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
label: 'rdp',
|
|
35
|
+
key: 'rdp',
|
|
36
|
+
forceRender: true,
|
|
37
|
+
children: <ProfileFormRdp />
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: 'ftp',
|
|
41
|
+
key: 'ftp',
|
|
42
|
+
forceRender: true,
|
|
43
|
+
children: <ProfileFormFtp />
|
|
44
|
+
}
|
|
45
|
+
]
|
|
16
46
|
return (
|
|
17
|
-
<Tabs {...tabsProps}
|
|
18
|
-
<TabPane tab='ssh' key='ssh' forceRender>
|
|
19
|
-
<ProfileFormSsh form={form} store={store} />
|
|
20
|
-
</TabPane>
|
|
21
|
-
<TabPane tab='telnet' key='telnet' forceRender>
|
|
22
|
-
<ProfileFormTelnet form={form} store={store} />
|
|
23
|
-
</TabPane>
|
|
24
|
-
<TabPane tab='vnc' key='vnc' forceRender>
|
|
25
|
-
<ProfileFormVnc />
|
|
26
|
-
</TabPane>
|
|
27
|
-
<TabPane tab='rdp' key='rdp' forceRender>
|
|
28
|
-
<ProfileFormRdp />
|
|
29
|
-
</TabPane>
|
|
30
|
-
<TabPane tab='ftp' key='ftp' forceRender>
|
|
31
|
-
<ProfileFormFtp />
|
|
32
|
-
</TabPane>
|
|
33
|
-
</Tabs>
|
|
34
|
-
|
|
47
|
+
<Tabs {...tabsProps} items={items} />
|
|
35
48
|
)
|
|
36
49
|
}
|
|
@@ -20,7 +20,8 @@ export default function TerminalBackgroundConfig ({
|
|
|
20
20
|
onChangeValue,
|
|
21
21
|
name,
|
|
22
22
|
config,
|
|
23
|
-
isGlobal = false
|
|
23
|
+
isGlobal = false,
|
|
24
|
+
batchUpdate
|
|
24
25
|
}) {
|
|
25
26
|
const [showTextModal, setShowTextModal] = useState(false)
|
|
26
27
|
const value = config[name]
|
|
@@ -71,7 +72,7 @@ export default function TerminalBackgroundConfig ({
|
|
|
71
72
|
// Show helpful text when text background is selected but no text is configured
|
|
72
73
|
dataSource[2] = {
|
|
73
74
|
value: textTerminalBgValue,
|
|
74
|
-
desc:
|
|
75
|
+
desc: '📝 Click to configure text'
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
|
|
@@ -93,12 +94,24 @@ export default function TerminalBackgroundConfig ({
|
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
const handleTextBgModalOk = (textConfig) => {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
if (batchUpdate) {
|
|
98
|
+
// Use batch update if available
|
|
99
|
+
const updates = {
|
|
100
|
+
terminalBackgroundText: textConfig.text,
|
|
101
|
+
terminalBackgroundTextSize: textConfig.fontSize,
|
|
102
|
+
terminalBackgroundTextColor: textConfig.color,
|
|
103
|
+
terminalBackgroundTextFontFamily: textConfig.fontFamily,
|
|
104
|
+
[name]: textTerminalBgValue
|
|
105
|
+
}
|
|
106
|
+
batchUpdate(updates)
|
|
107
|
+
} else {
|
|
108
|
+
// Fall back to sequential updates
|
|
109
|
+
onChangeValue(textConfig.text, 'terminalBackgroundText')
|
|
110
|
+
onChangeValue(textConfig.fontSize, 'terminalBackgroundTextSize')
|
|
111
|
+
onChangeValue(textConfig.color, 'terminalBackgroundTextColor')
|
|
112
|
+
onChangeValue(textConfig.fontFamily, 'terminalBackgroundTextFontFamily')
|
|
113
|
+
onChange(textTerminalBgValue)
|
|
114
|
+
}
|
|
102
115
|
setShowTextModal(false)
|
|
103
116
|
}
|
|
104
117
|
|
|
@@ -204,7 +217,6 @@ export default function TerminalBackgroundConfig ({
|
|
|
204
217
|
label: item.desc
|
|
205
218
|
}
|
|
206
219
|
}
|
|
207
|
-
|
|
208
220
|
return (
|
|
209
221
|
<div className='pd2b'>
|
|
210
222
|
<div className='pd1b'>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* file/folder icon by ext or name
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { getIconForFile, getIconForFolder } from '
|
|
5
|
+
import { getIconForFile, getIconForFolder } from 'electerm-icons'
|
|
6
6
|
// import Icon from '@ant-design/icons'
|
|
7
7
|
|
|
8
8
|
export default function FileIcon ({ file, ...extra }) {
|
|
@@ -189,7 +189,7 @@ export default memo(function Sidebar (props) {
|
|
|
189
189
|
className='control-icon-wrap'
|
|
190
190
|
>
|
|
191
191
|
<UpCircleOutlined
|
|
192
|
-
className='iblock font18 control-icon
|
|
192
|
+
className='iblock font18 control-icon upgrade-icon'
|
|
193
193
|
onClick={handleShowUpgrade}
|
|
194
194
|
/>
|
|
195
195
|
</div>
|
|
@@ -95,44 +95,6 @@
|
|
|
95
95
|
&:hover
|
|
96
96
|
color text-light
|
|
97
97
|
|
|
98
|
-
// Hover.css (http://ianlunn.github.io/Hover/)
|
|
99
|
-
// Version: 2.3.2
|
|
100
|
-
// Author: Ian Lunn @IanLunn
|
|
101
|
-
// Author URL: http://ianlunn.co.uk/
|
|
102
|
-
// Github: https://github.com/IanLunn/Hover
|
|
103
|
-
// Hover.css Copyright Ian Lunn 2017. Generated with Sass.
|
|
104
|
-
|
|
105
|
-
// Bob
|
|
106
|
-
@keyframes hvr-bob
|
|
107
|
-
0%
|
|
108
|
-
transform translateY(-8px)
|
|
109
|
-
|
|
110
|
-
50%
|
|
111
|
-
transform translateY(-4px)
|
|
112
|
-
|
|
113
|
-
100%
|
|
114
|
-
transform translateY(-8px)
|
|
115
|
-
|
|
116
|
-
@keyframes hvr-bob-float
|
|
117
|
-
100%
|
|
118
|
-
transform translateY(-8px)
|
|
119
|
-
|
|
120
|
-
.hvr-bob
|
|
121
|
-
transform perspective(1px) translateZ(0)
|
|
122
|
-
box-shadow 0 0 1px rgba(0, 0, 0, 0)
|
|
123
|
-
animation-name hvr-bob-float, hvr-bob
|
|
124
|
-
animation-duration .3s, 1.5s
|
|
125
|
-
animation-delay 0s, .3s
|
|
126
|
-
animation-timing-function ease-out, ease-in-out
|
|
127
|
-
animation-iteration-count 1, infinite
|
|
128
|
-
animation-fill-mode forwards
|
|
129
|
-
animation-direction normal, alternate
|
|
130
|
-
|
|
131
|
-
.hvr-bob-fast
|
|
132
|
-
transform perspective(2px) translateZ(0)
|
|
133
|
-
animation-duration .15s, .3s
|
|
134
|
-
animation-delay 0s, .15s
|
|
135
|
-
|
|
136
98
|
.btns .upgrade-icon
|
|
137
99
|
color success
|
|
138
100
|
.close-info-modal
|
|
@@ -23,7 +23,6 @@ export default memo(function TransferList (props) {
|
|
|
23
23
|
}
|
|
24
24
|
const color = fileTransfers.some(item => item.error) ? 'red' : 'green'
|
|
25
25
|
const bdProps = {
|
|
26
|
-
className: len ? 'hvr-bob hvr-bob-fast' : '',
|
|
27
26
|
count: len,
|
|
28
27
|
size: 'small',
|
|
29
28
|
offset: [-10, -5],
|
|
@@ -35,16 +34,19 @@ export default memo(function TransferList (props) {
|
|
|
35
34
|
transferHistory,
|
|
36
35
|
transferTab
|
|
37
36
|
}
|
|
37
|
+
const popProps = {
|
|
38
|
+
placement: 'right',
|
|
39
|
+
destroyOnHidden: true,
|
|
40
|
+
overlayClassName: 'transfer-list-card',
|
|
41
|
+
content: <TransferModal {...transferModalProps} />
|
|
42
|
+
}
|
|
38
43
|
return (
|
|
39
44
|
<div
|
|
40
45
|
className='control-icon-wrap'
|
|
41
46
|
title={e('fileTransfers')}
|
|
42
47
|
>
|
|
43
48
|
<Popover
|
|
44
|
-
|
|
45
|
-
destroyTooltipOnHide
|
|
46
|
-
overlayClassName='transfer-list-card'
|
|
47
|
-
content={<TransferModal {...transferModalProps} />}
|
|
49
|
+
{...popProps}
|
|
48
50
|
>
|
|
49
51
|
<Badge
|
|
50
52
|
{...bdProps}
|
|
@@ -49,7 +49,8 @@ export default function SshConfigLoadNotify (props) {
|
|
|
49
49
|
ignoreSshConfig !== 'yes' &&
|
|
50
50
|
settingTab === 'bookmarks' &&
|
|
51
51
|
showModal &&
|
|
52
|
-
sshConfigLoaded !== 'yes'
|
|
52
|
+
sshConfigLoaded !== 'yes' &&
|
|
53
|
+
window.store.hasNodePty
|
|
53
54
|
|
|
54
55
|
if (shouldShow) {
|
|
55
56
|
showNotification()
|
package/client/store/common.js
CHANGED
|
@@ -313,6 +313,15 @@ export default Store => {
|
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
+
Store.prototype.makeSureProfileDefault = function (defaultId) {
|
|
317
|
+
const { profiles } = window.store
|
|
318
|
+
for (const p of profiles) {
|
|
319
|
+
if (p.id !== defaultId) {
|
|
320
|
+
delete p.isDefault
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
316
325
|
Store.prototype.aiConfigMissing = function () {
|
|
317
326
|
return aiConfigsArr.slice(0, -1).some(k => !window.store.config[k])
|
|
318
327
|
}
|
package/client/store/store.js
CHANGED
|
@@ -122,6 +122,12 @@ class Store {
|
|
|
122
122
|
currentTab.pane === paneMap.terminal
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
get defaultProfileId () {
|
|
126
|
+
const { profiles } = window.store
|
|
127
|
+
const defaultProfile = profiles.find(p => p.isDefault)
|
|
128
|
+
return defaultProfile?.id || ''
|
|
129
|
+
}
|
|
130
|
+
|
|
125
131
|
get quickCommandTags () {
|
|
126
132
|
const { quickCommands } = window.store
|
|
127
133
|
return uniq(
|
package/package.json
CHANGED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// animate.css -http://daneden.me/animate
|
|
2
|
-
// Version - 3.5.2
|
|
3
|
-
// Licensed under the MIT license - http://opensource.org/licenses/MIT
|
|
4
|
-
// Copyright (c) 2017 Daniel Eden
|
|
5
|
-
|
|
6
|
-
.animated
|
|
7
|
-
animation-duration 1s
|
|
8
|
-
animation-fill-mode both
|
|
9
|
-
|
|
10
|
-
.animated.bounceIn
|
|
11
|
-
animation-duration .45s
|
|
12
|
-
|
|
13
|
-
@keyframes bounceIn
|
|
14
|
-
from, 20%, 40%, 60%, 80%, to
|
|
15
|
-
animation-timing-function cubic-bezier(0.215, 0.610, 0.355, 1.000)
|
|
16
|
-
|
|
17
|
-
0%
|
|
18
|
-
opacity 0
|
|
19
|
-
transform scale3d(.3, .3, .3)
|
|
20
|
-
|
|
21
|
-
20%
|
|
22
|
-
transform scale3d(1.1, 1.1, 1.1)
|
|
23
|
-
|
|
24
|
-
40%
|
|
25
|
-
transform scale3d(.9, .9, .9)
|
|
26
|
-
|
|
27
|
-
60%
|
|
28
|
-
opacity 1
|
|
29
|
-
transform scale3d(1.03, 1.03, 1.03)
|
|
30
|
-
|
|
31
|
-
80%
|
|
32
|
-
transform scale3d(.97, .97, .97)
|
|
33
|
-
|
|
34
|
-
to
|
|
35
|
-
opacity 1
|
|
36
|
-
transform scale3d(1, 1, 1)
|
|
37
|
-
|
|
38
|
-
.bounceIn
|
|
39
|
-
animation-name bounceIn
|