Skip to content

Commit

Permalink
Fix input (#3385)
Browse files Browse the repository at this point in the history
* doc

* fix: inputs

* fix: inputs

* fix: inputs

* fix: inputs
  • Loading branch information
c121914yu authored Dec 13, 2024
1 parent b596976 commit c41def5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docSite/content/zh-cn/docs/development/upgrading/4815.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ weight: 809

## 升级指南

- 更新 fastgpt 镜像 tag: v4.8.15-fix
- 更新 fastgpt 镜像 tag: v4.8.15-fix2
- 更新 fastgpt-pro 商业版镜像 tag: v4.8.15
- Sandbox 镜像,可以不更新

Expand Down
4 changes: 2 additions & 2 deletions files/docker/docker-compose-milvus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ services:
restart: always
fastgpt:
container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.8.15-fix # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix # 阿里云
image: ghcr.io/labring/fastgpt:v4.8.15-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix2 # 阿里云
ports:
- 3000:3000
networks:
Expand Down
4 changes: 2 additions & 2 deletions files/docker/docker-compose-pgvector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ services:
restart: always
fastgpt:
container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.8.15-fix # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix # 阿里云
image: ghcr.io/labring/fastgpt:v4.8.15-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix2 # 阿里云
ports:
- 3000:3000
networks:
Expand Down
4 changes: 2 additions & 2 deletions files/docker/docker-compose-zilliz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ services:
restart: always
fastgpt:
container_name: fastgpt
image: ghcr.io/labring/fastgpt:v4.8.15-fix # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix # 阿里云
image: ghcr.io/labring/fastgpt:v4.8.15-fix2 # git
# image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.8.15-fix2 # 阿里云
ports:
- 3000:3000
networks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,19 @@ type Props = {
const RenderInput = ({ flowInputList, nodeId, CustomComponent, mb = 5 }: Props) => {
const { feConfigs } = useSystemStore();

const filterInputs = useMemo(() => {
const filterProInputs = useMemo(() => {
return flowInputList.filter((input) => {
if (input.isPro && !feConfigs?.isPlus) return false;
return true;
});
}, [feConfigs?.isPlus, flowInputList]);

const filterInputs = useMemo(() => {
return filterProInputs.filter((input) => {
const renderType = input.renderTypeList?.[input.selectedTypeIndex || 0];
const isDynamic = !!input.canEdit;

if (renderType === FlowNodeInputTypeEnum.hidden && !isDynamic) return false;
if (renderType === FlowNodeInputTypeEnum.hidden || isDynamic) return false;

return true;
});
Expand All @@ -111,7 +116,7 @@ const RenderInput = ({ flowInputList, nodeId, CustomComponent, mb = 5 }: Props)
const Component = RenderList.find((item) => item.types.includes(renderType))?.Component;

if (!Component) return null;
return <Component inputs={filterInputs} item={input} nodeId={nodeId} />;
return <Component inputs={filterProInputs} item={input} nodeId={nodeId} />;
})();

return (
Expand Down

0 comments on commit c41def5

Please sign in to comment.