- Refinement of the chat client to have better visible clues for user vs chatbot messages
- Introduction of interview_phase and normal phase in TRAICIE_SELECTION_SPECIALIST to make interaction with bot more human. - More and random humanised messages to TRAICIE_SELECTION_SPECIALIST
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
:required="field.required"
|
||||
:placeholder="field.placeholder || ''"
|
||||
:title="description"
|
||||
@keydown.enter="handleEnterKey"
|
||||
style="width: 100%; padding: 8px; border-radius: 4px; border: 1px solid #ddd; box-sizing: border-box;"
|
||||
>
|
||||
|
||||
@@ -37,6 +38,7 @@
|
||||
:step="stepValue"
|
||||
:placeholder="field.placeholder || ''"
|
||||
:title="description"
|
||||
@keydown.enter="handleEnterKey"
|
||||
style="width: 100%; padding: 8px; border-radius: 4px; border: 1px solid #ddd; box-sizing: border-box;"
|
||||
>
|
||||
|
||||
@@ -49,6 +51,7 @@
|
||||
:rows="field.rows || 3"
|
||||
:placeholder="field.placeholder || ''"
|
||||
:title="description"
|
||||
@keydown="handleTextareaKeydown"
|
||||
style="width: 100%; padding: 8px; border-radius: 4px; border: 1px solid #ddd; box-sizing: border-box; resize: vertical;"
|
||||
></textarea>
|
||||
|
||||
@@ -196,7 +199,7 @@ export default {
|
||||
default: null
|
||||
}
|
||||
},
|
||||
emits: ['update:modelValue', 'open-privacy-modal', 'open-terms-modal'],
|
||||
emits: ['update:modelValue', 'open-privacy-modal', 'open-terms-modal', 'keydown-enter'],
|
||||
setup() {
|
||||
// Consent text constants (English base)
|
||||
const consentTexts = {
|
||||
@@ -321,6 +324,25 @@ export default {
|
||||
openTermsModal(event) {
|
||||
event.preventDefault();
|
||||
this.$emit('open-terms-modal');
|
||||
},
|
||||
|
||||
// Handle Enter key press for text and number inputs
|
||||
handleEnterKey(event) {
|
||||
console.log('FormField: Enter pressed in field:', this.fieldId);
|
||||
event.preventDefault();
|
||||
this.$emit('keydown-enter');
|
||||
},
|
||||
|
||||
// Handle keydown for textarea (Enter to submit, Shift+Enter for line breaks)
|
||||
handleTextareaKeydown(event) {
|
||||
console.log('FormField: Textarea keydown in field:', this.fieldId, 'Key:', event.key, 'Ctrl:', event.ctrlKey, 'Shift:', event.shiftKey);
|
||||
if (event.key === 'Enter' && !event.shiftKey) {
|
||||
// Plain Enter submits the form
|
||||
console.log('FormField: Textarea Enter triggered for field:', this.fieldId);
|
||||
event.preventDefault();
|
||||
this.$emit('keydown-enter');
|
||||
}
|
||||
// Shift+Enter allows line breaks in textarea
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -462,7 +484,6 @@ export default {
|
||||
.field-context {
|
||||
margin-bottom: 8px;
|
||||
font-size: 0.9rem;
|
||||
color: #666;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
text-align: left;
|
||||
|
||||
Reference in New Issue
Block a user