Add interactive SSH portfolio features
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ export function box(title, lines, width, theme = {}) {
|
||||
const titleText = ` ${truncate(title, inner - 2)} `; const topFill = Math.max(0, outer - titleText.length - 2);
|
||||
let output = `${color(muted, '╭─')}${color(primary, titleText)}${color(muted, `${'─'.repeat(topFill)}╮`)}\r\n`;
|
||||
for (const source of lines) {
|
||||
const wrapped = wrap(source, inner);
|
||||
const wrapped = visibleLength(source) <= inner ? [source] : wrap(source, inner);
|
||||
for (const line of wrapped) output += `${color(muted, '│')} ${line}${' '.repeat(Math.max(0, inner - visibleLength(line)))} ${color(muted, '│')}\r\n`;
|
||||
}
|
||||
return output + color(muted, `╰${'─'.repeat(outer - 2)}╯`);
|
||||
|
||||
Reference in New Issue
Block a user