html: add xterm weblinks addon

This commit is contained in:
Shuanglei Tao
2019-06-16 08:06:10 +08:00
parent 37ab5e937f
commit 19c89ff2bb
4 changed files with 10 additions and 2 deletions

View File

@@ -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"
}
}

View File

@@ -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';
@@ -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 !== '') {

View File

@@ -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"

2
src/index.html vendored

File diff suppressed because one or more lines are too long