mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-08 06:00:28 -06:00
Fix dev console bar when columns has small value
This commit is contained in:
@@ -179,6 +179,11 @@ class DevConsoleService extends BaseService {
|
||||
generateSeparator(text) {
|
||||
text = text || '[ Dev Console ]';
|
||||
const totalWidth = process.stdout.columns;
|
||||
|
||||
if ( totalWidth <= text.length+1 ) {
|
||||
return '═'.repeat(totalWidth < 0 ? 0 : totalWidth);
|
||||
}
|
||||
|
||||
const paddingSize = (totalWidth - text.length) / 2;
|
||||
|
||||
// Construct the separator
|
||||
|
||||
Reference in New Issue
Block a user