From 7a0dbae3bb80dccf7ea8241474fc1cd175775843 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Tue, 24 Jan 2023 17:49:04 +0000 Subject: [PATCH] Update file executable_install-program --- home/dot_local/bin/executable_install-program | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index c154758b..c6cf1719 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -49,14 +49,18 @@ const figures = isUnicodeSupported() ? figuresDefault : figuresFallback function log(type, label, msg) { let icon, message + let fittedLabel = label + while(fittedLabel.length < 14) { + fittedLabel = fittedLabel.length % 2 === 1 ? fittedLabel + ' ' : ' ' + fittedLabel + } if (type === 'info') { - icon = `${chalk.cyanBright(figures.pointer)} ${chalk.bold.white.bgCyan(' ' + label.padStart(label.length / 2 + 4, ' ').padEnd(label.length / 2 + 4, ' ') + ' ')}` + icon = `${chalk.cyanBright(figures.pointer)} ${chalk.bold.white.bgCyan(' ' + fittedLabel + ' ')}` message = wrapMessage(msg) } else if (type === 'star') { - icon = `${chalk.yellow(figures.star)} ${chalk.bold.black.bgYellow(' ' + label.padStart(label.length / 2 + 4, ' ').padEnd(label.length / 2 + 4, ' ') + ' ')}` + icon = `${chalk.yellow(figures.star)} ${chalk.bold.black.bgYellow(' ' + fittedLabel + ' ')}` message = wrapMessage(msg) } else if (type === 'success') { - icon = `${chalk.greenBright(figures.play)} ${chalk.bold.white.bgGreenBright(' ' + label.padStart(label.length / 2 + 4, ' ').padEnd(label.length / 2 + 4, ' ') + ' ')}` + icon = `${chalk.greenBright(figures.play)} ${chalk.bold.white.bgGreenBright(' ' + fittedLabel + ' ')}` message = wrapMessage(msg) } else if (type === 'warn') { icon = `${chalk.yellowBright(figures.lozenge)} ${chalk.bold.black.bgYellowBright(' WARNING ')}`