Ajout du portfolio dans les projets, et ajout d'un clear complet à la fermeture
This commit is contained in:
parent
62b221918f
commit
ae9cbbf3e9
2 changed files with 14 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
4
index.ts
4
index.ts
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue