@electerm/electerm-react 1.38.86 → 1.39.2

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.
Files changed (31) hide show
  1. package/client/common/constants.js +4 -1
  2. package/client/common/default-setting.js +1 -0
  3. package/client/components/bookmark-form/bookmark-form.styl +8 -3
  4. package/client/components/bookmark-form/form-ssh-common.jsx +23 -13
  5. package/client/components/bookmark-form/index.jsx +6 -2
  6. package/client/components/bookmark-form/rdp-form-ui.jsx +140 -0
  7. package/client/components/bookmark-form/rdp-form.jsx +16 -0
  8. package/client/components/bookmark-form/ssh-form.jsx +5 -8
  9. package/client/components/bookmark-form/web-form-ui.jsx +1 -1
  10. package/client/components/footer/footer-entry.jsx +7 -1
  11. package/client/components/main/main.jsx +3 -0
  12. package/client/components/session/code-scan.js +155 -0
  13. package/client/components/session/rdp-session.jsx +434 -0
  14. package/client/components/session/resolution-edit.jsx +63 -0
  15. package/client/components/session/resolution-form.jsx +134 -0
  16. package/client/components/session/resolutions.js +110 -0
  17. package/client/components/session/session.jsx +40 -5
  18. package/client/components/session/session.styl +4 -1
  19. package/client/components/session/sessions.jsx +1 -0
  20. package/client/components/setting-panel/setting-common.jsx +1 -0
  21. package/client/components/sftp/file-props-modal.jsx +1 -1
  22. package/client/components/sftp/sftp-entry.jsx +2 -1
  23. package/client/entry/rle.js +2 -0
  24. package/client/entry/rle.wasm +0 -0
  25. package/client/store/common.js +5 -0
  26. package/client/store/index.js +2 -1
  27. package/client/store/init-state.js +4 -1
  28. package/client/store/load-data.js +1 -1
  29. package/client/store/watch.js +6 -0
  30. package/client/views/index.pug +4 -0
  31. package/package.json +1 -1
@@ -0,0 +1,110 @@
1
+ export default [
2
+ {
3
+ id: 'res-1024x768',
4
+ width: 1024,
5
+ height: 768,
6
+ readonly: true
7
+ },
8
+ {
9
+ id: 'res-1280x720',
10
+ width: 1280,
11
+ height: 720,
12
+ readonly: true
13
+ },
14
+ {
15
+ id: 'res-1280x800',
16
+ width: 1280,
17
+ height: 800,
18
+ readonly: true
19
+ },
20
+ {
21
+ id: 'res-1280x1024',
22
+ width: 1280,
23
+ height: 1024,
24
+ readonly: true
25
+ },
26
+ {
27
+ id: 'res-1366x768',
28
+ width: 1366,
29
+ height: 768,
30
+ readonly: true
31
+ },
32
+ {
33
+ id: 'res-1440x900',
34
+ width: 1440,
35
+ height: 900,
36
+ readonly: true
37
+ },
38
+ {
39
+ id: 'res-1600x900',
40
+ width: 1600,
41
+ height: 900,
42
+ readonly: true
43
+ },
44
+ {
45
+ id: 'res-1600x1200',
46
+ width: 1600,
47
+ height: 1200,
48
+ readonly: true
49
+ },
50
+ {
51
+ id: 'res-1920x1080',
52
+ width: 1920,
53
+ height: 1080,
54
+ readonly: true
55
+ },
56
+ {
57
+ id: 'res-1920x1200',
58
+ width: 1920,
59
+ height: 1200,
60
+ readonly: true
61
+ },
62
+ {
63
+ id: 'res-1920x1440',
64
+ width: 1920,
65
+ height: 1440,
66
+ readonly: true
67
+ },
68
+ {
69
+ id: 'res-2560x1440',
70
+ width: 2560,
71
+ height: 1440,
72
+ readonly: true
73
+ },
74
+ {
75
+ id: 'res-2560x1600',
76
+ width: 2560,
77
+ height: 1600,
78
+ readonly: true
79
+ },
80
+ {
81
+ id: 'res-2560x1920',
82
+ width: 2560,
83
+ height: 1920,
84
+ readonly: true
85
+ },
86
+ {
87
+ id: 'res-3840x2160',
88
+ width: 3840,
89
+ height: 2160,
90
+ readonly: true
91
+ },
92
+ {
93
+ id: 'res-3840x2400',
94
+ width: 3840,
95
+ height: 2400,
96
+ readonly: true
97
+ },
98
+ {
99
+ id: 'res-5120x2880',
100
+ width: 5120,
101
+ height: 2880,
102
+ readonly: true
103
+ },
104
+ {
105
+ id: 'res-7680x4320',
106
+ width: 7680,
107
+ height: 4320,
108
+ readonly: true
109
+ }
110
+ ]
@@ -4,6 +4,7 @@
4
4
  import { Component } from 'react'
5
5
  import Term from '../terminal'
6
6
  import Sftp from '../sftp/sftp-entry'
7
+ import RdpSession from './rdp-session'
7
8
  import {
8
9
  BorderVerticleOutlined,
9
10
  BorderHorizontalOutlined,
@@ -27,7 +28,8 @@ import {
27
28
  paneMap,
28
29
  footerHeight,
29
30
  terminalActions,
30
- connectionMap
31
+ connectionMap,
32
+ terminalRdpType
31
33
  } from '../../common/constants'
32
34
  import ResizeWrap from '../common/resize-wrap'
33
35
  import safeName from '../../common/safe-name'
@@ -321,8 +323,36 @@ export default class SessionWrapper extends Component {
321
323
  sftpPathFollowSsh
322
324
  } = this.state
323
325
  const {
324
- pane
326
+ pane, type
325
327
  } = this.props.tab
328
+ if (type === terminalRdpType) {
329
+ const rdpProps = {
330
+ tab: this.props.tab,
331
+ sessionId,
332
+ ...pick(this.props, [
333
+ 'resolutions',
334
+ 'height',
335
+ 'width',
336
+ 'tabsHeight',
337
+ 'leftSidebarWidth',
338
+ 'pinned',
339
+ 'openedSideBar',
340
+ 'delTab',
341
+ 'config',
342
+ 'editTab'
343
+ ]),
344
+ ...pick(
345
+ this,
346
+ [
347
+ 'setSessionState'
348
+ ])
349
+ }
350
+ return (
351
+ <RdpSession
352
+ {...rdpProps}
353
+ />
354
+ )
355
+ }
326
356
  const cls = pane === paneMap.terminal
327
357
  ? 'terms-box'
328
358
  : 'terms-box hide'
@@ -393,7 +423,10 @@ export default class SessionWrapper extends Component {
393
423
  sftpPathFollowSsh,
394
424
  cwd
395
425
  } = this.state
396
- const { pane } = this.props.tab
426
+ const { pane, type } = this.props.tab
427
+ if (type === terminalRdpType) {
428
+ return null
429
+ }
397
430
  const height = this.computeHeight()
398
431
  const cls = pane === paneMap.terminal
399
432
  ? 'hide'
@@ -472,8 +505,10 @@ export default class SessionWrapper extends Component {
472
505
  renderControl = () => {
473
506
  const { splitDirection, terminals, sftpPathFollowSsh } = this.state
474
507
  const { props } = this
475
- const { pane, enableSsh } = props.tab
476
-
508
+ const { pane, enableSsh, type } = props.tab
509
+ if (type === terminalRdpType) {
510
+ return null
511
+ }
477
512
  const termType = props.tab?.type
478
513
  const isSsh = props.tab.authType
479
514
  const isLocal = !isSsh && (termType === connectionMap.local || !termType)
@@ -58,4 +58,7 @@
58
58
  padding 50px 0
59
59
  .web-session-wrap
60
60
  height 100vh
61
- background main
61
+ background main
62
+ .rdp-session-wrap
63
+ background main
64
+ overflow scroll
@@ -349,6 +349,7 @@ class Sessions extends Component {
349
349
  currentTabId,
350
350
  tab: toSimpleObj(tab),
351
351
  ...pick(store, [
352
+ 'resolutions',
352
353
  'hideDelKeyTip',
353
354
  'fileOperation',
354
355
  'file',
@@ -636,6 +636,7 @@ export default class SettingCommon extends Component {
636
636
  [
637
637
  'autoRefreshWhenSwitchToSftp',
638
638
  'hideSshConfig',
639
+ 'showHiddenFilesOnSftpStart',
639
640
  'screenReaderMode',
640
641
  'initDefaultTabOnStart',
641
642
  'disableSshHistory',
@@ -116,7 +116,7 @@ export default function FileInfoModal () {
116
116
  }
117
117
  function getSize (str = '') {
118
118
  if (isWin) {
119
- const s = str.split('\n').find(s => s.trim().startsWith('Sum'))
119
+ const s = (str.stdout || '').split('\n').find(s => s.trim().startsWith('Sum'))
120
120
  return s ? filesize(parseInt((s.split(':')[1]).trim(), 10)) : 0
121
121
  } else {
122
122
  return str.split(/\s+/)[0]
@@ -134,6 +134,7 @@ export default class Sftp extends Component {
134
134
  }
135
135
 
136
136
  defaultState = () => {
137
+ const def = this.props.config.showHiddenFilesOnSftpStart
137
138
  return Object.keys(typeMap).reduce((prev, k, i) => {
138
139
  Object.assign(prev, {
139
140
  [`sortProp.${k}`]: window.store.sftpSortSetting[k].prop,
@@ -142,7 +143,7 @@ export default class Sftp extends Component {
142
143
  [`${k}FileTree`]: {},
143
144
  [`${k}Loading`]: false,
144
145
  [`${k}InputFocus`]: false,
145
- [`${k}ShowHiddenFile`]: true,
146
+ [`${k}ShowHiddenFile`]: def,
146
147
  [`${k}Path`]: '',
147
148
  [`${k}PathTemp`]: '',
148
149
  [`${k}PathHistory`]: [],
@@ -0,0 +1,2 @@
1
+ // This file and rle.wasm is generated by [**Emscripten**](https://github.com/kripken/emscripten) from [rle.c](https://raw.githubusercontent.com/citronneur/mstsc.js/master/obj/rle.c)
2
+ var Module=typeof Module!="undefined"?Module:{};window.Module=Module;var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){}var moduleOverrides=Object.assign({},Module);var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_NODE){var fs=require("fs");var nodePath=require("path");scriptDirectory=__dirname+"/";read_=(filename,binary)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);return fs.readFileSync(filename,binary?undefined:"utf8")};readBinary=filename=>{var ret=read_(filename,true);if(!ret.buffer){ret=new Uint8Array(ret)}return ret};readAsync=(filename,onload,onerror,binary=true)=>{filename=isFileURI(filename)?new URL(filename):nodePath.normalize(filename);fs.readFile(filename,binary?undefined:"utf8",(err,data)=>{if(err)onerror(err);else onload(binary?data.buffer:data)})};if(!Module["thisProgram"]&&process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);if(typeof module!="undefined"){module["exports"]=Module}process.on("uncaughtException",ex=>{if(ex!=="unwind"&&!(ex instanceof ExitStatus)&&!(ex.context instanceof ExitStatus)){throw ex}});quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src}if(scriptDirectory.startsWith("blob:")){scriptDirectory=""}else{scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1)}{read_=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.send(null);return xhr.responseText};if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=(url,onload,onerror)=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=()=>{if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return}onerror()};xhr.onerror=onerror;xhr.send(null)}}}else{}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.error.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var wasmMemory;var ABORT=false;var EXITSTATUS;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b)}var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];var runtimeInitialized=false;function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__)}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(cb){__ATPRERUN__.unshift(cb)}function addOnInit(cb){__ATINIT__.unshift(cb)}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb)}var runDependencies=0;var runDependencyWatcher=null;var dependenciesFulfilled=null;function addRunDependency(id){runDependencies++;Module["monitorRunDependencies"]?.(runDependencies)}function removeRunDependency(id){runDependencies--;Module["monitorRunDependencies"]?.(runDependencies);if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback()}}}function abort(what){Module["onAbort"]?.(what);what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);throw e}var dataURIPrefix="data:application/octet-stream;base64,";var isDataURI=filename=>filename.startsWith(dataURIPrefix);var isFileURI=filename=>filename.startsWith("file://");function findWasmBinary(){var f="rle.wasm";if(!isDataURI(f)){return locateFile(f)}return f}var wasmBinaryFile;function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}function getBinaryPromise(binaryFile){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"&&!isFileURI(binaryFile)){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{if(!response["ok"]){throw`failed to load wasm binary file at '${binaryFile}'`}return response["arrayBuffer"]()}).catch(()=>getBinarySync(binaryFile))}else if(readAsync){return new Promise((resolve,reject)=>{readAsync(binaryFile,response=>resolve(new Uint8Array(response)),reject)})}}return Promise.resolve().then(()=>getBinarySync(binaryFile))}function instantiateArrayBuffer(binaryFile,imports,receiver){return getBinaryPromise(binaryFile).then(binary=>WebAssembly.instantiate(binary,imports)).then(receiver,reason=>{err(`failed to asynchronously prepare wasm: ${reason}`);abort(reason)})}function instantiateAsync(binary,binaryFile,imports,callback){if(!binary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(binaryFile)&&!isFileURI(binaryFile)&&!ENVIRONMENT_IS_NODE&&typeof fetch=="function"){return fetch(binaryFile,{credentials:"same-origin"}).then(response=>{var result=WebAssembly.instantiateStreaming(response,imports);return result.then(callback,function(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(binaryFile,imports,callback)})})}return instantiateArrayBuffer(binaryFile,imports,callback)}function getWasmImports(){return{"a":wasmImports}}function createWasm(){var info=getWasmImports();function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports["b"];updateMemoryViews();addOnInit(wasmExports["c"]);removeRunDependency("wasm-instantiate");return wasmExports}addRunDependency("wasm-instantiate");function receiveInstantiationResult(result){receiveInstance(result["instance"])}if(Module["instantiateWasm"]){try{return Module["instantiateWasm"](info,receiveInstance)}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);return false}}if(!wasmBinaryFile)wasmBinaryFile=findWasmBinary();instantiateAsync(wasmBinary,wasmBinaryFile,info,receiveInstantiationResult);return{}}function ExitStatus(status){this.name="ExitStatus";this.message=`Program terminated with exit(${status})`;this.status=status}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var noExitRuntime=Module["noExitRuntime"]||true;var stackRestore=val=>__emscripten_stack_restore(val);var stackSave=()=>_emscripten_stack_get_current();var abortOnCannotGrowMemory=requestedSize=>{abort("OOM")};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;abortOnCannotGrowMemory(requestedSize)};var getCFunc=ident=>{var func=Module["_"+ident];return func};var writeArrayToMemory=(array,buffer)=>{HEAP8.set(array,buffer)};var lengthBytesUTF8=str=>{var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++}else if(c<=2047){len+=2}else if(c>=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.charCodeAt(i);if(u>=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);var stackAlloc=sz=>__emscripten_stack_alloc(sz);var stringToUTF8OnStack=str=>{var size=lengthBytesUTF8(str)+1;var ret=stackAlloc(size);stringToUTF8(str,ret,size);return ret};var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):undefined;var UTF8ArrayToString=(heapOrArray,idx,maxBytesToRead)=>{var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx))++endPtr;if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr))}var str="";while(idx<endPtr){var u0=heapOrArray[idx++];if(!(u0&128)){str+=String.fromCharCode(u0);continue}var u1=heapOrArray[idx++]&63;if((u0&224)==192){str+=String.fromCharCode((u0&31)<<6|u1);continue}var u2=heapOrArray[idx++]&63;if((u0&240)==224){u0=(u0&15)<<12|u1<<6|u2}else{u0=(u0&7)<<18|u1<<12|u2<<6|heapOrArray[idx++]&63}if(u0<65536){str+=String.fromCharCode(u0)}else{var ch=u0-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023)}}return str};var UTF8ToString=(ptr,maxBytesToRead)=>ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";var ccall=(ident,returnType,argTypes,args,opts)=>{var toC={"string":str=>{var ret=0;if(str!==null&&str!==undefined&&str!==0){ret=stringToUTF8OnStack(str)}return ret},"array":arr=>{var ret=stackAlloc(arr.length);writeArrayToMemory(arr,ret);return ret}};function convertReturnValue(ret){if(returnType==="string"){return UTF8ToString(ret)}if(returnType==="boolean")return Boolean(ret);return ret}var func=getCFunc(ident);var cArgs=[];var stack=0;if(args){for(var i=0;i<args.length;i++){var converter=toC[argTypes[i]];if(converter){if(stack===0)stack=stackSave();cArgs[i]=converter(args[i])}else{cArgs[i]=args[i]}}}var ret=func(...cArgs);function onDone(ret){if(stack!==0)stackRestore(stack);return convertReturnValue(ret)}ret=onDone(ret);return ret};var wasmImports={a:_emscripten_resize_heap};var wasmExports=createWasm();var ___wasm_call_ctors=()=>(___wasm_call_ctors=wasmExports["c"])();var _bitmap_decompress_15=Module["_bitmap_decompress_15"]=(a0,a1,a2,a3,a4,a5,a6)=>(_bitmap_decompress_15=Module["_bitmap_decompress_15"]=wasmExports["d"])(a0,a1,a2,a3,a4,a5,a6);var _malloc=Module["_malloc"]=a0=>(_malloc=Module["_malloc"]=wasmExports["e"])(a0);var _free=Module["_free"]=a0=>(_free=Module["_free"]=wasmExports["f"])(a0);var _bitmap_decompress_16=Module["_bitmap_decompress_16"]=(a0,a1,a2,a3,a4,a5,a6)=>(_bitmap_decompress_16=Module["_bitmap_decompress_16"]=wasmExports["g"])(a0,a1,a2,a3,a4,a5,a6);var _bitmap_decompress_24=Module["_bitmap_decompress_24"]=(a0,a1,a2,a3,a4,a5,a6)=>(_bitmap_decompress_24=Module["_bitmap_decompress_24"]=wasmExports["h"])(a0,a1,a2,a3,a4,a5,a6);var _bitmap_decompress_32=Module["_bitmap_decompress_32"]=(a0,a1,a2,a3,a4,a5,a6)=>(_bitmap_decompress_32=Module["_bitmap_decompress_32"]=wasmExports["i"])(a0,a1,a2,a3,a4,a5,a6);var __emscripten_stack_restore=a0=>(__emscripten_stack_restore=wasmExports["k"])(a0);var __emscripten_stack_alloc=a0=>(__emscripten_stack_alloc=wasmExports["l"])(a0);var _emscripten_stack_get_current=()=>(_emscripten_stack_get_current=wasmExports["m"])();Module["ccall"]=ccall;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller};function run(){if(runDependencies>0){return}preRun();if(runDependencies>0){return}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("")},1);doRun()},1)}else{doRun()}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()()}}run();
Binary file
@@ -201,6 +201,11 @@ export default Store => {
201
201
  content: ''
202
202
  })
203
203
  }
204
+
205
+ Store.prototype.toggleResolutionEdit = function () {
206
+ window.store.openResolutionEdit = !window.store.openResolutionEdit
207
+ }
208
+
204
209
  Store.prototype.setTerminalInfos = function (arr) {
205
210
  window.store.setConfig({
206
211
  terminalInfos: arr
@@ -288,7 +288,8 @@ const getterProps = [
288
288
  'quickCommands',
289
289
  'terminalThemes',
290
290
  'serials',
291
- 'fonts'
291
+ 'fonts',
292
+ 'resolutions'
292
293
  ]
293
294
 
294
295
  for (const prop of getterProps) {
@@ -19,7 +19,8 @@ import {
19
19
  leftSidebarWidthKey,
20
20
  rightSidebarWidthKey,
21
21
  dismissDelKeyTipLsKey,
22
- qmSortByFrequencyKey
22
+ qmSortByFrequencyKey,
23
+ resolutionsLsKey
23
24
  } from '../common/constants'
24
25
  import { buildDefaultThemes, buildNewTheme } from '../common/terminal-theme'
25
26
  import * as ls from '../common/safe-local-storage'
@@ -85,6 +86,8 @@ export default () => {
85
86
  _checkedKeys: ls.getItem(checkedKeysLsKey) || '[]',
86
87
  _addressBookmarks: '[]',
87
88
  _addressBookmarksLocal: ls.getItem(localAddrBookmarkLsKey) || '[]',
89
+ openResolutionEdit: false,
90
+ _resolutions: ls.getItem(resolutionsLsKey) || '[]',
88
91
 
89
92
  // init session control
90
93
  selectedSessions: [],
@@ -59,7 +59,7 @@ export async function addTabFromCommandLine (store, opts) {
59
59
  envLang: defaultEnvLang,
60
60
  enableSsh: !options.sftpOnly,
61
61
  authType: 'password',
62
- pane: 'terminal',
62
+ pane: options.type || 'terminal',
63
63
  term: defaultSettings.terminalType
64
64
  }
65
65
  if (options.setEnv) {
@@ -10,6 +10,7 @@ import {
10
10
  sftpDefaultSortSettingKey,
11
11
  checkedKeysLsKey,
12
12
  expandedKeysLsKey,
13
+ resolutionsLsKey,
13
14
  localAddrBookmarkLsKey
14
15
  } from '../common/constants'
15
16
  import postMsg from '../common/post-msg'
@@ -47,6 +48,11 @@ export default store => {
47
48
  }, func => debounce(func, 100)).start()
48
49
  }
49
50
 
51
+ autoRun(store, async () => {
52
+ ls.setItem(resolutionsLsKey, store._resolutions)
53
+ return store._resolutions
54
+ }).start()
55
+
50
56
  autoRun(store, () => {
51
57
  if (!store.showModal) {
52
58
  store.focus()
@@ -40,6 +40,7 @@ html
40
40
  img.iblock.logo-filter(src='images/electerm.png', alt='', height=80)
41
41
  script.
42
42
  window.et = !{JSON.stringify(_global)}
43
+ - var url1 = '/src/client/entry/rle.js'
43
44
  - var url = '/src/client/entry/basic.js'
44
45
  - if (isDev)
45
46
  //- script(src='/external/react.development.js?' + version)
@@ -51,10 +52,13 @@ html
51
52
  window.$RefreshSig$ = () => (type) => type
52
53
  window.__vite_plugin_react_preamble_installed__ = true
53
54
  script(src='/@vite/client', type='module')
55
+ script(src=url1, type='module')
54
56
  script(src=url, type='module')
55
57
  - else
56
58
  //- script(src='/external/react.production.min.js?' + version)
57
59
  //- script(src='/external/react-dom.production.min.js?' + version)
58
60
  - var url = src='/js/basic-' + version + '.js'
61
+ - var url1 = src='/js/rle-' + version + '.js'
62
+ script(src=url1, type='module')
59
63
  script(src=url, type='module')
60
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "1.38.86",
3
+ "version": "1.39.2",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",