diff --git a/web/public/locales/en/translation.json b/web/public/locales/en/translation.json index 00de178d..d9a76807 100644 --- a/web/public/locales/en/translation.json +++ b/web/public/locales/en/translation.json @@ -139,7 +139,8 @@ "DeployChangelog": "Input the description of this function modification (optional)", "MoveFunctionTip": "Are you sure to move {{srcFunc}} to {{targetDir}} directory?", "MoveFunctionToRootTip": "Are you sure to move {{srcFunc}} to the root directory?", - "MovingFunction": "Moving functions..." + "MovingFunction": "Moving functions...", + "DependenceInstallTip": "Please wait for the completion of dependencies installation after saving. Check the progress in \"Logs\"" }, "HomePanel": { "APP": "Android or iOS app", diff --git a/web/public/locales/zh-CN/translation.json b/web/public/locales/zh-CN/translation.json index df6c9fa4..38076f8e 100644 --- a/web/public/locales/zh-CN/translation.json +++ b/web/public/locales/zh-CN/translation.json @@ -139,7 +139,8 @@ "DeployChangelog": "输入此次函数修改的描述 (可选)", "MoveFunctionTip": "是否要将 {{srcFunc}} 移动到 {{targetDir}} 目录?", "MoveFunctionToRootTip": "是否要将 {{srcFunc}} 移动到根目录?", - "MovingFunction": "移动函数中..." + "MovingFunction": "移动函数中...", + "DependenceInstallTip": "保存后请等待依赖安装完成,在「日志」查看安装进度" }, "HomePanel": { "APP": "Android or iOS 应用", diff --git a/web/public/locales/zh/translation.json b/web/public/locales/zh/translation.json index 12a2f69e..cb6c014b 100644 --- a/web/public/locales/zh/translation.json +++ b/web/public/locales/zh/translation.json @@ -139,7 +139,8 @@ "DeployChangelog": "输入此次函数修改的描述 (可选)", "MoveFunctionTip": "是否要将 {{srcFunc}} 移动到 {{targetDir}} 目录?", "MoveFunctionToRootTip": "是否要将 {{srcFunc}} 移动到根目录?", - "MovingFunction": "移动函数中..." + "MovingFunction": "移动函数中...", + "DependenceInstallTip": "保存后请等待依赖安装完成,在「日志」查看安装进度" }, "HomePanel": { "APP": "Android or iOS 应用", diff --git a/web/src/pages/app/functions/mods/DependencePanel/AddDependenceModal/index.tsx b/web/src/pages/app/functions/mods/DependencePanel/AddDependenceModal/index.tsx index 5e2645c4..d56d5b09 100644 --- a/web/src/pages/app/functions/mods/DependencePanel/AddDependenceModal/index.tsx +++ b/web/src/pages/app/functions/mods/DependencePanel/AddDependenceModal/index.tsx @@ -1,11 +1,12 @@ import { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; -import { AddIcon, ExternalLinkIcon, SearchIcon, SmallCloseIcon } from "@chakra-ui/icons"; +import { AddIcon, ExternalLinkIcon, InfoOutlineIcon, SearchIcon, SmallCloseIcon } from "@chakra-ui/icons"; import { Box, Button, Center, Checkbox, + HStack, Input, InputGroup, InputLeftElement, @@ -335,37 +336,45 @@ const AddDependenceModal = () => { )} - - {checkList.length > 0 && ( - + + + + {t("FunctionPanel.DependenceInstallTip")} + + + + {checkList.length > 0 && ( + { + if (!isEdit) { + setIsShowChecked((pre) => !pre); + } + }} + > + {t("FunctionPanel.Select")}: + + {isEdit ? ( + packageList.length + ) : isShowChecked ? ( + + ) : ( + checkList.length + )} + + + )} + + + {t("Save")} + + diff --git a/web/src/pages/app/storages/store.ts b/web/src/pages/app/storages/store.ts index cf92c337..6ec367ef 100644 --- a/web/src/pages/app/storages/store.ts +++ b/web/src/pages/app/storages/store.ts @@ -65,7 +65,7 @@ const useStorageStore = create()( getFilePath: (bucket: string, file: string) => { const currentApp = useGlobalStore.getState().currentApp; - return `${currentApp.storage.endpoint}/${bucket}${formatPort(currentApp?.port)}/${file}`; + return `${currentApp.storage.endpoint}/${bucket}/${file}`; }, })), ),