summary refs log tree commit diff
path: root/main.ts
diff options
context:
space:
mode:
authorWlodekM <[email protected]>2025-01-24 17:38:33 +0200
committerWlodekM <[email protected]>2025-01-24 18:03:39 +0200
commit2d75c97ed1783331d8e12cd4f6456e88b80c73f6 (patch)
tree6271da5dc479d9f8cee8f4459194d55acb6c41a5 /main.ts
parent5deacee61b572d7a83225073567b4758d1854adf (diff)
working maelink client
Diffstat (limited to 'main.ts')
-rw-r--r--main.ts12
1 files changed, 11 insertions, 1 deletions
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