mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 12:22:14 +03:00
Adiciona dashboard TUI com 7 abas (Overview, Combos, Providers, Keys, Logs, Health, Cost) via Ink, 13 componentes reutilizáveis em tui-components/, menu interativo ao iniciar sem subcomando, e flag --tui no comando dashboard.
13 lines
342 B
JavaScript
13 lines
342 B
JavaScript
import React from "react";
|
|
import { Text } from "ink";
|
|
|
|
export function KeyMaskedDisplay({ apiKey, revealed = false }) {
|
|
if (!apiKey) return <Text dimColor>(none)</Text>;
|
|
const display = revealed
|
|
? apiKey
|
|
: apiKey.length <= 8
|
|
? "***"
|
|
: `${apiKey.slice(0, 6)}***${apiKey.slice(-4)}`;
|
|
return <Text>{display}</Text>;
|
|
}
|