mirror of
https://github.com/yudai/gotty.git
synced 2026-01-19 15:56:10 +01:00
Move responsibility to decode output encoding to terminal implementation
This commit is contained in:
parent
807bcc25a4
commit
b2c2db0764
6 changed files with 17 additions and 15 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import { lib } from "libapps"
|
||||
|
||||
export const protocols = ["webtty"];
|
||||
|
||||
export const msgInputUnknown = '0';
|
||||
|
|
@ -65,8 +63,6 @@ export class WebTTY {
|
|||
let reconnectTimeout: number;
|
||||
|
||||
const setup = () => {
|
||||
const decoder = new lib.UTF8Decoder()
|
||||
|
||||
connection.onOpen(() => {
|
||||
const termInfo = this.term.info();
|
||||
|
||||
|
|
@ -108,7 +104,7 @@ export class WebTTY {
|
|||
const payload = data.slice(1);
|
||||
switch (data[0]) {
|
||||
case msgOutput:
|
||||
this.term.output(decoder.decode(atob(payload)));
|
||||
this.term.output(atob(payload));
|
||||
break;
|
||||
case msgPong:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue