quotes
This commit is contained in:
parent
57269328b8
commit
dbd638766b
2 changed files with 23 additions and 10 deletions
|
|
@ -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 }),
|
||||
);
|
||||
22
src/index.ts
22
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();
|
||||
Loading…
Add table
Add a link
Reference in a new issue