Skip to content

Commit b1899c8

Browse files
save file
1 parent e3bcc3b commit b1899c8

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

utils/misc/nodejs-terminal/v2.0/nodejs-terminal-v2.0.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,6 @@
495495
var code = await process.exit;
496496
if(code!=0){
497497
term.writeln.red('an error ocurred exit code : '+code);
498-
}else{
499-
term.writeln.green('done.');
500498
}
501499

502500
spinner.stop();
@@ -970,7 +968,7 @@
970968

971969
spinner.timer = null;
972970

973-
function spinner(msg="Processing"){
971+
function spinner(msg='Processing'){
974972

975973
const frames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
976974
let i = 0;
@@ -986,18 +984,23 @@
986984

987985
}//spinner
988986

989-
spinner.stop = function(finalMsg="Done!"){
987+
988+
spinner.stop = function(finalMsg='done!'){
990989

991990
if(spinner.timer){
992991
clearInterval(spinner.timer);
993-
spinnerInterval = null;
992+
spinner.timer = null;
994993
}
995994
// Clear the line, show cursor, and print final message
996995
// \x1b[K clears from cursor to end of line
997-
term.write('\r\x1b[K');
998-
term.write(`${colors.green}${colors.reset} ${finalMsg}\r\n`);
996+
//term.write('\r\x1b[K');
997+
//term.write(`${colors.green}✔${colors.reset} ${finalMsg}\r\n`);
999998
// Show cursor again
1000-
term.write('\x1b[?25h');
999+
//term.write('\x1b[?25h');
1000+
term.write(`\r\x1b[K${colors.green}${colors.reset} ${finalMsg}\r\n`);
1001+
1002+
term.write('\x1b[?25h'); // Show cursor
1003+
10011004

10021005
}//stop
10031006

0 commit comments

Comments
 (0)