@electerm/electerm-react 5.1.16 → 5.1.21

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.
@@ -127,10 +127,12 @@ export default class BatchInput extends Component {
127
127
  }
128
128
  // Desktop: an input-shaped, read-only affordance. It is NOT a real input —
129
129
  // clicking it expands the panel where the user actually types.
130
+ // Borderless so it blends into the footer background.
130
131
  return (
131
132
  <Input
132
133
  size='small'
133
134
  readOnly
135
+ variant='borderless'
134
136
  placeholder={e('batchInput')}
135
137
  className='batch-input-holder'
136
138
  style={{ cursor: 'pointer' }}
@@ -96,6 +96,7 @@ export default auto(function FooterEntry (props) {
96
96
  defaultValue: props.store.currentTab?.encode,
97
97
  onSelect: handleSwitchEncoding,
98
98
  size: 'small',
99
+ variant: 'borderless',
99
100
  popupMatchSelectWidth: false
100
101
  }
101
102
  if (props.store.isMobile) {
@@ -35,3 +35,16 @@
35
35
  top 10px !important
36
36
  right 10px !important
37
37
  bottom 10px !important
38
+
39
+ // while the touch shortcut bar (portaled to body, z-index 800 — see
40
+ // shortcut-bar.styl) is shown, shrink the fullscreen session by the bar
41
+ // height so the terminal is not covered. body.shortcut-bar-on is toggled by
42
+ // shortcut-bar.jsx; the extra body class gives this rule higher specificity
43
+ // (0,4,0) than the .fullscreen rules above, so it wins the !important battle.
44
+ body.shortcut-bar-on
45
+ .fullscreen
46
+ .session-wrap.session-current
47
+ bottom var(--shortcut-bar-h, 44px) !important
48
+ height auto !important
49
+ .term-wrap
50
+ height calc(100% - var(--shortcut-bar-h, 44px)) !important
@@ -126,7 +126,7 @@ export default auto(function InfoModal (props) {
126
126
  // description,
127
127
  devDependencies,
128
128
  dependencies,
129
- langugeRepo,
129
+ languageRepo,
130
130
  author: {
131
131
  name: authorName,
132
132
  email,
@@ -193,8 +193,8 @@ export default auto(function InfoModal (props) {
193
193
  </p>
194
194
  <p className='mg1b'>
195
195
  <GlobalOutlined /> <b className='mg1r'>{e('language')} repo ➾</b>
196
- <Link to={langugeRepo} className='mg1l'>
197
- {langugeRepo}
196
+ <Link to={languageRepo} className='mg1l'>
197
+ {languageRepo}
198
198
  </Link>
199
199
  </p>
200
200
  <p className='mg1b'>
@@ -216,8 +216,15 @@ export default class AttachAddonCustom {
216
216
  let str = data
217
217
  if (typeof data !== 'string') {
218
218
  try {
219
+ // Decode in streaming mode: slow SSH servers (e.g. embedded router
220
+ // CLIs) often deliver a multi-byte UTF-8 char (CJK = 3 bytes) split
221
+ // across TCP segments, and the server-side idle fast path may forward
222
+ // the first segment immediately. Without { stream: true } the decoder
223
+ // would turn each partial fragment into U+FFFD instead of carrying the
224
+ // trailing bytes over to the next chunk and reassembling the char.
219
225
  str = this.decoder.decode(
220
- data instanceof ArrayBuffer ? data : new Uint8Array(data)
226
+ data instanceof ArrayBuffer ? data : new Uint8Array(data),
227
+ { stream: true }
221
228
  )
222
229
  } catch (e) {
223
230
  str = ''
@@ -435,6 +442,9 @@ export default class AttachAddonCustom {
435
442
  this._flushScheduled = false
436
443
  this._writeBuffer = []
437
444
  this._bufferBytes = 0
445
+ // Reset the streaming decoder so any partial multi-byte sequence held
446
+ // over from this connection can not leak into a reused instance.
447
+ this.decoder = new TextDecoder('utf-8')
438
448
  this.term = null
439
449
  this._disposables.forEach(d => d.dispose())
440
450
  this._disposables.length = 0
@@ -9,7 +9,7 @@
9
9
  right 0
10
10
  bottom 0
11
11
  height var(--shortcut-bar-h, 44px)
12
- z-index 400
12
+ z-index 800
13
13
  display flex
14
14
  align-items stretch
15
15
  background var(--main)
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "5.1.16",
3
+ "version": "5.1.21",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",
7
- "langugeRepo": "https://github.com/electerm/electerm-locales",
7
+ "languageRepo": "https://github.com/electerm/electerm-locales",
8
8
  "privacyNoticeLink": "https://github.com/electerm/electerm/wiki/privacy-notice",
9
9
  "knownIssuesLink": "https://github.com/electerm/electerm/wiki/Know-issues",
10
10
  "sponsorLink": "https://electerm.org/sponsor-electerm.html",