Save the role as an input when accepting

This commit is contained in:
2026-02-28 08:17:55 +00:00
parent 38a0ac436b
commit 66e9918e04
6 changed files with 85 additions and 53 deletions

View File

@@ -18,6 +18,8 @@ import { ActionWizardScreen } from './screens/action-wizard/ActionWizardScreen.j
import { InvitationScreen } from './screens/Invitation.js';
import { TransactionScreen } from './screens/Transaction.js';
import { MessageDialog } from './components/Dialog.js';
/**
* Props for the App component.
*/
@@ -107,28 +109,14 @@ function DialogOverlay(): React.ReactElement | null {
width="100%"
height="100%"
>
<Box
flexDirection="column"
borderStyle="double"
borderColor={borderColor}
paddingX={2}
paddingY={1}
width={60}
>
<Text color={borderColor} bold>
{dialog.type === 'error' ? '✗ Error' :
dialog.type === 'confirm' ? '? Confirm' :
' Info'}
</Text>
<Box marginY={1}>
<Text wrap="wrap">{dialog.message}</Text>
</Box>
<Text color={colors.textMuted}>
{dialog.type === 'confirm'
? 'Press Y to confirm, N or ESC to cancel'
: 'Press Enter or ESC to close'}
</Text>
</Box>
<MessageDialog
title={dialog.type === 'error' ? '✗ Error' :
dialog.type === 'confirm' ? '? Confirm' :
' Info'}
message={dialog.message}
onClose={dialog.onCancel ?? (() => {})}
type={dialog.type as 'error' | 'info' | 'success'}
/>
</Box>
);
}