From dbd638766bfe27e44ea940b16021cd41edc0dc80 Mon Sep 17 00:00:00 2001 From: satr14 Date: Fri, 24 Jul 2026 17:30:27 +0700 Subject: [PATCH] quotes --- src/components.ts | 11 ++++++++++- src/index.ts | 22 +++++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/components.ts b/src/components.ts index 3bddcbf..84d5da5 100644 --- a/src/components.ts +++ b/src/components.ts @@ -1,7 +1,16 @@ import * as t from "@opentui/core"; +const motd = [ + '"please provide a website preview"', + 'do you lack reading comprehension?', + 'don\'t forget the pr checklist!', + 'please don\'t use ai...', + 'read the f-ing docs', + 'looks good to me!', +]; + export const tittle = t.Box( { justifyContent: "center", alignItems: "flex-end" }, t.ASCIIFont({ font: "tiny", text: "PR-Skimmer" }), - t.Text({ content: '"LGTM!"', attributes: t.TextAttributes.DIM }), + t.Text({ content: motd[Math.floor(Math.random() * motd.length)], attributes: t.TextAttributes.DIM }), ); \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 9180869..1579215 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +import { createOAuthDeviceAuth } from "@octokit/auth-oauth-device"; import * as t from "@opentui/core"; import { tittle } from "./components"; @@ -8,17 +9,20 @@ const renderer = await t.createCliRenderer({ sizePercent: 30, }, }); + +const container = t.Box( + { alignItems: "center", justifyContent: "center", padding: 1, flexGrow: 1 }, + tittle, +); +renderer.root.add(container); + const keyHandler = renderer.keyInput keyHandler.on("keypress", (key) => { console.log(`Key pressed: ${key.name}`); + switch (key.name) { + case "=": + renderer.console.toggle(); + break; + } }); - -renderer.root.add( - t.Box( - { alignItems: "center", justifyContent: "center", padding: 1, flexGrow: 1 }, - tittle, - ), -); - -renderer.console.toggle(); \ No newline at end of file