fix:button fix
This commit is contained in:
parent
836b8032ae
commit
3df83f04a4
3 changed files with 7 additions and 10 deletions
|
|
@ -1025,7 +1025,9 @@ const PageRenderer: React.FC<PageRendererProps> = ({
|
|||
const hasFileManagement = !!(hookData.handleFileUpload && hookData.workflowFiles !== undefined);
|
||||
|
||||
// Check if we have chatbot file upload (simpler style with uploadedFiles)
|
||||
const hasChatbotFileUpload = !!(hookData.handleFileUpload && hookData.uploadedFiles !== undefined);
|
||||
// Also check if file upload is enabled in config (default: true)
|
||||
const showFileUpload = config.showFileUpload !== false; // Default to true if not specified
|
||||
const hasChatbotFileUpload = showFileUpload && !!(hookData.handleFileUpload && hookData.uploadedFiles !== undefined);
|
||||
|
||||
// Check RBAC permissions for prompt selector and workflow mode selector
|
||||
// Show prompt selector if user has permission to view/read prompts (even if no prompts exist yet)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,8 @@ export const chatbotPageData: GenericPageData = {
|
|||
buttonVariant: 'primary',
|
||||
stopButtonVariant: 'danger',
|
||||
buttonSize: 'md',
|
||||
textFieldSize: 'md'
|
||||
textFieldSize: 'md',
|
||||
showFileUpload: false
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
@ -66,14 +67,7 @@ export const chatbotPageData: GenericPageData = {
|
|||
preload: true,
|
||||
moduleEnabled: true,
|
||||
|
||||
// Drag and drop configuration
|
||||
dragDropConfig: {
|
||||
enabled: true,
|
||||
accept: '*/*', // Accept all file types
|
||||
multiple: true, // Allow multiple files
|
||||
overlayText: 'Drop files here to attach',
|
||||
overlaySubtext: 'You can also click the upload button'
|
||||
},
|
||||
|
||||
|
||||
// Lifecycle hooks
|
||||
onActivate: async () => {
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ export interface InputFormConfig {
|
|||
stopButtonVariant?: 'primary' | 'secondary' | 'danger' | 'success' | 'warning'; // Variant for stop button
|
||||
buttonSize?: 'sm' | 'md' | 'lg';
|
||||
textFieldSize?: 'sm' | 'md' | 'lg';
|
||||
showFileUpload?: boolean; // Whether to show file upload button (default: true if hook provides file upload)
|
||||
}
|
||||
|
||||
// Settings field configuration
|
||||
|
|
|
|||
Loading…
Reference in a new issue