Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
94d7babb
Unverified
Commit
94d7babb
authored
Nov 08, 2023
by
crazywoola
Committed by
GitHub
Nov 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update the docs in forking applications (#1491)
parent
306216db
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
24 deletions
+29
-24
appCard.tsx
web/app/components/app/overview/appCard.tsx
+1
-0
index.tsx
web/app/components/app/overview/customize/index.tsx
+18
-14
app-overview.en.ts
web/i18n/lang/app-overview.en.ts
+5
-5
app-overview.zh.ts
web/i18n/lang/app-overview.zh.ts
+5
-5
No files found.
web/app/components/app/overview/appCard.tsx
View file @
94d7babb
...
...
@@ -247,6 +247,7 @@ function AppCard({
linkUrl=
""
onClose=
{
()
=>
setShowCustomizeModal
(
false
)
}
appId=
{
appInfo
.
id
}
api_base_url=
{
appInfo
.
api_base_url
}
mode=
{
appInfo
.
mode
}
/>
</>
...
...
web/app/components/app/overview/customize/index.tsx
View file @
94d7babb
...
...
@@ -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<IShareLinkProps> = ({
isShow
,
onClose
,
appId
,
api_base_url
,
mode
,
})
=>
{
const
{
t
}
=
useTranslation
()
...
...
@@ -64,30 +66,32 @@ const CustomizeModal: FC<IShareLinkProps> = ({
</
a
>
</
div
>
</
div
>
<
div
className=
'flex py-4'
>
<
StepNum
>
2
</
StepNum
>
<
div
className=
'flex flex-col w-full'
>
<
div
className=
'text-gray-900'
>
{
t
(
`${prefixCustomize}.way1.step2`
)
}
</
div
>
<
div
className=
'text-gray-500 text-xs mt-1 mb-2'
>
{
t
(
`${prefixCustomize}.way1.step2Tip`
)
}
</
div
>
<
pre
className=
'box-border py-3 px-4 bg-gray-100 text-xs font-medium rounded-lg select-text'
>
export const APP_ID = '
{
appId
}
'
<
br
/>
export const API_KEY =
{
'
\'
<Web API Key From Dify>
\'
'
}
</
pre
>
</
div
>
</
div
>
<
div
className=
'flex pt-4'
>
<
StepNum
>
3
</
StepNum
>
<
StepNum
>
2
</
StepNum
>
<
div
className=
'flex flex-col'
>
<
div
className=
'text-gray-900'
>
{
t
(
`${prefixCustomize}.way1.step3`
)
}
</
div
>
<
div
className=
'text-gray-500 text-xs mt-1 mb-2'
>
{
t
(
`${prefixCustomize}.way1.step
3
Tip`
)
}
</
div
>
<
div
className=
'text-gray-500 text-xs mt-1 mb-2'
>
{
t
(
`${prefixCustomize}.way1.step
2
Tip`
)
}
</
div
>
<
a
href=
"https://vercel.com/docs/concepts/deployments/git/vercel-for-github"
target=
'_blank'
>
<
Button
className=
'text-gray-800 text-sm w-fit'
>
<
div
className=
'mr-1.5 border-solid border-t-0 border-r-[7px] border-l-[7px] border-b-[12px] border-r-transparent border-b-black border-l-transparent border-t-transparent'
></
div
>
<
span
>
{
t
(
`${prefixCustomize}.way1.step
3
Operation`
)
}
</
span
>
<
span
>
{
t
(
`${prefixCustomize}.way1.step
2
Operation`
)
}
</
span
>
</
Button
>
</
a
>
</
div
>
</
div
>
<
div
className=
'flex py-4'
>
<
StepNum
>
3
</
StepNum
>
<
div
className=
'flex flex-col w-full'
>
<
div
className=
'text-gray-900'
>
{
t
(
`${prefixCustomize}.way1.step3`
)
}
</
div
>
<
div
className=
'text-gray-500 text-xs mt-1 mb-2'
>
{
t
(
`${prefixCustomize}.way1.step3Tip`
)
}
</
div
>
<
pre
className=
'box-border py-3 px-4 bg-gray-100 text-xs font-medium rounded-lg select-text'
>
NEXT_PUBLIC_APP_ID=
{
`'${appId}'`
}
<
br
/>
NEXT_PUBLIC_APP_KEY=
{
'
\'
<Web API Key From Dify>
\'
'
}
<
br
/>
NEXT_PUBLIC_API_URL=
{
`'${api_base_url}'`
}
</
pre
>
</
div
>
</
div
>
</
div
>
<
div
className=
'w-full mt-4 px-6 py-5 border-gray-200 rounded-lg border-[0.5px]'
>
<
Tag
bordered=
{
true
}
hideBg=
{
true
}
className=
'text-primary-600 border-primary-600 uppercase'
>
{
t
(
`${prefixCustomize}.way`
)
}
2
</
Tag
>
...
...
web/i18n/lang/app-overview.en.ts
View file @
94d7babb
...
...
@@ -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
:
'C
opy the Web API and APP ID,then paste them into the client code config/index.ts
'
,
step
3
:
'Deploy to Vercel
'
,
step3
Tip
:
'Click here to import the repository into Vercel and deploy
'
,
step3
Operation
:
'Import repository
'
,
step2
:
'
Deploy to Vercel
'
,
step2Tip
:
'C
lick here to import the repository into Vercel and deploy
'
,
step
2Operation
:
'Import repository
'
,
step3
:
'Configure environment variables
'
,
step3
Tip
:
'Add the following environment variables in Vercel
'
,
},
way2
:
{
name
:
'Write client-side code to call the API and deploy it to a server'
,
...
...
web/i18n/lang/app-overview.zh.ts
View file @
94d7babb
...
...
@@ -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 中
'
,
step
3
:
'部署到 Vercel 中
'
,
step3
Tip
:
'点击此处将仓库导入到 Vercel 中部署
'
,
step3
Operation
:
'导入仓库
'
,
step2
:
'
部署到 Vercel 中
'
,
step2Tip
:
'
点击此处将仓库导入到 Vercel 中部署
'
,
step
2Operation
:
'导入仓库
'
,
step3
:
'配置环境变量
'
,
step3
Tip
:
'在 Vecel 环境变量中添加以下环境变量
'
,
},
way2
:
{
name
:
'编写客户端调用 API 并部署到服务器中'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment