From 2d75c97ed1783331d8e12cd4f6456e88b80c73f6 Mon Sep 17 00:00:00 2001 From: WlodekM Date: Fri, 24 Jan 2025 17:38:33 +0200 Subject: working maelink client --- main.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'main.ts') diff --git a/main.ts b/main.ts index 82d54f8..4fe68ff 100644 --- a/main.ts +++ b/main.ts @@ -2,9 +2,19 @@ import LoginScreen from "./screen/login.ts"; import { build } from "./screenbuilder.ts"; import readline from 'node:readline'; +import * as client from "./client.ts" readline.emitKeypressEvents(process.stdin); if (process.stdin.isTTY) process.stdin.setRawMode(true); // makes the terminal send stdin without the user pressing enter -build(LoginScreen) \ No newline at end of file +let screen; +try { + screen = build(LoginScreen, client); + client.setScreen(screen) +} catch (error) { + console.error(error); + for (const log of screen?.logs ?? []) { + console.log(log) + } +} \ No newline at end of file -- cgit 1.4.1-2-gfad0