Skip to content

Commit 3bf7f99

Browse files
authored
[elsa] 去除结束节点直接输出结果中输出的popover (ModelEngine-Group#55)
1 parent 1c8b810 commit 3bf7f99

File tree

5 files changed

+14
-33
lines changed

5 files changed

+14
-33
lines changed

framework/elsa/fit-elsa-react/src/components/common/JadePanelHeader.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ export const JadePanelHeader = ({text, tips, shapeStatus, onClick, editable = tr
2727
return (<>
2828
<div className='panel-header'>
2929
<span className='jade-panel-header-font'>{t(text)}</span>
30-
<Popover
30+
{tips && <Popover
3131
content={tips}
3232
align={{offset: [0, 3]}}
3333
overlayClassName={'jade-custom-popover'}
3434
>
35-
<QuestionCircleOutlined className='jade-panel-header-popover-content'/>
35+
<QuestionCircleOutlined className="jade-panel-header-popover-content"/>
3636
</Popover>
37+
}
3738
{
3839
editable ? (<>
3940
<Button disabled={shapeStatus.disabled}
@@ -52,7 +53,7 @@ export const JadePanelHeader = ({text, tips, shapeStatus, onClick, editable = tr
5253

5354
JadePanelHeader.propTypes = {
5455
text: PropTypes.string.isRequired,
55-
tips: PropTypes.object.isRequired,
56+
tips: PropTypes.object,
5657
shapeStatus: PropTypes.object.isRequired,
5758
onClick: PropTypes.func,
5859
editable: PropTypes.bool,

framework/elsa/fit-elsa-react/src/components/end/EndInputForm.jsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import React from 'react';
99
import PropTypes from 'prop-types';
1010
import ArrayUtil from '@/components/util/ArrayUtil.js';
1111
import {Checkbox, Collapse, Form} from 'antd';
12-
import {Trans, useTranslation} from 'react-i18next';
12+
import {useTranslation} from 'react-i18next';
1313
import {useDispatch} from '@/components/DefaultRoot.jsx';
1414
import {JadePanelHeader} from '@/components/common/JadePanelHeader.jsx';
1515

@@ -26,10 +26,6 @@ const {Panel} = Collapse;
2626
const _EndInputForm = ({inputParams, shapeStatus}) => {
2727
const dispatch = useDispatch();
2828
const {t} = useTranslation();
29-
const tips =
30-
<div className={'jade-font-size'} style={{lineHeight: '1.2'}}>
31-
<Trans i18nKey='endOutputPopover' components={{p: <p/>}}/>
32-
</div>;
3329
const enableLog = inputParams.find(item => item.name === 'enableLog');
3430

3531
// item被修改.
@@ -52,7 +48,7 @@ const _EndInputForm = ({inputParams, shapeStatus}) => {
5248
return (<>
5349
<Collapse bordered={false} className='jade-custom-collapse' defaultActiveKey={['Output variable']}>
5450
<Panel
55-
header={<JadePanelHeader text={'output'} tips={tips} shapeStatus={shapeStatus} onClick={addItem}/>}
51+
header={<JadePanelHeader text={'output'} shapeStatus={shapeStatus} onClick={addItem}/>}
5652
className='jade-panel'
5753
key='Output variable'
5854
>

framework/elsa/fit-elsa-react/src/components/end/OutputVariable.jsx

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
* Licensed under the MIT License. See License.txt in the project root for license information.
55
*--------------------------------------------------------------------------------------------*/
66

7-
import {Col, Collapse, Form, Popover, Row} from "antd";
8-
import React from "react";
9-
import {QuestionCircleOutlined} from '@ant-design/icons';
10-
import "./style.css";
11-
import {OutputVariableRow} from "@/components/end/OutputVariableRow.jsx";
12-
import {useDispatch} from "@/components/DefaultRoot.jsx";
13-
import PropTypes from "prop-types";
14-
import ArrayUtil from "@/components/util/ArrayUtil.js";
15-
import {Trans, useTranslation} from "react-i18next";
7+
import {Col, Collapse, Form, Row} from 'antd';
8+
import React from 'react';
9+
import './style.css';
10+
import {OutputVariableRow} from '@/components/end/OutputVariableRow.jsx';
11+
import {useDispatch} from '@/components/DefaultRoot.jsx';
12+
import PropTypes from 'prop-types';
13+
import ArrayUtil from '@/components/util/ArrayUtil.js';
14+
import {useTranslation} from 'react-i18next';
1615

1716
const {Panel} = Collapse;
1817

@@ -38,12 +37,6 @@ const _OutputVariable = ({inputParams, shapeStatus}) => {
3837
dispatch({type: "editOutputVariable", id: id, changes: changes});
3938
};
4039

41-
42-
const tips =
43-
<div className={"jade-font-size"} style={{lineHeight: "1.2"}}>
44-
<Trans i18nKey="endOutputPopover" components={{p: <p/>}}/>
45-
</div>;
46-
4740
return (
4841
<div>
4942
<Collapse bordered={false} className="jade-custom-collapse"
@@ -55,13 +48,6 @@ const _OutputVariable = ({inputParams, shapeStatus}) => {
5548
<div
5649
style={{display: 'flex', alignItems: 'center', justifyContent: "flex-start"}}>
5750
<span className="jade-panel-header-font">{t('output')}</span>
58-
<Popover
59-
content={tips}
60-
align={{offset: [0, 3]}}
61-
overlayClassName={'jade-custom-popover'}
62-
>
63-
<QuestionCircleOutlined className="jade-panel-header-popover-content"/>
64-
</Popover>
6551
</div>
6652
}
6753
className="jade-panel"

framework/elsa/fit-elsa-react/src/en_US.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
"llmOutputPopover": "Content generated after the foundation model is executed.",
112112
"modeSelect": "Mode",
113113
"directlyOutputTheResult": "Directly output result",
114-
"endOutputPopover": "<p>These variables will be output after the bot calls the workflow. </p>\n<p>In variable return mode, the bot summarizes these variables and replies to the user.</p>\n<p> In direct answer mode, the bot replies only variables that can be used when the card is configured.</p>",
115114
"conditionBranch": "Condition Branch",
116115
"addBranch": "Add Branch",
117116
"compareObject": "Compared Object",

framework/elsa/fit-elsa-react/src/zh_CN.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,6 @@
403403
"llmOutputPopover": "大模型运行完成后生成的内容。",
404404
"modeSelect": "模式选择",
405405
"directlyOutputTheResult": "直接输出结果",
406-
"endOutputPopover": "<p>这些变量将在机器人完成工作流调用后输出。</p>\n<p>在“返回变量”模式下,这些变量将由机器人汇总并回复给用户;</p>\n<p>在“直接回答”模式下,机器人将只回复配置卡时可以使用的变量。</p>",
407406
"conditionBranch": "条件分支",
408407
"addBranch": "添加分支",
409408
"variable": "变量",

0 commit comments

Comments
 (0)