Skip to content

Commit

Permalink
Fixed SSH with xterm.js (#4668)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ylianst committed Oct 25, 2022
1 parent 2981217 commit 909f9f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 3 additions & 1 deletion views/default.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -10190,7 +10190,9 @@
case 'sessionerror': { p12setConsoleMsg("Session expired", 5000); break; }
case 'sessiontimeout': { p12setConsoleMsg("Session timeout", 5000); break; }
}
} else if (data[0] == '~') { xterm.writeUtf8(data.substring(1)); }
} else if (data[0] == '~') {
if (xterm.writeUtf8) { xterm.writeUtf8(data.substring(1)); } else { xterm.write(data.substring(1)); }
}
}
}

Expand Down
10 changes: 4 additions & 6 deletions views/ssh.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@
<div id="bigok" style="display:none;left:calc((100vh / 2))"><b>&checkmark;</b></div>
<div id="bigfail" style="display:none;left:calc((100vh / 2))"><b>&#10007;</b></div>
<div id="metadatadiv" style="padding:20px;color:lightgrey;text-align:left;display:none"></div>
<div id=terminal style="max-height:calc(100vh - 54px);height:calc(100vh - 54px);"></div>
<div id=terminal style="max-height:calc(100vh - 54px);height:calc(100vh - 54px);text-align:left"></div>
<div id=TermConsoleMsg style="display:none;cursor:pointer;z-index:10;position:absolute;left:30px;top:17px;color:yellow;background-color:rgba(0,0,0,0.6);padding:10px;border-radius:5px" onclick=clearConsoleMsg()></div>
</div>
<div id=deskarea4 class="areaHead">
<div class="toright2">
</div>
<div style="height:21px;max-height:21px">
</div>
<div class="toright2"></div>
<div style="height:21px;max-height:21px"></div>
</div>
</div>
<div id=dialog class="noselect" style="display:none">
Expand Down Expand Up @@ -243,7 +241,7 @@
case 'sessiontimeout': { setDialogMode(2, "Session", 1, null, "Session timeout."); break; }
}
} else if (data.data[0] == '~') {
term.writeUtf8(data.data.substring(1));
if (term.writeUtf8) { term.writeUtf8(data.data.substring(1)); } else { term.write(data.data.substring(1)); }
}
}
socket.onclose = function (e) { disconnect(); }
Expand Down

0 comments on commit 909f9f8

Please sign in to comment.