Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
haoqu.ma
/
gotty
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 27b64361
authored
Aug 22, 2017
by
Iwasaki Yudai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename TermXterm and TermHterm to Xterm and Hterm
1 parent
70aaf330
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
40 additions
and
40 deletions
js/dist/bundle.js
js/dist/bundle.js.map
js/dist/hterm.d.ts
js/dist/xterm.d.ts
js/src/hterm.ts
js/src/main.ts
js/src/xterm.ts
js/dist/bundle.js
View file @
27b6436
...
...
@@ -2479,8 +2479,8 @@ exports.getRawByteCoords = getRawByteCoords;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
bare
=
__webpack_require__
(
14
);
var
Term
Hterm
=
(
function
()
{
function
Term
Hterm
(
elem
)
{
var
Hterm
=
(
function
()
{
function
Hterm
(
elem
)
{
this
.
elem
=
elem
;
bare
.
hterm
.
defaultStorage
=
new
bare
.
lib
.
Storage
.
Memory
();
this
.
term
=
new
bare
.
hterm
.
Terminal
();
...
...
@@ -2490,17 +2490,17 @@ var TermHterm = (function () {
this
.
term
.
installKeyboard
();
}
;
Term
Hterm
.
prototype
.
info
=
function
()
{
Hterm
.
prototype
.
info
=
function
()
{
return
{
columns
:
this
.
columns
,
rows
:
this
.
rows
};
};
;
Term
Hterm
.
prototype
.
output
=
function
(
data
)
{
Hterm
.
prototype
.
output
=
function
(
data
)
{
if
(
this
.
term
.
io
!=
null
)
{
this
.
term
.
io
.
writeUTF16
(
data
);
}
};
;
Term
Hterm
.
prototype
.
showMessage
=
function
(
message
,
timeout
)
{
Hterm
.
prototype
.
showMessage
=
function
(
message
,
timeout
)
{
this
.
message
=
message
;
if
(
timeout
>
0
)
{
this
.
term
.
io
.
showOverlay
(
message
,
timeout
);
...
...
@@ -2510,22 +2510,22 @@ var TermHterm = (function () {
}
};
;
Term
Hterm
.
prototype
.
removeMessage
=
function
()
{
Hterm
.
prototype
.
removeMessage
=
function
()
{
// there is no hideOverlay(), so show the same message with 0 sec
this
.
term
.
io
.
showOverlay
(
this
.
message
,
0
);
};
Term
Hterm
.
prototype
.
setWindowTitle
=
function
(
title
)
{
Hterm
.
prototype
.
setWindowTitle
=
function
(
title
)
{
this
.
term
.
setWindowTitle
(
title
);
};
;
Term
Hterm
.
prototype
.
setPreferences
=
function
(
value
)
{
Hterm
.
prototype
.
setPreferences
=
function
(
value
)
{
var
_this
=
this
;
Object
.
keys
(
value
).
forEach
(
function
(
key
)
{
_this
.
term
.
getPrefs
().
set
(
key
,
value
[
key
]);
});
};
;
Term
Hterm
.
prototype
.
onInput
=
function
(
callback
)
{
Hterm
.
prototype
.
onInput
=
function
(
callback
)
{
this
.
io
.
onVTKeystroke
=
function
(
data
)
{
callback
(
data
);
};
...
...
@@ -2534,7 +2534,7 @@ var TermHterm = (function () {
};
};
;
Term
Hterm
.
prototype
.
onResize
=
function
(
callback
)
{
Hterm
.
prototype
.
onResize
=
function
(
callback
)
{
var
_this
=
this
;
this
.
io
.
onTerminalResize
=
function
(
columns
,
rows
)
{
_this
.
columns
=
columns
;
...
...
@@ -2543,22 +2543,22 @@ var TermHterm = (function () {
};
};
;
Term
Hterm
.
prototype
.
deactivate
=
function
()
{
Hterm
.
prototype
.
deactivate
=
function
()
{
this
.
io
.
onVTKeystroke
=
null
;
this
.
io
.
sendString
=
null
;
this
.
io
.
onTerminalResize
=
null
;
this
.
term
.
uninstallKeyboard
();
};
Term
Hterm
.
prototype
.
reset
=
function
()
{
Hterm
.
prototype
.
reset
=
function
()
{
this
.
removeMessage
();
this
.
term
.
installKeyboard
();
};
Term
Hterm
.
prototype
.
close
=
function
()
{
Hterm
.
prototype
.
close
=
function
()
{
this
.
term
.
uninstallKeyboard
();
};
return
Term
Hterm
;
return
Hterm
;
}());
exports
.
TermHterm
=
Term
Hterm
;
exports
.
Hterm
=
Hterm
;
/***/
}),
...
...
@@ -2741,8 +2741,8 @@ exports.WebTTY = WebTTY;
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
var
bare
=
__webpack_require__
(
0
);
bare
.
loadAddon
(
"fit"
);
var
Term
Xterm
=
(
function
()
{
function
Term
Xterm
(
elem
)
{
var
Xterm
=
(
function
()
{
function
Xterm
(
elem
)
{
var
_this
=
this
;
this
.
elem
=
elem
;
this
.
term
=
new
bare
();
...
...
@@ -2761,15 +2761,15 @@ var TermXterm = (function () {
this
.
term
.
open
(
elem
,
true
);
}
;
Term
Xterm
.
prototype
.
info
=
function
()
{
Xterm
.
prototype
.
info
=
function
()
{
return
{
columns
:
this
.
term
.
cols
,
rows
:
this
.
term
.
rows
};
};
;
Term
Xterm
.
prototype
.
output
=
function
(
data
)
{
Xterm
.
prototype
.
output
=
function
(
data
)
{
this
.
term
.
write
(
data
);
};
;
Term
Xterm
.
prototype
.
showMessage
=
function
(
message
,
timeout
)
{
Xterm
.
prototype
.
showMessage
=
function
(
message
,
timeout
)
{
var
_this
=
this
;
this
.
message
.
textContent
=
message
;
this
.
elem
.
appendChild
(
this
.
message
);
...
...
@@ -2783,46 +2783,46 @@ var TermXterm = (function () {
}
};
;
Term
Xterm
.
prototype
.
removeMessage
=
function
()
{
Xterm
.
prototype
.
removeMessage
=
function
()
{
if
(
this
.
message
.
parentNode
==
this
.
elem
)
{
this
.
elem
.
removeChild
(
this
.
message
);
}
};
Term
Xterm
.
prototype
.
setWindowTitle
=
function
(
title
)
{
Xterm
.
prototype
.
setWindowTitle
=
function
(
title
)
{
document
.
title
=
title
;
};
;
Term
Xterm
.
prototype
.
setPreferences
=
function
(
value
)
{
Xterm
.
prototype
.
setPreferences
=
function
(
value
)
{
};
;
Term
Xterm
.
prototype
.
onInput
=
function
(
callback
)
{
Xterm
.
prototype
.
onInput
=
function
(
callback
)
{
this
.
term
.
on
(
"data"
,
function
(
data
)
{
callback
(
data
);
});
};
;
Term
Xterm
.
prototype
.
onResize
=
function
(
callback
)
{
Xterm
.
prototype
.
onResize
=
function
(
callback
)
{
this
.
term
.
on
(
"resize"
,
function
(
data
)
{
callback
(
data
.
cols
,
data
.
rows
);
});
};
;
Term
Xterm
.
prototype
.
deactivate
=
function
()
{
Xterm
.
prototype
.
deactivate
=
function
()
{
this
.
term
.
off
(
"data"
);
this
.
term
.
off
(
"resize"
);
this
.
term
.
blur
();
};
Term
Xterm
.
prototype
.
reset
=
function
()
{
Xterm
.
prototype
.
reset
=
function
()
{
this
.
removeMessage
();
this
.
term
.
clear
();
};
Term
Xterm
.
prototype
.
close
=
function
()
{
Xterm
.
prototype
.
close
=
function
()
{
window
.
removeEventListener
(
"resize"
,
this
.
resizeListener
);
this
.
term
.
destroy
();
};
return
Term
Xterm
;
return
Xterm
;
}());
exports
.
TermXterm
=
Term
Xterm
;
exports
.
Xterm
=
Xterm
;
/***/
}),
...
...
@@ -20831,10 +20831,10 @@ var elem = document.getElementById("terminal");
if
(
elem
!==
null
)
{
var
term
;
if
(
gotty_term
==
"hterm"
)
{
term
=
new
hterm_1
.
Term
Hterm
(
elem
);
term
=
new
hterm_1
.
Hterm
(
elem
);
}
else
{
term
=
new
xterm_1
.
Term
Xterm
(
elem
);
term
=
new
xterm_1
.
Xterm
(
elem
);
}
var
httpsEnabled
=
window
.
location
.
protocol
==
"https:"
;
var
url
=
(
httpsEnabled
?
'wss://'
:
'ws://'
)
+
window
.
location
.
host
+
window
.
location
.
pathname
+
'ws'
;
...
...
js/dist/bundle.js.map
View file @
27b6436
This diff could not be displayed because it is too large.
js/dist/hterm.d.ts
View file @
27b6436
import
*
as
bare
from
"libapps"
;
export
declare
class
Term
Hterm
{
export
declare
class
Hterm
{
elem
:
HTMLElement
;
term
:
bare
.
Terminal
;
io
:
bare
.
IO
;
...
...
js/dist/xterm.d.ts
View file @
27b6436
import
*
as
bare
from
"xterm"
;
export
declare
class
Term
Xterm
{
export
declare
class
Xterm
{
elem
:
HTMLElement
;
message
:
HTMLElement
;
messageTimeout
:
number
;
...
...
js/src/hterm.ts
View file @
27b6436
import
*
as
bare
from
"libapps"
;
export
class
Term
Hterm
{
export
class
Hterm
{
elem
:
HTMLElement
;
term
:
bare
.
Terminal
;
...
...
js/src/main.ts
View file @
27b6436
import
{
Term
Hterm
}
from
"./hterm"
;
import
{
Term
Xterm
}
from
"./xterm"
;
import
{
Hterm
}
from
"./hterm"
;
import
{
Xterm
}
from
"./xterm"
;
import
{
Terminal
,
WebTTY
,
protocols
}
from
"./webtty"
;
import
{
ConnectionFactory
}
from
"./websocket"
;
...
...
@@ -12,9 +12,9 @@ const elem = document.getElementById("terminal")
if
(
elem
!==
null
)
{
var
term
:
Terminal
;
if
(
gotty_term
==
"hterm"
)
{
term
=
new
Term
Hterm
(
elem
);
term
=
new
Hterm
(
elem
);
}
else
{
term
=
new
Term
Xterm
(
elem
);
term
=
new
Xterm
(
elem
);
}
const
httpsEnabled
=
window
.
location
.
protocol
==
"https:"
;
const
url
=
(
httpsEnabled
?
'wss://'
:
'ws://'
)
+
window
.
location
.
host
+
window
.
location
.
pathname
+
'ws'
;
...
...
js/src/xterm.ts
View file @
27b6436
...
...
@@ -2,7 +2,7 @@ import * as bare from "xterm";
bare
.
loadAddon
(
"fit"
);
export
class
Term
Xterm
{
export
class
Xterm
{
elem
:
HTMLElement
;
message
:
HTMLElement
;
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment