Merge pull request #998 from bergware/master

Limit popup window width on ultrawide monitors
This commit is contained in:
tom mortensen
2022-01-10 11:27:12 -08:00
committed by GitHub

View File

@@ -226,7 +226,7 @@ function openTerminal(tag,name,more) {
}
// open terminal window (run in background)
name = name.replace(/ /g,"_");
tty_window = makeWindow(name,Math.max(screen.availHeight*3/5,600),Math.max(screen.availWidth/2,900));
tty_window = makeWindow(name,Math.max(screen.availHeight*3/5,600),Math.min(Math.max(screen.availWidth/2,900),1600));
var socket = ['ttyd','syslog'].includes(tag) ? '/webterminal/'+tag+'/' : '/logterminal/'+name+(more=='.log'?more:'')+'/';
$.get('/webGui/include/OpenTerminal.php',{tag:tag,name:name,more:more},function(){tty_window.location=socket; tty_window.focus();});
}