| |
| |
| |
| |
| |
|
|
| import type React from 'react'; |
| import { Box, Text } from 'ink'; |
| import { Colors } from '../../colors.js'; |
| import type { SessionBrowserState } from '../SessionBrowser.js'; |
|
|
| const Kbd = ({ name, shortcut }: { name: string; shortcut: string }) => ( |
| <> |
| {name}: <Text bold>{shortcut}</Text> |
| </> |
| ); |
|
|
| |
| |
| |
| export const NavigationHelpDisplay = (): React.JSX.Element => ( |
| <Box flexDirection="column"> |
| <Text color={Colors.Gray}> |
| <Kbd name="Navigate" shortcut="↑/↓" /> |
| {' '} |
| <Kbd name="Resume" shortcut="Enter" /> |
| {' '} |
| <Kbd name="Search" shortcut="/" /> |
| {' '} |
| <Kbd name="Delete" shortcut="x" /> |
| {' '} |
| <Kbd name="Quit" shortcut="q" /> |
| </Text> |
| <Text color={Colors.Gray}> |
| <Kbd name="Sort" shortcut="s" /> |
| {' '} |
| <Kbd name="Reverse" shortcut="r" /> |
| {' '} |
| <Kbd name="First/Last" shortcut="g/G" /> |
| </Text> |
| </Box> |
| ); |
|
|
| |
| |
| |
| export const SearchModeDisplay = ({ |
| state, |
| }: { |
| state: SessionBrowserState; |
| }): React.JSX.Element => ( |
| <Box marginTop={1}> |
| <Text color={Colors.Gray}>Search: </Text> |
| <Text color={Colors.AccentPurple}>{state.searchQuery}</Text> |
| <Text color={Colors.Gray}> (Esc to cancel)</Text> |
| </Box> |
| ); |
|
|
| |
| |
| |
| export const NoResultsDisplay = ({ |
| state, |
| }: { |
| state: SessionBrowserState; |
| }): React.JSX.Element => ( |
| <Box marginTop={1}> |
| <Text color={Colors.Gray} dimColor> |
| No sessions found matching '{state.searchQuery}'. |
| </Text> |
| </Box> |
| ); |
|
|