diff --git a/packages/plugins/@nocobase/plugin-workflow-parallel/src/client/ParallelInstruction.tsx b/packages/plugins/@nocobase/plugin-workflow-parallel/src/client/ParallelInstruction.tsx index 689ff20c17..40baad818e 100644 --- a/packages/plugins/@nocobase/plugin-workflow-parallel/src/client/ParallelInstruction.tsx +++ b/packages/plugins/@nocobase/plugin-workflow-parallel/src/client/ParallelInstruction.tsx @@ -109,6 +109,8 @@ export default class extends Instruction { padding-top: 2em; > button { + line-height: 1; + .anticon { transform: rotate(45deg); } @@ -140,6 +142,7 @@ export default class extends Instruction { className={css` position: relative; top: 1em; + line-height: 1; transform-origin: center; transform: rotate(45deg); diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/components/DrawerDescription.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/components/DrawerDescription.tsx index ef27cb9dd5..a05c58f94f 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/components/DrawerDescription.tsx +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/components/DrawerDescription.tsx @@ -43,7 +43,7 @@ const useStyles = createStyles(({ css, token }) => { }); export function DrawerDescription(props) { - const { label, title, description } = props; + const { label, title, icon, description } = props; const { styles } = useStyles(); return ( @@ -51,7 +51,9 @@ export function DrawerDescription(props) {
{description}
: null} diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx index 00e2134c5a..5c1b676754 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx @@ -697,6 +697,7 @@ export function NodeDefaultView(props) { 'x-component-props': { label: lang('Node type'), title: instruction.title, + icon: instruction.icon, description: instruction.description, }, }, diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/style.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/style.tsx index 6b79fa639a..c8aadab908 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/style.tsx +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/style.tsx @@ -256,7 +256,7 @@ const useStyles = createStyles(({ css, token }) => { position: relative; width: 16em; background: ${token.colorBgContainer}; - padding: 1em; + padding: 0.75em; box-shadow: ${token.boxShadowTertiary}; border-radius: ${token.borderRadiusLG}px; cursor: pointer; @@ -266,7 +266,7 @@ const useStyles = createStyles(({ css, token }) => { box-shadow: ${token.boxShadow}; .workflow-node-remove-button { - display: block; + opacity: 1; } } @@ -275,11 +275,10 @@ const useStyles = createStyles(({ css, token }) => { } .workflow-node-remove-button { - display: none; - position: absolute; - right: 0; - top: 0; + opacity: 0; color: ${token.colorText}; + font-size: ${token.fontSizeIcon}px; + line-height: 1em; &[disabled] { display: none; @@ -325,9 +324,6 @@ const useStyles = createStyles(({ css, token }) => { nodeJobButtonClass: css` display: flex; - position: absolute; - top: 0; - right: 0; justify-content: center; align-items: center; color: ${token.colorTextLightSolid}; @@ -335,19 +331,27 @@ const useStyles = createStyles(({ css, token }) => { nodeHeaderClass: css` display: flex; + justify-content: space-between; + align-items: center; margin-bottom: 0.5em; .workflow-node-actions { - position: relative; } `, nodeMetaClass: css` flex-grow: 1; + display: flex; + align-items: center; + + .ant-tag { + max-width: 10em; + overflow: hidden; + text-overflow: ellipsis; + } .workflow-node-id { color: ${token.colorTextDescription}; - &:before { content: '#'; }