diff --git a/web/app/components/app/overview/appCard.tsx b/web/app/components/app/overview/appCard.tsx index bb037b9b6e1f26..2c6d2d7733f9d4 100644 --- a/web/app/components/app/overview/appCard.tsx +++ b/web/app/components/app/overview/appCard.tsx @@ -247,6 +247,7 @@ function AppCard({ linkUrl="" onClose={() => setShowCustomizeModal(false)} appId={appInfo.id} + api_base_url={appInfo.api_base_url} mode={appInfo.mode} /> diff --git a/web/app/components/app/overview/customize/index.tsx b/web/app/components/app/overview/customize/index.tsx index 3b2506d3e20e01..7ed9ce942a5025 100644 --- a/web/app/components/app/overview/customize/index.tsx +++ b/web/app/components/app/overview/customize/index.tsx @@ -14,6 +14,7 @@ type IShareLinkProps = { isShow: boolean onClose: () => void linkUrl: string + api_base_url: string appId: string mode: AppMode } @@ -37,6 +38,7 @@ const CustomizeModal: FC = ({ isShow, onClose, appId, + api_base_url, mode, }) => { const { t } = useTranslation() @@ -64,30 +66,32 @@ const CustomizeModal: FC = ({ -
- 2 -
-
{t(`${prefixCustomize}.way1.step2`)}
-
{t(`${prefixCustomize}.way1.step2Tip`)}
-
-            export const APP_ID = '{appId}'
- export const API_KEY = {'\'\''} -
-
-
- 3 + 2
{t(`${prefixCustomize}.way1.step3`)}
-
{t(`${prefixCustomize}.way1.step3Tip`)}
+
{t(`${prefixCustomize}.way1.step2Tip`)}
+
+ 3 +
+
{t(`${prefixCustomize}.way1.step3`)}
+
{t(`${prefixCustomize}.way1.step3Tip`)}
+
+            NEXT_PUBLIC_APP_ID={`'${appId}'`} 
+ NEXT_PUBLIC_APP_KEY={'\'\''}
+ NEXT_PUBLIC_API_URL={`'${api_base_url}'`} +
+
+
+
{t(`${prefixCustomize}.way`)} 2 diff --git a/web/i18n/lang/app-overview.en.ts b/web/i18n/lang/app-overview.en.ts index e998c75f6c86fe..8abb5c58ef7232 100644 --- a/web/i18n/lang/app-overview.en.ts +++ b/web/i18n/lang/app-overview.en.ts @@ -77,11 +77,11 @@ const translation = { step1: 'Fork the client code and modify it', step1Tip: 'Click here to fork the source code into your GitHub account and modify the code', step1Operation: 'Dify-WebClient', - step2: 'Configure the Web', - step2Tip: 'Copy the Web API and APP ID,then paste them into the client code config/index.ts', - step3: 'Deploy to Vercel', - step3Tip: 'Click here to import the repository into Vercel and deploy', - step3Operation: 'Import repository', + step2: 'Deploy to Vercel', + step2Tip: 'Click here to import the repository into Vercel and deploy', + step2Operation: 'Import repository', + step3: 'Configure environment variables', + step3Tip: 'Add the following environment variables in Vercel', }, way2: { name: 'Write client-side code to call the API and deploy it to a server', diff --git a/web/i18n/lang/app-overview.zh.ts b/web/i18n/lang/app-overview.zh.ts index 306173cf7ea87c..8efde563f58255 100644 --- a/web/i18n/lang/app-overview.zh.ts +++ b/web/i18n/lang/app-overview.zh.ts @@ -77,11 +77,11 @@ const translation = { step1: 'Fork 客户端代码并修改', step1Tip: '点击此处 Fork 源码到你的 GitHub 中,然后修改代码', step1Operation: 'Dify-WebClient', - step2: '配置 Web APP', - step2Tip: '复制 Web API 秘钥 和 APP ID 拷贝到客户端代码 config/index.ts 中', - step3: '部署到 Vercel 中', - step3Tip: '点击此处将仓库导入到 Vercel 中部署', - step3Operation: '导入仓库', + step2: '部署到 Vercel 中', + step2Tip: '点击此处将仓库导入到 Vercel 中部署', + step2Operation: '导入仓库', + step3: '配置环境变量', + step3Tip: '在 Vecel 环境变量中添加以下环境变量', }, way2: { name: '编写客户端调用 API 并部署到服务器中',