Fix: Updated color parsing functions and optimized component logic. (#10159)

### What problem does this PR solve?

refactor(timeline, modal, dataflow-result, dataset-overview): Updated
color parsing functions and optimized component logic.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-09-19 09:57:44 +08:00
committed by GitHub
parent 5c1791d7f0
commit f9c7404bee
16 changed files with 298 additions and 72 deletions

View File

@ -1,16 +1,45 @@
import { TimelineNode } from '@/components/originui/timeline';
import SvgIcon from '@/components/svg-icon';
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;
}
const RerunButton = (props: RerunButtonProps) => {
const { className, step, onRerun } = props;
const { t } = useTranslation();
const { loading } = useRerunDataflow();
const clickFunc = () => {
console.log('click rerun button');
Modal.show({
visible: true,
className: '!w-[560px]',
title: t('dataflowParser.confirmRerun'),
children: (
<div
dangerouslySetInnerHTML={{
__html: t('dataflowParser.confirmRerunModalContent', {
step: step?.title,
}),
}}
></div>
),
onVisibleChange: () => {
Modal.hide();
},
onOk: () => {
onRerun?.();
Modal.hide();
},
onCancel: () => {
Modal.hide();
},
});
};
return (
<div className="flex flex-col gap-2">