fix(plugin-workflow): adjust styles (#2417)

This commit is contained in:
Junyi 2023-08-09 11:13:09 +07:00 committed by GitHub
parent 86e672e9bb
commit 05239c8cfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 12 deletions

View File

@ -8,11 +8,12 @@ import {
useResourceActionContext,
useResourceContext,
} from '@nocobase/client';
import { str2moment } from '@nocobase/utils/client';
import { App, Breadcrumb, Button, Dropdown, Switch, message } from 'antd';
import classnames from 'classnames';
import React, { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Link, useNavigate } from 'react-router-dom';
import { CanvasContent } from './CanvasContent';
import { ExecutionLink } from './ExecutionLink';
import { FlowContext, useFlowContext } from './FlowContext';
@ -164,17 +165,16 @@ export function WorkflowCanvas() {
.map((item, index) => ({
key: `${item.id}`,
icon: item.current ? <RightOutlined /> : null,
className: cx({
executed: item.executed,
unexecuted: !item.executed,
enabled: item.enabled,
}),
label: (
<span
className={classnames({
executed: item.executed,
unexecuted: !item.executed,
enabled: item.enabled,
})}
>
<>
<strong>{`#${item.id}`}</strong>
<time>{new Date(item.createdAt).toLocaleString()}</time>
</span>
<time>{str2moment(item.createdAt).format('YYYY-MM-DD HH:mm:ss')}</time>
</>
),
})),
}}

View File

@ -57,11 +57,15 @@ const useStyles = createStyles(({ css, token }) => {
workflowVersionDropdownClass: css`
.ant-dropdown-menu-item {
justify-content: flex-end;
.ant-dropdown-menu-title-content {
display: flex;
align-items: baseline;
justify-content: flex-end;
text-align: right;
time {
margin-left: 0.5rem;
width: 14em;
color: ${token.colorText};
font-size: 80%;
}
@ -101,7 +105,6 @@ const useStyles = createStyles(({ css, token }) => {
time {
width: 12em;
margin-left: 0.5rem;
color: ${token.colorText};
font-size: 80%;
}