diff --git a/webapp/src/components/AutomationEditor/index.tsx b/webapp/src/components/AutomationEditor/index.tsx index ba31e98..53ed85b 100644 --- a/webapp/src/components/AutomationEditor/index.tsx +++ b/webapp/src/components/AutomationEditor/index.tsx @@ -39,7 +39,8 @@ export const AutomationEditor: FC = ({ const [modalState, setModalState] = useState(null); const { classes } = useEditorStyles({ closeInfo, - horizontalMode: ratioWbh < 0.75 + horizontalMode: ratioWbh < 0.75, + autoChanged, }); // alias @@ -95,7 +96,7 @@ export const AutomationEditor: FC = ({ onChange={z => setZoomLevel(z.target.valueAsNumber ?? 40)} /> - {autoChanged !== 'unchanged' && } + Save + (theme => ({ wrapper: { display: 'flex', @@ -44,12 +45,18 @@ export const useEditorStyles = createAppUseStyles<{ flexDirection: "row", justifyContent: 'space-between', alignItems: "center", + padding: "0.5em", }, - saveBtn: { + saveBtn: ({ autoChanged }) => ({ display: "flex", + opacity: autoChanged === "changed" ? 1 : 0, + height: autoChanged === "changed" ? undefined : 0, + fontSize: autoChanged === "changed" ? undefined : 0, gap: '0.5em', maxHeight: '1em', justifyContent: 'center', alignItems: 'center', - } + borderColor: "#bf4 !important", + color: "#bf4 !important" + }), })) diff --git a/webapp/src/components/AutomationList/AutomationListBox.stories.tsx b/webapp/src/components/AutomationList/AutomationListBox.stories.tsx index 711e585..8617b16 100644 --- a/webapp/src/components/AutomationList/AutomationListBox.stories.tsx +++ b/webapp/src/components/AutomationList/AutomationListBox.stories.tsx @@ -1,7 +1,6 @@ import { ComponentMeta, ComponentStory } from "@storybook/react"; import { useState } from "react"; import { AutomationListBox } from "./AutomationListBox"; -import { NODE_HEIGHT, NODE_WIDTH, ADD_HEIGHT, ADD_WIDTH, CIRCLE_SIZE, DISTANCE_FACTOR } from 'components/DAGSvgs/constants'; import { createMockAuto } from "utils/mocks"; export default {