Merge branch 'next' into feat/new-workflow
This commit is contained in:
@@ -7,7 +7,10 @@ import {
|
||||
DeleteOutlined as DeleteOutlinedIcon,
|
||||
DownOutlined as DownOutlinedIcon,
|
||||
EllipsisOutlined as EllipsisOutlinedIcon,
|
||||
ExpandOutlined as ExpandOutlinedIcon,
|
||||
HistoryOutlined as HistoryOutlinedIcon,
|
||||
MinusOutlined as MinusOutlinedIcon,
|
||||
PlusOutlined as PlusOutlinedIcon,
|
||||
UndoOutlined as UndoOutlinedIcon,
|
||||
} from "@ant-design/icons";
|
||||
import { PageHeader } from "@ant-design/pro-components";
|
||||
@@ -37,6 +40,8 @@ const WorkflowDetail = () => {
|
||||
const [modalApi, ModalContextHolder] = Modal.useModal();
|
||||
const [notificationApi, NotificationContextHolder] = notification.useNotification();
|
||||
|
||||
const [scale, setScale] = useState(1);
|
||||
|
||||
const { id: workflowId } = useParams();
|
||||
const { workflow, initialized, ...workflowState } = useWorkflowStore(
|
||||
useZustandShallowSelector(["workflow", "initialized", "init", "destroy", "setEnabled", "release", "discard"])
|
||||
@@ -269,7 +274,7 @@ const WorkflowDetail = () => {
|
||||
<Alert banner message={<div className="truncate">{t("workflow.detail.orchestration.draft.alert")}</div>} type="warning" />
|
||||
</Show>
|
||||
</div>
|
||||
<div className="flex justify-end">
|
||||
<div className="flex justify-end ">
|
||||
<Space>
|
||||
<Button disabled={!allowRun} icon={<CaretRightOutlinedIcon />} loading={isRunning} type="primary" onClick={handleRunClick}>
|
||||
{t("workflow.detail.orchestration.action.run")}
|
||||
@@ -300,7 +305,14 @@ const WorkflowDetail = () => {
|
||||
</Space>
|
||||
</div>
|
||||
</div>
|
||||
<div className="px-12 py-8 max-md:px-4">
|
||||
<div className="fixed bottom-8 right-8 z-10 flex items-center gap-2 rounded-lg bg-white p-2 shadow-lg">
|
||||
<Button icon={<MinusOutlinedIcon />} disabled={scale <= 0.5} onClick={() => setScale((s) => Math.max(0.5, s - 0.1))} />
|
||||
<Typography.Text className="min-w-[3em] text-center">{Math.round(scale * 100)}%</Typography.Text>
|
||||
<Button icon={<PlusOutlinedIcon />} disabled={scale >= 2} onClick={() => setScale((s) => Math.min(2, s + 0.1))} />
|
||||
<Button icon={<ExpandOutlinedIcon />} onClick={() => setScale(1)} />
|
||||
</div>
|
||||
|
||||
<div className="size-full origin-top px-12 py-8 transition-transform duration-300 max-md:px-4" style={{ transform: `scale(${scale})` }}>
|
||||
<WorkflowElements />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user