fjtui/test-header.ts

11 lines
410 B
TypeScript
Raw Normal View History

2026-06-01 03:01:08 +00:00
import chalk from 'chalk';
import stripAnsi from 'strip-ansi';
const cols = 80;
const rightHeader = `repo: ${chalk.bold.cyan(`builderadmin/PublicProject`)} `;
const rightLen = stripAnsi(rightHeader).length;
const leftHeader = ` Forgejo Issue Explorer`;
const leftLen = stripAnsi(leftHeader).length;
let spacesCount = cols - leftLen - rightLen;
console.log(leftHeader + ' '.repeat(spacesCount) + rightHeader);