fix(tui): enable clipboard hotkeys in mac input fields
This commit is contained in:
@@ -6,6 +6,7 @@ import type { AppLayoutProgressProps, AppLayoutProps } from '../app/interfaces.j
|
||||
import { $isBlocked } from '../app/overlayStore.js'
|
||||
import { $uiState } from '../app/uiStore.js'
|
||||
import { PLACEHOLDER } from '../content/placeholders.js'
|
||||
import { isMac } from '../lib/platform.js'
|
||||
import type { Theme } from '../theme.js'
|
||||
import type { DetailsMode } from '../types.js'
|
||||
|
||||
@@ -235,6 +236,7 @@ const ComposerPane = memo(function ComposerPane({
|
||||
<Box flexGrow={1} position="relative">
|
||||
<TextInput
|
||||
columns={Math.max(20, composer.cols - pw)}
|
||||
allowClipboardHotkeys={isMac}
|
||||
onChange={composer.updateInput}
|
||||
onPaste={composer.handleTextPaste}
|
||||
onSubmit={composer.submit}
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Box, Text } from '@hermes/ink'
|
||||
import { useState } from 'react'
|
||||
|
||||
import type { Theme } from '../theme.js'
|
||||
import { isMac } from '../lib/platform.js'
|
||||
|
||||
import { TextInput } from './textInput.js'
|
||||
|
||||
@@ -18,7 +19,7 @@ export function MaskedPrompt({ cols = 80, icon, label, onSubmit, sub, t }: Maske
|
||||
|
||||
<Box>
|
||||
<Text color={t.color.label}>{'> '}</Text>
|
||||
<TextInput columns={Math.max(20, cols - 6)} mask="*" onChange={setValue} onSubmit={onSubmit} value={value} />
|
||||
<TextInput columns={Math.max(20, cols - 6)} allowClipboardHotkeys={isMac} mask="*" onChange={setValue} onSubmit={onSubmit} value={value} />
|
||||
</Box>
|
||||
</Box>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user