mirror of
https://github.com/HeyPuter/puter
synced 2024-11-14 22:06:00 +00:00
fix: improve console experience on mac
This commit is contained in:
parent
c79f500364
commit
15465bfc50
@ -180,15 +180,26 @@ class DevConsoleService extends BaseService {
|
|||||||
this.generateSeparator() +
|
this.generateSeparator() +
|
||||||
`\x1B[0m\n`
|
`\x1B[0m\n`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Input background disabled on Mac OS because it
|
||||||
|
// has a - brace yourself - light-theme terminal 😱
|
||||||
|
const drawInputBackground =
|
||||||
|
process.platform === 'darwin';
|
||||||
|
|
||||||
// Redraw the static lines
|
// Redraw the static lines
|
||||||
this.static_lines.forEach(line => {
|
this.static_lines.forEach(line => {
|
||||||
process.stdout.write(line + '\n');
|
process.stdout.write(line + '\n');
|
||||||
});
|
});
|
||||||
process.stdout.write('\x1b[48;5;234m');
|
if ( drawInputBackground ) {
|
||||||
|
// input background
|
||||||
|
process.stdout.write('\x1b[48;5;234m');
|
||||||
|
}
|
||||||
rl.resume();
|
rl.resume();
|
||||||
rl._refreshLine();
|
rl._refreshLine();
|
||||||
process.stdout.write('\x1b[48;5;237m');
|
if ( drawInputBackground ) {
|
||||||
|
// input background
|
||||||
|
process.stdout.write('\x1b[48;5;237m');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this._redraw = () => {
|
this._redraw = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user