mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
### What problem does this PR solve? Fix: Optimized the timeline component and parser editing features #9869 - Introduced the TimelineNodeType type, restructured the timeline node structure, and supported dynamic node generation - Enhanced the FormatPreserveEditor component to support editing and line wrapping of JSON-formatted content - Added a rerun function and loading state to the parser and splitter components - Adjusted the timeline style and interaction logic to enhance the user experience - Improved the modal component and added a destroy method to support more flexible control - Optimized the chunk result display and operation logic, supporting batch deletion and selection ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -4,16 +4,15 @@ import { Button } from '@/components/ui/button';
|
||||
import { Modal } from '@/components/ui/modal/modal';
|
||||
import { CircleAlert } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useRerunDataflow } from '../../hooks';
|
||||
interface RerunButtonProps {
|
||||
className?: string;
|
||||
step?: TimelineNode;
|
||||
onRerun?: () => void;
|
||||
loading?: boolean;
|
||||
}
|
||||
const RerunButton = (props: RerunButtonProps) => {
|
||||
const { className, step, onRerun } = props;
|
||||
const { className, step, onRerun, loading } = props;
|
||||
const { t } = useTranslation();
|
||||
const { loading } = useRerunDataflow();
|
||||
const clickFunc = () => {
|
||||
console.log('click rerun button');
|
||||
Modal.show({
|
||||
@ -29,15 +28,15 @@ const RerunButton = (props: RerunButtonProps) => {
|
||||
}}
|
||||
></div>
|
||||
),
|
||||
onVisibleChange: () => {
|
||||
Modal.hide();
|
||||
},
|
||||
onOk: () => {
|
||||
onRerun?.();
|
||||
Modal.hide();
|
||||
},
|
||||
onCancel: () => {
|
||||
Modal.hide();
|
||||
okText: t('modal.okText'),
|
||||
cancelText: t('modal.cancelText'),
|
||||
onVisibleChange: (visible: boolean) => {
|
||||
if (!visible) {
|
||||
Modal.destroy();
|
||||
} else {
|
||||
onRerun?.();
|
||||
Modal.destroy();
|
||||
}
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user