portio
Version:
A beautiful terminal UI for managing processes on network ports (Windows only)
24 lines (23 loc) • 1.62 kB
JavaScript
import React from 'react';
import { Box, Text } from 'ink';
// Simple, static logo component without any image loading
const LogoComponent = ({ showText = true }) => {
if (!showText) {
return null;
}
const asciiTitle = [
'██████╗ ██████╗ ██████╗ ████████╗██╗ ██████╗ ',
'██╔══██╗██╔═══██╗██╔══██╗╚══██╔══╝██║██╔═══██╗',
'██████╔╝██║ ██║██████╔╝ ██║ ██║██║ ██║',
'██╔═══╝ ██║ ██║██╔══██╗ ██║ ██║██║ ██║',
'██║ ╚██████╔╝██║ ██║ ██║ ██║╚██████╔╝',
'╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ',
];
return (React.createElement(Box, { flexDirection: "column", alignItems: "center", marginBottom: 1 },
React.createElement(Box, { flexDirection: "column", alignItems: "center" },
asciiTitle.map((line, index) => (React.createElement(Text, { key: index, color: "cyan", bold: true }, line))),
React.createElement(Box, { marginTop: 1 },
React.createElement(Text, { color: "gray", italic: true }, "The port pal you've been waiting for")))));
};
// Memoize the component to prevent unnecessary re-renders
export const Logo = React.memo(LogoComponent);