Ajout du portfolio dans les projets, et ajout d'un clear complet à la fermeture

This commit is contained in:
Feror 2025-03-12 11:38:30 +01:00
parent 62b221918f
commit ae9cbbf3e9
2 changed files with 14 additions and 2 deletions

View file

@ -25,6 +25,18 @@ const Projects = ({ width, height, scrollPosition }: ProjectsProps) => {
technologies: ["js", "Bun", "Docker"],
learnMoreLink: "https://github.com/Bing-Chill-inc/Algoforge-main",
},
{
title: "ssh Portfolio",
description:
`The portfolio you are currently browsing.${newLine}` +
`Built with the Bun javascript runtime.${newLine}` +
`This portfolio works by simulating an ssh server,${newLine}` +
`on which your terminal connects as a pty.${newLine}` +
`Then, the server receives inputs and writes outputs.${newLine}` +
`This is a fun way to showcase my projects.${newLine}`,
technologies: ["ts", "Bun", "ssh2"],
learnMoreLink: "https://forge.feror.fr/feror/Portfolio",
},
];
return ScrollComponent({
width,

View file

@ -1,7 +1,7 @@
import { Server, type ServerChannel } from "ssh2";
import Front, { newLine } from "./front";
import { eraseScreen, cursorTo, cursorHide, cursorShow } from "ansi-escapes";
import { eraseScreen, cursorTo, cursorHide, cursorShow, clearTerminal } from "ansi-escapes";
import ContactForm from "./contact/ContactForm";
const inputCodes = {
@ -122,7 +122,7 @@ const server = new Server(
cmdAsInt == inputCodes.int8.ctrlC ||
(cmdAsInt === inputCodes.int8.q && userSpecs.userName !== "contact")
) {
userWindow.stream?.write(eraseScreen);
userWindow.stream?.write(clearTerminal);
userWindow.stream?.write(cursorTo(0, 0));
stream.write("Goodbye!\n");
stream.write(cursorShow);