Skip to content

Commit

Permalink
html: add xterm weblinks addon
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Jun 16, 2019
1 parent 37ab5e9 commit 19c89ff
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"decko": "^1.2.0",
"preact": "^8.4.2",
"xterm": "^3.14.2",
"xterm-addon-fit": "^0.1.0-beta1"
"xterm-addon-fit": "^0.1.0-beta1",
"xterm-addon-web-links": "^0.1.0-beta10"
}
}
2 changes: 2 additions & 0 deletions html/src/components/terminal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { bind } from 'decko';
import { Component, h } from 'preact';
import { ITerminalOptions, Terminal } from 'xterm';
import { FitAddon } from 'xterm-addon-fit';
import { WebLinksAddon } from 'xterm-addon-web-links';
import { OverlayAddon } from './overlay';

import 'xterm/dist/xterm.css';
Expand Down Expand Up @@ -93,6 +94,7 @@ export default class Xterm extends Component<Props> {

terminal.loadAddon(this.fitAddon);
terminal.loadAddon(this.overlayAddon);
terminal.loadAddon(new WebLinksAddon());

terminal.onTitleChange((data) => {
if (data && data !== '') {
Expand Down
5 changes: 5 additions & 0 deletions html/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8363,6 +8363,11 @@ xterm-addon-fit@^0.1.0-beta1:
resolved "https://registry.yarnpkg.com/xterm-addon-fit/-/xterm-addon-fit-0.1.0-beta1.tgz#ec483fe4cad466de290be7e5539c8beed757b851"
integrity sha512-4HVm1RVqvBiIxBUxjjN63KIumI/mZYJ5lXkoR/onO//mh2Z2e257DmX1UqgCd2gi99EmZTt5CtEUinUANAkbvg==

xterm-addon-web-links@^0.1.0-beta10:
version "0.1.0-beta10"
resolved "https://registry.yarnpkg.com/xterm-addon-web-links/-/xterm-addon-web-links-0.1.0-beta10.tgz#610fa9773a2a5ccd41c1c83ba0e2dd2c9eb66a23"
integrity sha512-xfpjy0V6bB4BR44qIgZQPoCMVakxb65gMscPkHpO//QxvUxKzabV3dxOsIbeZRFkUGsWTFlvz2OoaBLoNtv5gg==

xterm@^3.14.2:
version "3.14.2"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.14.2.tgz#f1285288bdc7df7056ef4bde64311900748c3e5d"
Expand Down
2 changes: 1 addition & 1 deletion src/index.html

Large diffs are not rendered by default.

0 comments on commit 19c89ff

Please sign in to comment.