Give user notification about how to resize

This commit is contained in:
Girish Ramakrishnan
2018-06-08 12:22:45 -07:00
parent 3eae49139c
commit e3950c2fb0

View File

@@ -279,6 +279,12 @@ app.controller('TerminalController', ['$scope', '$timeout', '$location', 'Client
setTimeout(function () {
if (!$scope.terminal) return;
$scope.terminal.fit();
// this is here so that the text wraps correctly after the fit!
var YELLOW = '\u001b[33m'; // https://gist.github.com/dainkaplan/4651352
var NC = '\u001b[0m';
$scope.terminal.writeln(YELLOW + 'If you resize the browser window, press Ctrl+D to start a new session with the current size.' + NC);
createTerminalSocket(); // create exec container after we fit() since we cannot resize exec container post-creation
}, 1000);
});