summaryrefslogtreecommitdiffstats
path: root/html/src/components/app.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'html/src/components/app.tsx')
-rw-r--r--html/src/components/app.tsx22
1 files changed, 13 insertions, 9 deletions
diff --git a/html/src/components/app.tsx b/html/src/components/app.tsx
index 15815ab..71a2d89 100644
--- a/html/src/components/app.tsx
+++ b/html/src/components/app.tsx
@@ -1,22 +1,20 @@
import { h, Component } from 'preact';
import { ITerminalOptions, ITheme } from 'xterm';
-import { ClientOptions, Xterm } from './terminal';
-
-if ((module as any).hot) {
- // tslint:disable-next-line:no-var-requires
- require('preact/debug');
-}
+import { ClientOptions, FlowControl } from './terminal/xterm';
+import { Terminal } from './terminal';
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
-const path = window.location.pathname.replace(/[\/]+$/, '');
+const path = window.location.pathname.replace(/[/]+$/, '');
const wsUrl = [protocol, '//', window.location.host, path, '/ws', window.location.search].join('');
const tokenUrl = [window.location.protocol, '//', window.location.host, path, '/token'].join('');
const clientOptions = {
rendererType: 'webgl',
disableLeaveAlert: false,
disableResizeOverlay: false,
- titleFixed: null,
+ enableZmodem: false,
+ enableTrzsz: false,
+ enableSixel: false,
} as ClientOptions;
const termOptions = {
fontSize: 13,
@@ -44,16 +42,22 @@ const termOptions = {
} as ITheme,
allowProposedApi: true,
} as ITerminalOptions;
+const flowControl = {
+ limit: 100000,
+ highWater: 10,
+ lowWater: 4,
+} as FlowControl;
export class App extends Component {
render() {
return (
- <Xterm
+ <Terminal
id="terminal-container"
wsUrl={wsUrl}
tokenUrl={tokenUrl}
clientOptions={clientOptions}
termOptions={termOptions}
+ flowControl={flowControl}
/>
);
}