@electerm/electerm-react 1.37.58 → 1.37.60
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/create-title.js +4 -1
- package/client/components/quick-commands/quick-commands-list.jsx +3 -0
- package/client/components/sidebar/side-panel.jsx +15 -6
- package/client/components/sidebar/sidebar.styl +3 -5
- package/client/components/terminal-info/content.jsx +6 -2
- package/client/components/terminal-info/terminal-info.styl +4 -1
- package/client/store/load-data.js +1 -1
- package/client/store/watch.js +2 -2
- package/package.json +1 -1
|
@@ -3,8 +3,8 @@ export default class SidePanel extends PureComponent {
|
|
|
3
3
|
handleMousedown = (e) => {
|
|
4
4
|
this.dragStart = true
|
|
5
5
|
this.clientX = e.clientX
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
window.addEventListener('mouseup', this.handleMouseup)
|
|
7
|
+
window.addEventListener('mousemove', this.handleMousemove)
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
handleMouseup = (e) => {
|
|
@@ -12,15 +12,15 @@ export default class SidePanel extends PureComponent {
|
|
|
12
12
|
const {
|
|
13
13
|
clientX
|
|
14
14
|
} = e
|
|
15
|
-
let nw = clientX - this.clientX +
|
|
15
|
+
let nw = clientX - this.clientX + this.props.leftSidebarWidth
|
|
16
16
|
if (nw < 343) {
|
|
17
17
|
nw = 343
|
|
18
18
|
} else if (nw > 600) {
|
|
19
19
|
nw = 600
|
|
20
20
|
}
|
|
21
21
|
this.props.setLeftSidePanelWidth(nw)
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
window.removeEventListener('mouseup', this.handleMouseup)
|
|
23
|
+
window.removeEventListener('mousemove', this.handleMousemove)
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
handleMousemove = (e) => {
|
|
@@ -28,8 +28,17 @@ export default class SidePanel extends PureComponent {
|
|
|
28
28
|
clientX
|
|
29
29
|
} = e
|
|
30
30
|
const el = document.getElementById('side-panel')
|
|
31
|
-
|
|
31
|
+
let nw = clientX - this.clientX + this.props.leftSidebarWidth
|
|
32
|
+
if (nw < 343) {
|
|
33
|
+
nw = 343
|
|
34
|
+
} else if (nw > 600) {
|
|
35
|
+
nw = 600
|
|
36
|
+
}
|
|
32
37
|
el.style.width = nw + 'px'
|
|
38
|
+
const el1 = document.querySelector('.sessions')
|
|
39
|
+
if (el1) {
|
|
40
|
+
el1.style.marginLeft = (nw + 43) + 'px'
|
|
41
|
+
}
|
|
33
42
|
}
|
|
34
43
|
|
|
35
44
|
render () {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
z-index 200
|
|
10
10
|
width 0
|
|
11
11
|
overflow-y scroll
|
|
12
|
-
background main
|
|
12
|
+
background main
|
|
13
13
|
color text
|
|
14
14
|
.item-list-unit:hover
|
|
15
15
|
.list-item-remove
|
|
@@ -51,14 +51,12 @@
|
|
|
51
51
|
position absolute
|
|
52
52
|
left 43px
|
|
53
53
|
top 45px
|
|
54
|
-
bottom
|
|
54
|
+
bottom 0
|
|
55
55
|
z-index 200
|
|
56
56
|
width 0
|
|
57
|
-
border-
|
|
57
|
+
border-right 1px solid darken(main, 30%)
|
|
58
58
|
|
|
59
59
|
.pinned
|
|
60
|
-
.sidebar-list
|
|
61
|
-
bottom 0
|
|
62
60
|
.drag-handle
|
|
63
61
|
display block
|
|
64
62
|
.sidebar-panel .pinned
|
|
@@ -67,8 +67,12 @@ export default class TerminalInfoContent extends PureComponent {
|
|
|
67
67
|
clientX
|
|
68
68
|
} = e
|
|
69
69
|
const el = document.getElementById('info-panel-wrap')
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
let nw = this.clientX - clientX + this.props.rightSidebarWidth
|
|
71
|
+
if (nw < 400) {
|
|
72
|
+
nw = 400
|
|
73
|
+
} else if (nw > 1000) {
|
|
74
|
+
nw = 1000
|
|
75
|
+
}
|
|
72
76
|
el.style.width = nw + 'px'
|
|
73
77
|
}
|
|
74
78
|
|
package/client/store/watch.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '../common/constants'
|
|
15
15
|
import postMsg from '../common/post-msg'
|
|
16
16
|
import * as ls from '../common/safe-local-storage'
|
|
17
|
-
import { debounce } from 'lodash-es'
|
|
17
|
+
import { debounce, isEmpty } from 'lodash-es'
|
|
18
18
|
|
|
19
19
|
export default store => {
|
|
20
20
|
autoRun(store, () => {
|
|
@@ -65,7 +65,7 @@ export default store => {
|
|
|
65
65
|
}).start()
|
|
66
66
|
|
|
67
67
|
autoRun(store, () => {
|
|
68
|
-
if (store.config) {
|
|
68
|
+
if (!isEmpty(store.config)) {
|
|
69
69
|
window.pre.runGlobalAsync('saveUserConfig', store.config)
|
|
70
70
|
}
|
|
71
71
|
return store._config
|