@electerm/electerm-react 5.5.6 → 5.5.9
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/default-setting.js +1 -0
- package/client/components/footer/cmd-history.jsx +132 -45
- package/client/components/footer/cmd-history.styl +42 -4
- package/client/components/footer/multi-tab-run-modal.jsx +83 -0
- package/client/components/footer/tab-select.jsx +34 -17
- package/client/components/quick-commands/quick-command-create-modal.jsx +60 -0
- package/client/components/quick-commands/quick-commands-form-elem.jsx +10 -4
- package/client/components/setting-panel/setting-terminal.jsx +1 -0
- package/client/components/sftp/sftp-entry.jsx +4 -0
- package/client/components/sidebar/side-panel.jsx +1 -1
- package/client/components/terminal/mixins/term-content.js +38 -0
- package/client/components/terminal/mixins/term-context-menu.jsx +35 -3
- package/client/components/terminal/mixins/term-socket.js +5 -5
- package/client/components/terminal/mixins/term-touch.js +444 -57
- package/client/components/terminal/shortcut-bar-defs.js +30 -4
- package/client/components/terminal/shortcut-bar-edit.jsx +40 -9
- package/client/components/terminal/shortcut-bar.jsx +13 -4
- package/client/components/terminal/ssh-reload-state.js +41 -1
- package/client/components/terminal/startup-queue.js +67 -13
- package/client/components/terminal/terminal-select-text.jsx +69 -0
- package/client/components/terminal/terminal.jsx +72 -4
- package/client/components/terminal/terminal.styl +61 -0
- package/client/css/mobile.styl +20 -7
- package/client/store/tab.js +5 -4
- package/package.json +1 -1
package/client/css/mobile.styl
CHANGED
|
@@ -170,18 +170,31 @@
|
|
|
170
170
|
.upgrade-panel
|
|
171
171
|
max-width calc(100vw - 20px)
|
|
172
172
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
173
|
+
// ---------------------------------------------------------------------------
|
|
174
|
+
// Terminal touch selection (behaviour in mixins/term-touch.js).
|
|
175
|
+
//
|
|
176
|
+
// Scoped to is-touch-device on top of the narrow-window is-mobile case: a
|
|
177
|
+
// tablet held in landscape is wider than the 600px mobile breakpoint but is
|
|
178
|
+
// still touch-primary and needs the same suppression, while store.isTouchDevice
|
|
179
|
+
// keeps it off for anything mouse-driven (it follows the input in use — see
|
|
180
|
+
// main.jsx).
|
|
181
|
+
//
|
|
182
|
+
// - the browser's native long-press callout (iOS "Copy/Look Up" menu) and its
|
|
183
|
+
// own text-selection gesture would fight xterm for the touch stream and
|
|
184
|
+
// swallow the long press that starts a selection;
|
|
185
|
+
// - xterm already sets user-select:none on .xterm; touch-action:none stops the
|
|
186
|
+
// browser scrolling/zooming the page out from under a selection drag, since
|
|
187
|
+
// xterm does its own scrolling from gesture events.
|
|
188
|
+
// ---------------------------------------------------------------------------
|
|
189
|
+
.is-mobile,
|
|
190
|
+
.is-touch-device
|
|
180
191
|
.term-wrap
|
|
181
192
|
-webkit-touch-callout none
|
|
182
193
|
-webkit-tap-highlight-color transparent
|
|
183
194
|
.xterm
|
|
184
195
|
-webkit-touch-callout none
|
|
196
|
+
-webkit-user-select none
|
|
197
|
+
user-select none
|
|
185
198
|
touch-action none
|
|
186
199
|
|
|
187
200
|
// ---------------------------------------------------------------------------
|
package/client/store/tab.js
CHANGED
|
@@ -17,10 +17,10 @@ import generate from '../common/id-with-stamp'
|
|
|
17
17
|
import uid from '../common/uid'
|
|
18
18
|
import newTerm, { updateCount } from '../common/new-terminal.js'
|
|
19
19
|
import { action } from 'manate'
|
|
20
|
-
import {
|
|
20
|
+
import { shouldCaptureTerminalReloadState } from '../components/terminal/ssh-reload-state.js'
|
|
21
21
|
|
|
22
22
|
function captureSshSessionState (tab, config) {
|
|
23
|
-
return
|
|
23
|
+
return shouldCaptureTerminalReloadState(tab, config)
|
|
24
24
|
? refs.get(`term-${tab.id}`)?.getReloadState?.()
|
|
25
25
|
: undefined
|
|
26
26
|
}
|
|
@@ -103,8 +103,9 @@ export default Store => {
|
|
|
103
103
|
const oldTab = tabs[index]
|
|
104
104
|
const oldBatch = oldTab.batch
|
|
105
105
|
|
|
106
|
-
// Reload state is captured only for
|
|
107
|
-
//
|
|
106
|
+
// Reload state is captured only for a shell terminal refresh/reconnect
|
|
107
|
+
// (ssh, local, telnet, serial). Closing a tab goes through removeTabs
|
|
108
|
+
// and never reaches this code path.
|
|
108
109
|
const reloadState = captureSshSessionState(oldTab, store.config)
|
|
109
110
|
|
|
110
111
|
// Create copy of old tab with new ID
|