Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ export const JadePanelHeader = ({text, tips, shapeStatus, onClick, editable = tr
return (<>
<div className='panel-header'>
<span className='jade-panel-header-font'>{t(text)}</span>
<Popover
{tips && <Popover
content={tips}
align={{offset: [0, 3]}}
overlayClassName={'jade-custom-popover'}
>
<QuestionCircleOutlined className='jade-panel-header-popover-content'/>
<QuestionCircleOutlined className="jade-panel-header-popover-content"/>
</Popover>
}
{
editable ? (<>
<Button disabled={shapeStatus.disabled}
Expand All @@ -52,7 +53,7 @@ export const JadePanelHeader = ({text, tips, shapeStatus, onClick, editable = tr

JadePanelHeader.propTypes = {
text: PropTypes.string.isRequired,
tips: PropTypes.object.isRequired,
tips: PropTypes.object,
shapeStatus: PropTypes.object.isRequired,
onClick: PropTypes.func,
editable: PropTypes.bool,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import ArrayUtil from '@/components/util/ArrayUtil.js';
import {Checkbox, Collapse, Form} from 'antd';
import {Trans, useTranslation} from 'react-i18next';
import {useTranslation} from 'react-i18next';
import {useDispatch} from '@/components/DefaultRoot.jsx';
import {JadePanelHeader} from '@/components/common/JadePanelHeader.jsx';

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

// item被修改.
Expand All @@ -52,7 +48,7 @@ const _EndInputForm = ({inputParams, shapeStatus}) => {
return (<>
<Collapse bordered={false} className='jade-custom-collapse' defaultActiveKey={['Output variable']}>
<Panel
header={<JadePanelHeader text={'output'} tips={tips} shapeStatus={shapeStatus} onClick={addItem}/>}
header={<JadePanelHeader text={'output'} shapeStatus={shapeStatus} onClick={addItem}/>}
className='jade-panel'
key='Output variable'
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import {Col, Collapse, Form, Popover, Row} from "antd";
import React from "react";
import {QuestionCircleOutlined} from '@ant-design/icons';
import "./style.css";
import {OutputVariableRow} from "@/components/end/OutputVariableRow.jsx";
import {useDispatch} from "@/components/DefaultRoot.jsx";
import PropTypes from "prop-types";
import ArrayUtil from "@/components/util/ArrayUtil.js";
import {Trans, useTranslation} from "react-i18next";
import {Col, Collapse, Form, Row} from 'antd';
import React from 'react';
import './style.css';
import {OutputVariableRow} from '@/components/end/OutputVariableRow.jsx';
import {useDispatch} from '@/components/DefaultRoot.jsx';
import PropTypes from 'prop-types';
import ArrayUtil from '@/components/util/ArrayUtil.js';
import {useTranslation} from 'react-i18next';

const {Panel} = Collapse;

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


const tips =
<div className={"jade-font-size"} style={{lineHeight: "1.2"}}>
<Trans i18nKey="endOutputPopover" components={{p: <p/>}}/>
</div>;

return (
<div>
<Collapse bordered={false} className="jade-custom-collapse"
Expand All @@ -55,13 +48,6 @@ const _OutputVariable = ({inputParams, shapeStatus}) => {
<div
style={{display: 'flex', alignItems: 'center', justifyContent: "flex-start"}}>
<span className="jade-panel-header-font">{t('output')}</span>
<Popover
content={tips}
align={{offset: [0, 3]}}
overlayClassName={'jade-custom-popover'}
>
<QuestionCircleOutlined className="jade-panel-header-popover-content"/>
</Popover>
</div>
}
className="jade-panel"
Expand Down
1 change: 0 additions & 1 deletion framework/elsa/fit-elsa-react/src/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
"llmOutputPopover": "Content generated after the foundation model is executed.",
"modeSelect": "Mode",
"directlyOutputTheResult": "Directly output result",
"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>",
"conditionBranch": "Condition Branch",
"addBranch": "Add Branch",
"compareObject": "Compared Object",
Expand Down
1 change: 0 additions & 1 deletion framework/elsa/fit-elsa-react/src/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@
"llmOutputPopover": "大模型运行完成后生成的内容。",
"modeSelect": "模式选择",
"directlyOutputTheResult": "直接输出结果",
"endOutputPopover": "<p>这些变量将在机器人完成工作流调用后输出。</p>\n<p>在“返回变量”模式下,这些变量将由机器人汇总并回复给用户;</p>\n<p>在“直接回答”模式下,机器人将只回复配置卡时可以使用的变量。</p>",
"conditionBranch": "条件分支",
"addBranch": "添加分支",
"variable": "变量",
Expand Down