mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? feat: Add FeedbackModal #2088 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
37
web/src/components/message-item/feedback-modal.tsx
Normal file
37
web/src/components/message-item/feedback-modal.tsx
Normal file
@ -0,0 +1,37 @@
|
||||
import { Form, Input, Modal } from 'antd';
|
||||
|
||||
import { IModalProps } from '@/interfaces/common';
|
||||
|
||||
type FieldType = {
|
||||
username?: string;
|
||||
};
|
||||
|
||||
const FeedbackModal = ({ visible, hideModal }: IModalProps<any>) => {
|
||||
const [form] = Form.useForm();
|
||||
|
||||
const handleOk = async () => {
|
||||
const ret = await form.validateFields();
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal title="Feedback" open={visible} onOk={handleOk} onCancel={hideModal}>
|
||||
<Form
|
||||
name="basic"
|
||||
labelCol={{ span: 0 }}
|
||||
wrapperCol={{ span: 24 }}
|
||||
style={{ maxWidth: 600 }}
|
||||
autoComplete="off"
|
||||
form={form}
|
||||
>
|
||||
<Form.Item<FieldType>
|
||||
name="username"
|
||||
rules={[{ required: true, message: 'Please input your username!' }]}
|
||||
>
|
||||
<Input.TextArea rows={8} placeholder="Please input your username!" />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default FeedbackModal;
|
||||
Reference in New Issue
Block a user