From 6e1ed7ab047d16f884ef794816978c0ee84f2ecc Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Mon, 30 Sep 2024 16:50:03 -0400 Subject: [PATCH] dev: update emu load indicator --- package-lock.json | 9 +++++++++ src/emulator/src/main.js | 6 ++++++ src/emulator/tux.sixel | 1 + src/emulator/webpack.config.js | 3 ++- .../puter-shell/providers/EmuCommandProvider.js | 17 +++++++++++------ src/terminal/package.json | 5 +++-- src/terminal/src/main.js | 3 +++ 7 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 src/emulator/tux.sixel diff --git a/package-lock.json b/package-lock.json index dcd041f3..b61417cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7296,6 +7296,14 @@ "@xterm/xterm": "^5.0.0" } }, + "node_modules/@xterm/addon-image": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@xterm/addon-image/-/addon-image-0.8.0.tgz", + "integrity": "sha512-b/dqpFn3jUad2pUP5UpF4scPIh0WdxRQL/1qyiahGfUI85XZTCXo0py9G6AcOR2QYUw8eJ8EowGspT7BQcgw6A==", + "peerDependencies": { + "@xterm/xterm": "^5.2.0" + } + }, "node_modules/@xterm/xterm": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@xterm/xterm/-/xterm-5.5.0.tgz", @@ -17436,6 +17444,7 @@ "license": "AGPL-3.0-only", "dependencies": { "@xterm/addon-fit": "^0.10.0", + "@xterm/addon-image": "^0.8.0", "@xterm/xterm": "^5.5.0" }, "devDependencies": { diff --git a/src/emulator/src/main.js b/src/emulator/src/main.js index ace448f0..b977b6a6 100644 --- a/src/emulator/src/main.js +++ b/src/emulator/src/main.js @@ -115,6 +115,11 @@ const setup_pty = (ptt, pty) => { })() } +let TUX_SIXEL; (async () => { + const resp = await fetch('./static/tux.sixel'); + const text = await resp.text(); + TUX_SIXEL = text; +})(); puter.ui.on('connection', event => { const { conn, accept, reject } = event; @@ -131,6 +136,7 @@ puter.ui.on('connection', event => { accept({ version: '1.0.0', status, + logo: TUX_SIXEL, }); console.log('emulator got connection event', event); diff --git a/src/emulator/tux.sixel b/src/emulator/tux.sixel new file mode 100644 index 00000000..f9073de1 --- /dev/null +++ b/src/emulator/tux.sixel @@ -0,0 +1 @@ +P0;0;0q"1;1;80;80#0;2;0;0;0#1;2;0;0;0#2;2;1;1;2#3;2;2;2;2#4;2;4;4;4#5;2;5;5;5#6;2;7;5;2#7;2;9;7;2#8;2;7;7;7#9;2;9;9;9#10;2;10;10;10#11;2;12;12;12#12;2;15;10;4#13;2;15;12;4#14;2;18;13;2#15;2;20;13;2#16;2;21;15;2#17;2;24;16;2#18;2;13;13;13#19;2;15;15;15#20;2;16;16;16#21;2;18;18;18#22;2;20;20;20#23;2;21;21;21#24;2;23;23;23#25;2;24;24;24#26;2;27;18;2#27;2;29;21;5#28;2;31;21;3#29;2;36;24;2#30;2;32;24;13#31;2;34;26;12#32;2;37;27;12#33;2;38;27;2#34;2;41;27;2#35;2;38;31;4#36;2;40;31;4#37;2;49;31;2#38;2;45;32;3#39;2;47;36;3#40;2;47;34;10#41;2;34;26;13#42;2;39;32;20#43;2;42;34;23#44;2;46;38;18#45;2;26;26;26#46;2;27;27;27#47;2;29;29;29#48;2;31;31;31#49;2;35;32;26#50;2;37;34;26#51;2;37;34;30#52;2;32;32;32#53;2;34;34;34#54;2;35;35;35#55;2;37;37;37#56;2;48;40;27#57;2;44;39;31#58;2;40;38;35#59;2;43;42;37#60;2;49;44;35#61;2;40;40;40#62;2;42;42;42#63;2;43;43;43#64;2;45;45;45#65;2;48;48;48#66;2;51;33;2#67;2;53;34;2#68;2;54;34;2#69;2;54;36;2#70;2;55;40;6#71;2;60;39;2#72;2;61;42;4#73;2;60;45;4#74;2;61;46;4#75;2;64;43;3#76;2;65;45;3#77;2;69;46;2#78;2;66;48;4#79;2;71;48;3#80;2;51;38;18#81;2;56;43;18#82;2;62;46;14#83;2;60;48;18#84;2;54;43;20#85;2;60;47;24#86;2;66;49;17#87;2;56;48;28#88;2;73;52;4#89;2;72;56;5#90;2;75;57;5#91;2;71;52;14#92;2;75;56;13#93;2;71;56;17#94;2;75;59;18#95;2;68;53;20#96;2;69;57;24#97;2;75;52;4#98;2;77;54;4#99;2;78;56;4#100;2;81;57;4#101;2;78;61;4#102;2;82;59;4#103;2;84;60;4#104;2;85;62;4#105;2;82;64;4#106;2;82;65;4#107;2;86;64;4#108;2;84;68;6#109;2;80;65;7#110;2;88;65;4#111;2;89;67;4#112;2;90;68;4#113;2;88;69;6#114;2;92;68;5#115;2;93;70;5#116;2;94;71;5#117;2;89;72;5#118;2;93;73;4#119;2;92;75;4#120;2;93;75;4#121;2;95;73;5#122;2;96;73;5#123;2;96;75;5#124;2;79;59;13#125;2;81;64;16#126;2;84;67;21#127;2;84;65;23#128;2;88;70;24#129;2;89;72;24#130;2;93;79;6#131;2;95;77;5#132;2;91;76;6#133;2;91;78;12#134;2;95;82;7#135;2;96;84;8#136;2;96;81;18#137;2;96;85;15#138;2;96;84;17#139;2;96;84;21#140;2;96;85;24#141;2;60;56;35#142;2;64;52;26#143;2;64;57;37#144;2;56;53;42#145;2;71;62;42#146;2;68;60;45#147;2;74;64;45#148;2;79;64;27#149;2;96;85;29#150;2;93;80;36#151;2;50;50;50#152;2;53;53;53#153;2;54;54;54#154;2;56;56;56#155;2;58;58;58#156;2;60;60;60#157;2;62;62;62#158;2;70;65;57#159;2;75;70;56#160;2;64;64;64#161;2;65;65;65#162;2;67;67;67#163;2;68;68;68#164;2;70;70;70#165;2;71;71;71#166;2;73;73;73#167;2;75;75;75#168;2;85;76;53#169;2;83;81;73#170;2;96;90;75#171;2;76;76;76#172;2;78;78;78#173;2;79;79;79#174;2;81;81;81#175;2;82;82;82#176;2;84;84;84#177;2;85;85;85#178;2;87;87;87#179;2;89;89;89#180;2;91;91;91#181;2;92;92;92#182;2;93;93;93#183;2;95;95;95#184;2;96;96;96#185;2;98;98;98#186;2;99;99;99#0!29~^NFB@@@!8?@@@BBFN^!28~$#3!29?_??CA?O@@???@@@O?a?CGO_$#4!30?OG??A???@@@!4?A?C#9??_$!30?_?G???A??G#47?C#8?A??C??O$#10!31?O??C??A??G?A??C?G$#22!31?_O#5C?A!8?A???G$#48!32?_!5?CCC!7?_$#20!33?G?C!8?C#46G?_$#18!33?_!5?A?G#21!4?G??_$#52!33?O#45G?GC!4?CG???O$#2!34?__!8o__$#24!34?O#53G!8?G?O$#23!36?C!5?GC?O$#19!37?GG!9?O$#11!38?A?AA-#0!27~F#5C?_#2w}!10~__oop}wo#52G#9C#0BN!25~$#4!27?_A??C#10@#5!10?@!9?G$#3!27?W@#20C@#24A#10!11?I???C!5?_$#11!28?OAO#52@#4!11?OO??I!4?A$#9!28?G#25GG#11!12?C#23G!6?c#22O$#19!28?_#53_C#21!13?@?A#20?@?@#45?_$#8!29?@#45A#55!13?CC#3@??C??@Co$#48!29?O#53!14?A#19G!6?G$#18!45?@!4?GA$#61!45?A#8G!4?@?O$#24!46?C??A#46A$#48!49?@CO-#0!27~#5~???G!6?_?C???@?G!7?E#0F!24~$#20!28?@#53]!4?_!6?C#8A!8?@??G$#21!28?}#52`#2~F@??@@^^FBB@???@r~~~{#52@#20A$#23!31?O#3AB??A??G??_@???K!7?w$#62!31?_#19C#64C?G#65_!6?O#54_#22A!7?G$#152!32?G#171OG#18A!7?A!9?@$#162!32?_#10_#4@?G_!6?A@!5?A??@$#177!32?O#172G#9ACC!9?A!7?o$#179!34?O_#24O#11??O#175O?G#46_!8?o#21C$#55!34?C#184O#21???_#58G#166G#153C#160C#156C#19C#10C#53!5?M#24o$#180!40?_#167_#163O#177G#176G#152G#47O$#186!41?O#178??O#181O#157_$#182!45?_-#0!27~#4{???G#62@!8?B#12C#5@#117_O#20G!7?_#4O#0!24~$#5!27?B??]#2O?A!8?BEA??\!4~#10_?C#5_$#19!28?K!9?@#89C???G??_#3a!7?N$#18!28?o#52_#3@??@#46@!9?C!7?C#25B#9B$#20!28?B#53X#11_#64@???A#118OC#134o??G?OO#171AA#47!5?BG#11G$#54!29?C#17?_#151A???@#132OG???G#21?@#167@#40O#22!5?W#45C#18O$#55!29?A#24?C#40O#97OG#113G??C#23@#108C!4?_#153C#52!6?O$#61!31?A#79_#10C#8A??@#35?A#137_O#168??G#169G#172@#55!6?_$#171!32?G#100_#16C#116oG#39AA#133G#136G#135_o_#184?C$#175!32?C#147G#107O#73C#119_G#139?O#140O#96C$#112!34?_#155@#44A#130_#149?_#160A$#111!36?C#178???@-#0!26~N#18_C#48F#2_#9A#97@!6?O?C#102CA?A#36A#5G??A!7?_$#3!26?O!4?k#32C#167O_!7?_#103C#104A@#58C#2F\p`bew_#8@CO$#4!26?_N???O#69A#146GO!5?_#166_?O#124C#186__#45O#3a???P???@CO$#8!27?O#22O?L#34@#151G#70C#90C!4?C#100GG#88A#147G#171G#145C#74@#165_#23?A!4?@#11AG#0BN!21~$#47!28?__#10O#153?O#104@#72GO?__#86_#79O#92O#159O#175_#173O#172G#163G#9??G??GC#4O?AG$#11!28?B#53G#21A#154?_#105A#115@#78G!4?C#109A#184??_#178O#176O#48??C#22O!5?O#18_$#19!28?G#61O#172???_#116A#117C#101G!6?@#64!6?KG#54?@CO$#118!35?@#98O?W???G#25!8?O?A?_$#120!35?A#132@C#135AA@@#24!9?C#47??I?_$#158!35?_#85_#99O?G!4?@#21!10?C$#130!36?A#134B??A?@#46!12?G$#133!36?C#89G#108C#138@$#139!38?@-#0!21~^NB@#8AO??J#185_C!4?O!5?A!5?_#5A!5?@!4?C#4GO$#3!21?_?CA??G?CA#165A#181@#184A?G??G?C#176?@#183@!5?_#23_!6?@??O#10O$#9!22?_???@#23@#55@#171_!8?C??@#52!6?@C#8O!6?GOA#0@BN^!16~$#4!22?O??@#21A?A??@#178?@!5?C#173!8?A#2@N!4~}{o_#3@AC?_$#5!23?GC???_#63O#186Ow}{wo_ooww{{}!4~[#164G#53!6?@A??_#22_$#10!23?O?_#2_o[?@#167???@BFEAB@#20!15?A?A#18C#11G$#22!23?_#54_O?A??C#174???A!5?A#48!16?C#9@???_$#18!24?G#45G?C#177??G#182???C#172C#179G#180G???A!7?O#46!8?C#19_$#24!24?O#19C#47C#166!10?@@#54!19?G#25G$#48!26?G#55!32?O-#0!19~F#20_C??_???@#180G!7?A!5?A!4?G@#61@??_#22C#19G?_??@#25AG#21C#10G#0B^!13~$#3!19?G@!6?A#186_ooxx||oo{{!4|xxwwoo_#177O?_#5S?c!7?@?O$#4!19?OA!4?G?C#182O!6?A??A!5?C??@#172A?G#3@C?G!6?C??@C_$#5!19?_C@#46G!5?A#162A#185G?CAAL??@AAA???@!4?_#8A!4?_!5?O?C$#9!20?G?_!4?G#55C#165C#184@?A!9?AC??@G?O#165A#157C#2BJrRFN^~}w_#48_#24_$#11!20?O#10A??OO#177?_??C#183C!4?H@#176!6?A#174A???G#178?_#55G#11???W!6?A$#23!21?G#52C@#18@#62??O#161G#171@#174A#181A!4?C#175!9?C???C?O#9!4?O!7?_$#47!21?O#19@#2wMf^@#179!8?A!8?C??@??G#4!6?_!5?AG$#54!21?_#22O#8C??_#173!19?AE?A?O#52!9?@#20@?O$#25!22?A#45A#171!24?CC#45!12?AG$#53!62?CO-#0!16~NB#20OC??OA#155_#186_{!7~B@!15~}}{#3@C!7?A_??C$!16?OC@??O?G#185?O!8?CA!15?@#182@#172@#21A!4?W???@?A_#0B!12~$#4!16?_GA#8@?Cc#64??C#65@#183!7?Ow#184!17?A#55C#19B??B_!6?O$#5!17?OC!5?G#175G#180A#181!7?_#182C#154!18?G#2w{{w@~~~{#47CG#9C$#10!17?_G?O??D#184!10?G#165!19?O#24?@!8?C$#45!18?_G#2_GBoE@#174!28?_#20?A!7?G#11@G$#52!19?_G@#19G#5!34?A?A!6?A_$#54!19?OC#9_??@A#10!31?@#4C!5?O?@W$#11!19?A#47A???O#18!34?C#53!4?Ao$#23!20?@#24A#48!42?@-#0!14~F#4E!6?B#20C#175@#186!9~??!18~#174_#3B?O@???_!5?~#0!11~$#3!14?w@??C!4?@#182A#180!9?}#182A#178!18?@#2_^N?W^^^~~#45]#23`$#8!15?W@??@#5G?C#184?C#181!9?@#183D#179!18?O#5G???C#10_#8_!5?`$#9!15?_#10A!6?A#185w#184!10?w#180!18?A#4S??A#52!6?`#24Q$#19!16?C!4?A#181!32?K#9?_?C_!7?]$#22!16?G#25oA!4?G#18!33?_#11WB#25!6?K$#23!16?O#48C!5?_#6!34?_$#24!16?_#21@???CO$#45!17?A#2w}v_$#47!17?G#53@#46??G?O$#11!21?O_$#18!21?@G-#0!7~^FBB@@@#98OO#25@!6?@#182@A#21G#9O#157O#185O!5?E#180!13?_#172_#126_#115__!9?_#116__#22@#18G#4G#0^!10~$#3!7?_GC?A??@!7?@?C???_#64_#183_!4?G#185!13?O#183O#128W#131CG#93A#8@!5?@!5?B#5O$#9!8?_??C#4AA!9?A??_#172G#180!6?F#184@#129!15?C#150AA#102_#7G#2]~~~]Y#45@???C#20O#9_$#5!8?O?C#103_!4?O#121_OE#105@#39@#74A#73C#36G#186@BFNN^~~~oo!13~NN@@@#103O#12A#5@#3???`CG?@???F_$#19!9?OG??C?A#62C@#123_o}}{o#54A#2GO_#181!6?G#170!16?A#116O#118O#106G#13C#6_#26!4?_#19A@#109C#55@#23A#24_$#8!9?G!4?A#10@#96G#102G#27@#88@#120???G#113O#14O#179C#121!25?G#134C#132C#14O#11!6?C#10CA??C$#23!9?_#46O!4?C#115_#144A#104A#122G#131!4?_#47C#157!28?@#69_#17!6?O#21A#120O#62A#52G$#83!10?_O#111_?__?OC#89!6?_#99!36?_#39G#130G#118O#57O$#24!11?G#92O!4?C#114G#113!44?O#132?G#60_$#48!12?G???A#141!48?C$#11!12?C#53G#22C#65G$#99!13?O#61G$#112!13?_-#0!7~#3q#10o#46p#91@#102_#115w#123}}}!9~{o_#17G#6O#18_#178@_#182G#183!14?_#52_#6_#75_!4?@#98A?A?@#113!4?A??O#3@ACG_$#4!7?L#11N#47G#92A#103O#116F#121@@#122@#132!9?@??_#39_#45@#19A#186@b!14~X#174B#53O#72O#111A!4?GG?CA@#143???@#125CG#5@ACG#4O$#48!9?E#95K#104G#131!13?AKO#90O#62??_#9G#184O#185!14?E#176C#166G#91G#104w?@?C??C#76@#48!6?@#18@??G#21_#8_$#142!10?o#110C#33!14?@#2@FN][#21O#185C#178!15?O#172F#94C#112@@??G??G#60!7?A#25A#11AC?O$#111!11?B#109!14?A#7A#48!4?C#179!16?G#127?@#107C#115}?G!4?G#61!7?C#24C#45GO$#70!27?C#177!4?A#148!18?A#121??o?O??OOGA?@@C?O?_#0@BF^!5~$#117!27?G#116!26?G??OO??C?@???G#62?G#87O#142_$#110!54?AC#99A#38@?@$#114!54?C#123!7_{}}{oo__$#122!55?O!5?O???AG$#102!55?A!4?A$#97!55?@??A$#103!57?CC$#36!58?@-#0!6~B#4@#11@#48@#91A#110S??_#111_#112_#131!11?@#108@#90A#186@BFFFNNN!5FB@@#10A#24@#7?@#72C#100_#112_!7?_??O?G#24_#19_??G#0_o{!5~$#3!6?{#5A#19A#53A#97c#99_#121K?OO!4?_!7?C#112_#102_#75g#17G#2O!7_!4ow{{}N#12A#75I#103O#116E!6?_?OO?G#53_#104G#52O#9_???@$#8!7?c#22c#59C#100W#102@#115R!4?_!11?W#104O#77O#28O#4_#3O!9?G!4?o#15C#76p#104H#115X#121_!4?_?O!5?C??@#3_OGB$#9!7?W#24G#82_#142@#103A#104_#122J??O!4?_!6?g#117C#105K#81C#34_#153G#177G#185G???G!5?A#162A#177@#17??G#107?E#122?F???_!9?A@#4_??C$#25!8?O#85G#114?G#123?CNNN!5^!6~Q#132A#159@#176A#179C#11??O#23O#25O#22O#19O#5O#175G#154G#45G?C#28!4?O#123???W~~~^^^!4NFFB@#23O??@$#86!9?O#116???O!4?__#183!20?G#172???C#29!5?_#110!11?_!7?A#8OGA$#107!13?_#103!49?_!5?C#18O#45C#11C$#91!64?_#60_?O?G#46G#87A#21A$#102!65?O#95O#92?G#115A#83C#94@$#114!68?C-#0!7~{wwooo!4_#100@!8?C#49__#29O??A#52G???C!7?C???G??_#107@A???A#22_!4?A#4C$#5!7?@?C??G!6?_#88A???C!5?@#22_#11_#4A??!6O?!4O#20G?O#51G!6?_#42O#40G#10_#5_O???A?@$#3!7?AC?G??OO??_#77A#107@???A!4?A#72C#66CA#15C#19O??G!9AG#5O#9O#8_#28@?O#99A?C?C#47_#53O#58G#11O???A$#8!8?A!7?O???_#71C???GGG???@#25O#5_?O#8A#18!9G!4?_#24_!8?O#25G???@$#18!8?@A?C#58A???C???G??O!8?G??C#48??!7C#10?A#55C#23G#61C#26A#71@!6?G#102A#70C#59C#3_OG??A?@$#46!9?@#9C??G???O#80C#40C??G#23_!9?C#3_!7?O!5?_B#41C#49O?___#100C!4?@#18G#0_ow{{}}!10~$#24!10?A??C#11G???O#54G#69C???G#33O!4?G#31G#6?@#2BB!11@BB#46?O#69A???O#50_#38O#110??@#75A#46C#20C??@$#84!10?@#4G???O??_#110?@#10_#116@!5?@#104@#30O#54O#9??O#0!13_#62C#37??C??O#116@??@#60???A#8G#9C??@$#48!11?A#20C!6?O#45?O#102A#37G!5?G#47_#24???G#21G#29!15?G#97@?C???C?A?@#52A#55@$#82!11?@#76@!4?A#103@#57??G#121?@#122!4@#68G#63!5?C#77!17?A??GG??C#85???@$#79!13?@!5?A???C!4?C#67!23?G???O#121@$#60!13?A#47C???G#112??@#43??O#115AA#99C#72!24?CG#115@!4?@$#81!14?A#53C!6?O??_???_!6?C!9?C#34!6?O#76G??G$#97!14?@#98@!5?A???C???A#79!23?C#112?A?A$#19!15?G!6?_#46?_#34?OOO??C@#114!23?A$#72!15?A#75A!5?C!7?A#122!25?@$#22!16?G???O#111???A#51?_#114A$#99!16?@#25G$#56!17?C-#0!20BAAA!9?A!16BAA!9?A!19B$#3!20?@@?AA!6?A!17?@?A!7?A$#5!22?@???A??A!20?@?A!4?A#4A?@$#8!23?@???AA??@#10!19?@#19@#8A??A??@$#11!24?@!5?@#22!22?@#9AA#23@#20@#11@$#4!25?A!4?A?@#24!21?@@$#19!25?@#21@#23@#22@#20@-\ \ No newline at end of file diff --git a/src/emulator/webpack.config.js b/src/emulator/webpack.config.js index feeb4b63..4093142c 100644 --- a/src/emulator/webpack.config.js +++ b/src/emulator/webpack.config.js @@ -15,7 +15,8 @@ module.exports = { }), new CopyPlugin({ patterns: [ - { from: 'benchmark', to: 'static' } + { from: 'benchmark', to: 'static' }, + { from: 'tux.sixel', to: 'static' }, ] }) ] diff --git a/src/phoenix/src/puter-shell/providers/EmuCommandProvider.js b/src/phoenix/src/puter-shell/providers/EmuCommandProvider.js index 2c1c069d..e59026ed 100644 --- a/src/phoenix/src/puter-shell/providers/EmuCommandProvider.js +++ b/src/phoenix/src/puter-shell/providers/EmuCommandProvider.js @@ -40,6 +40,7 @@ export class EmuCommandProvider { let prev_phase = 'init'; let progress_shown = false; let tux_enabled = false; + const leftpadd = 10; const on_message = message => { if ( message.$ !== 'status' ) { console.log('[!!] message from the emulator', message); @@ -53,21 +54,22 @@ export class EmuCommandProvider { if ( message.phase === 'ready' ) { if ( progress_shown ) { // show complete progress so it doesn't look weird - ctx.externs.out.write('\r[' + '='.repeat(ctx.env.COLS-2) + ']\n'); + ctx.externs.out.write(`\r\x1B[${leftpadd}C[` + + '='.repeat(ctx.env.COLS-2-leftpadd) + ']\n'); } p_ready.resolve(); return; } if ( message.phase !== prev_phase ) { progress_shown = false; - ctx.externs.out.write(`phase: ${message.phase}\n`); + ctx.externs.out.write(`\r\x1B[${leftpadd}Cphase: ${message.phase}\n`); prev_phase = message.phase; } if ( message.phase_progress ) { progress_shown = true; let w = ctx.env.COLS; - w -= 2; - ctx.externs.out.write('\r['); + w -= 2 + leftpadd; + ctx.externs.out.write(`\r\x1B[${leftpadd}C[`); const done = Math.floor(message.phase_progress * w); for ( let i=0 ; i < done ; i++ ) { ctx.externs.out.write('='); @@ -83,9 +85,12 @@ export class EmuCommandProvider { if ( conn.response.status.ready ) { p_ready.resolve(); } else { - tux_enabled = true; conn.response.status.$ = 'status'; - ctx.externs.out.write('\x1B[36;1mWaiting for emulator to be ready...\x1B[0m\n'); + ctx.externs.out.write(' Puter Linux is starting...\n'); + ctx.externs.out.write(' (Alpine Linux edge i686)\n'); + ctx.externs.out.write('\x1B[2A'); + ctx.externs.out.write(conn.response.logo + '\n'); + ctx.externs.out.write('\x1B[2A'); on_message(conn.response.status); } console.log('status from emu', conn.response); diff --git a/src/terminal/package.json b/src/terminal/package.json index 30ae9f62..76622333 100644 --- a/src/terminal/package.json +++ b/src/terminal/package.json @@ -19,7 +19,8 @@ "rollup-plugin-copy": "^3.4.0" }, "dependencies": { - "@xterm/xterm": "^5.5.0", - "@xterm/addon-fit": "^0.10.0" + "@xterm/addon-fit": "^0.10.0", + "@xterm/addon-image": "^0.8.0", + "@xterm/xterm": "^5.5.0" } } diff --git a/src/terminal/src/main.js b/src/terminal/src/main.js index cf7347f1..f80232e0 100644 --- a/src/terminal/src/main.js +++ b/src/terminal/src/main.js @@ -18,6 +18,7 @@ */ import { Terminal } from '@xterm/xterm'; import { FitAddon } from '@xterm/addon-fit'; +import { ImageAddon } from '@xterm/addon-image'; import { PTY } from './pty/PTY'; import { XDocumentANSIShell } from './pty/XDocumentANSIShell'; @@ -98,6 +99,8 @@ window.main_term = async () => { const term = new Terminal({ linkHandler, }); + const imageAddon = new ImageAddon(); + term.loadAddon(imageAddon); term.open(document.getElementById('terminal')); const fitAddon = new FitAddon();