fix(plugin-workflow): adjust styles (#2417)
This commit is contained in:
parent
86e672e9bb
commit
05239c8cfe
@ -8,11 +8,12 @@ import {
|
|||||||
useResourceActionContext,
|
useResourceActionContext,
|
||||||
useResourceContext,
|
useResourceContext,
|
||||||
} from '@nocobase/client';
|
} from '@nocobase/client';
|
||||||
|
import { str2moment } from '@nocobase/utils/client';
|
||||||
import { App, Breadcrumb, Button, Dropdown, Switch, message } from 'antd';
|
import { App, Breadcrumb, Button, Dropdown, Switch, message } from 'antd';
|
||||||
import classnames from 'classnames';
|
|
||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { Link, useNavigate } from 'react-router-dom';
|
import { Link, useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
import { CanvasContent } from './CanvasContent';
|
import { CanvasContent } from './CanvasContent';
|
||||||
import { ExecutionLink } from './ExecutionLink';
|
import { ExecutionLink } from './ExecutionLink';
|
||||||
import { FlowContext, useFlowContext } from './FlowContext';
|
import { FlowContext, useFlowContext } from './FlowContext';
|
||||||
@ -164,17 +165,16 @@ export function WorkflowCanvas() {
|
|||||||
.map((item, index) => ({
|
.map((item, index) => ({
|
||||||
key: `${item.id}`,
|
key: `${item.id}`,
|
||||||
icon: item.current ? <RightOutlined /> : null,
|
icon: item.current ? <RightOutlined /> : null,
|
||||||
label: (
|
className: cx({
|
||||||
<span
|
|
||||||
className={classnames({
|
|
||||||
executed: item.executed,
|
executed: item.executed,
|
||||||
unexecuted: !item.executed,
|
unexecuted: !item.executed,
|
||||||
enabled: item.enabled,
|
enabled: item.enabled,
|
||||||
})}
|
}),
|
||||||
>
|
label: (
|
||||||
|
<>
|
||||||
<strong>{`#${item.id}`}</strong>
|
<strong>{`#${item.id}`}</strong>
|
||||||
<time>{new Date(item.createdAt).toLocaleString()}</time>
|
<time>{str2moment(item.createdAt).format('YYYY-MM-DD HH:mm:ss')}</time>
|
||||||
</span>
|
</>
|
||||||
),
|
),
|
||||||
})),
|
})),
|
||||||
}}
|
}}
|
||||||
|
@ -57,11 +57,15 @@ const useStyles = createStyles(({ css, token }) => {
|
|||||||
|
|
||||||
workflowVersionDropdownClass: css`
|
workflowVersionDropdownClass: css`
|
||||||
.ant-dropdown-menu-item {
|
.ant-dropdown-menu-item {
|
||||||
|
justify-content: flex-end;
|
||||||
.ant-dropdown-menu-title-content {
|
.ant-dropdown-menu-title-content {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: flex-end;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|
||||||
time {
|
time {
|
||||||
margin-left: 0.5rem;
|
width: 14em;
|
||||||
color: ${token.colorText};
|
color: ${token.colorText};
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
}
|
}
|
||||||
@ -101,7 +105,6 @@ const useStyles = createStyles(({ css, token }) => {
|
|||||||
|
|
||||||
time {
|
time {
|
||||||
width: 12em;
|
width: 12em;
|
||||||
margin-left: 0.5rem;
|
|
||||||
color: ${token.colorText};
|
color: ${token.colorText};
|
||||||
font-size: 80%;
|
font-size: 80%;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user