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
f914eb95
Unverified
Commit
f914eb95
authored
Aug 07, 2023
by
Matri
Committed by
GitHub
Aug 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: doc links (#763)
parent
8ae1eb0e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
9 deletions
+24
-9
activateForm.tsx
web/app/activate/activateForm.tsx
+4
-1
index.tsx
web/app/components/app/overview/customize/index.tsx
+1
-1
index.tsx
web/app/components/header/account-about/index.tsx
+5
-2
index.tsx
web/app/components/header/account-dropdown/index.tsx
+1
-1
installForm.tsx
web/app/install/installForm.tsx
+4
-1
normalForm.tsx
web/app/signin/normalForm.tsx
+5
-2
oneMoreStep.tsx
web/app/signin/oneMoreStep.tsx
+4
-1
No files found.
web/app/activate/activateForm.tsx
View file @
f914eb95
'use client'
import
{
useState
}
from
'react'
import
{
useContext
}
from
'use-context-selector'
import
{
useTranslation
}
from
'react-i18next'
import
useSWR
from
'swr'
import
{
useSearchParams
}
from
'next/navigation'
...
...
@@ -15,11 +16,13 @@ import { languageMaps, languages } from '@/utils/language'
import
{
activateMember
,
invitationCheck
}
from
'@/service/common'
import
Toast
from
'@/app/components/base/toast'
import
Loading
from
'@/app/components/base/loading'
import
I18n
from
'@/context/i18n'
const
validPassword
=
/^
(?=
.*
[
a-zA-Z
])(?=
.*
\d)
.
{8,}
$/
const
ActivateForm
=
()
=>
{
const
{
t
}
=
useTranslation
()
const
{
locale
}
=
useContext
(
I18n
)
const
searchParams
=
useSearchParams
()
const
workspaceID
=
searchParams
.
get
(
'workspace_id'
)
const
email
=
searchParams
.
get
(
'email'
)
...
...
@@ -202,7 +205,7 @@ const ActivateForm = () => {
<
Link
className=
'text-primary-600'
target=
{
'_blank'
}
href=
'https://docs.dify.ai/community/open-source'
href=
{
`https://docs.dify.ai/${locale === 'en' ? '' : `
v
/
$
{
locale
.
toLowerCase
()}
`}/community/open-source`
}
>
{
t
(
'login.license.link'
)
}
</
Link
>
</
div
>
</
div
>
...
...
web/app/components/app/overview/customize/index.tsx
View file @
f914eb95
...
...
@@ -94,7 +94,7 @@ const CustomizeModal: FC<IShareLinkProps> = ({
<
p
className=
'mt-2 text-base font-medium text-gray-800'
>
{
t
(
`${prefixCustomize}.way2.name`
)
}
</
p
>
<
Button
className=
'w-36 mt-2'
onClick=
{
()
=>
window
.
open
(
`https://docs.dify.ai/${locale
.toLowerCase()
}/application/developing-with-apis`
,
'_blank'
)
}
onClick=
{
()
=>
window
.
open
(
`https://docs.dify.ai/${locale
=== 'en' ? '' : `
v
/
$
{
locale
.
toLowerCase
()}
`
}/application/developing-with-apis`
,
'_blank'
)
}
>
<
span
className=
'text-sm text-gray-800'
>
{
t
(
`${prefixCustomize}.way2.operation`
)
}
</
span
>
<
ArrowTopRightOnSquareIcon
className=
'w-4 h-4 ml-1 text-gray-800 shrink-0'
/>
...
...
web/app/components/header/account-about/index.tsx
View file @
f914eb95
...
...
@@ -2,12 +2,14 @@
import
{
useTranslation
}
from
'react-i18next'
import
classNames
from
'classnames'
import
Link
from
'next/link'
import
{
useContext
}
from
'use-context-selector'
import
s
from
'./index.module.css'
import
Modal
from
'@/app/components/base/modal'
import
{
XClose
}
from
'@/app/components/base/icons/src/vender/line/general'
import
{
Dify
}
from
'@/app/components/base/icons/src/public/common'
import
type
{
LangGeniusVersionResponse
}
from
'@/models/common'
import
{
IS_CE_EDITION
}
from
'@/config'
import
I18n
from
'@/context/i18n'
type
IAccountSettingProps
=
{
langeniusVersionInfo
:
LangGeniusVersionResponse
...
...
@@ -22,6 +24,7 @@ export default function AccountAbout({
onCancel
,
}:
IAccountSettingProps
)
{
const
{
t
}
=
useTranslation
()
const
{
locale
}
=
useContext
(
I18n
)
const
isLatest
=
langeniusVersionInfo
.
current_version
===
langeniusVersionInfo
.
latest_version
return
(
...
...
@@ -48,8 +51,8 @@ export default function AccountAbout({
IS_CE_EDITION
?
<
Link
href=
{
'https://github.com/langgenius/dify/blob/main/LICENSE'
}
target=
'_blank'
>
Open Source License
</
Link
>
:
<>
<
Link
href=
{
'https://docs.dify.ai/user-agreement/privacy-policy
'
}
target=
'_blank'
>
Privacy Policy
</
Link
>
,
<
Link
href=
{
'https://docs.dify.ai/user-agreement/terms-of-service
'
}
target=
'_blank'
>
Terms of Service
</
Link
>
<
Link
href=
{
locale
===
'en'
?
'https://docs.dify.ai/user-agreement/privacy-policy'
:
'https://docs.dify.ai/v/zh-hans/yong-hu-xie-yi/yin-si-xie-yi
'
}
target=
'_blank'
>
Privacy Policy
</
Link
>
,
<
Link
href=
{
locale
===
'en'
?
'https://docs.dify.ai/user-agreement/terms-of-service'
:
'https://docs.dify.ai/v/zh-hans/yong-hu-xie-yi/fu-wu-xie-yi
'
}
target=
'_blank'
>
Terms of Service
</
Link
>
</>
}
</
div
>
...
...
web/app/components/header/account-dropdown/index.tsx
View file @
f914eb95
...
...
@@ -97,7 +97,7 @@ export default function AppSelector() {
<
Link
className=
{
classNames
(
itemClassName
,
'group justify-between'
)
}
href=
{
locale
===
'
zh-Hans'
?
'https://docs.dify.ai/v/zh-hans/'
:
'https://docs.dify.ai/'
locale
===
'
en'
?
'https://docs.dify.ai/'
:
`https://docs.dify.ai/v/${locale.toLowerCase()}/`
}
target=
'_blank'
>
<
div
>
{
t
(
'common.userProfile.helpCenter'
)
}
</
div
>
...
...
web/app/install/installForm.tsx
View file @
f914eb95
...
...
@@ -3,15 +3,18 @@ import React from 'react'
import
{
useTranslation
}
from
'react-i18next'
import
Link
from
'next/link'
import
{
useRouter
}
from
'next/navigation'
import
{
useContext
}
from
'use-context-selector'
import
Toast
from
'../components/base/toast'
import
Button
from
'@/app/components/base/button'
import
{
setup
}
from
'@/service/common'
import
I18n
from
'@/context/i18n'
const
validEmailReg
=
/^
[\w\.
-
]
+@
([\w
-
]
+
\.)
+
[\w
-
]{2,}
$/
const
validPassword
=
/^
(?=
.*
[
a-zA-Z
])(?=
.*
\d)
.
{8,}
$/
const
InstallForm
=
()
=>
{
const
{
t
}
=
useTranslation
()
const
{
locale
}
=
useContext
(
I18n
)
const
router
=
useRouter
()
const
[
email
,
setEmail
]
=
React
.
useState
(
''
)
...
...
@@ -149,7 +152,7 @@ const InstallForm = () => {
<
Link
className=
'text-primary-600'
target=
{
'_blank'
}
href=
'https://docs.dify.ai/community/open-source'
href=
{
`https://docs.dify.ai/${locale === 'en' ? '' : `
v
/
$
{
locale
.
toLowerCase
()}
/`}community/
open
-
source
`
}
>
{
t
(
'login.license.link'
)
}
</
Link
>
</
div
>
</
div
>
...
...
web/app/signin/normalForm.tsx
View file @
f914eb95
...
...
@@ -5,12 +5,14 @@ import { useRouter } from 'next/navigation'
import
classNames
from
'classnames'
import
useSWR
from
'swr'
import
Link
from
'next/link'
import
{
useContext
}
from
'use-context-selector'
import
Toast
from
'../components/base/toast'
import
style
from
'./page.module.css'
// import Tooltip from '@/app/components/base/tooltip/index'
import
{
IS_CE_EDITION
,
apiPrefix
}
from
'@/config'
import
Button
from
'@/app/components/base/button'
import
{
login
,
oauth
}
from
'@/service/common'
import
I18n
from
'@/context/i18n'
const
validEmailReg
=
/^
[\w\.
-
]
+@
([\w
-
]
+
\.)
+
[\w
-
]{2,}
$/
...
...
@@ -60,6 +62,7 @@ function reducer(state: IState, action: { type: string; payload: any }) {
const
NormalForm
=
()
=>
{
const
{
t
}
=
useTranslation
()
const
router
=
useRouter
()
const
{
locale
}
=
useContext
(
I18n
)
const
[
state
,
dispatch
]
=
useReducer
(
reducer
,
{
formValid
:
false
,
...
...
@@ -269,13 +272,13 @@ const NormalForm = () => {
<
Link
className=
'text-primary-600'
target=
{
'_blank'
}
href=
'https://docs.dify.ai/user-agreement/terms-of-service'
href=
{
locale
===
'en'
?
'https://docs.dify.ai/user-agreement/terms-of-service'
:
'https://docs.dify.ai/v/zh-hans/yong-hu-xie-yi/fu-wu-xie-yi'
}
>
{
t
(
'login.tos'
)
}
</
Link
>
&
<
Link
className=
'text-primary-600'
target=
{
'_blank'
}
href=
'https://docs.dify.ai/user-agreement/privacy-policy'
href=
{
locale
===
'en'
?
'https://docs.dify.ai/user-agreement/privacy-policy'
:
'https://docs.dify.ai/v/zh-hans/yong-hu-xie-yi/yin-si-xie-yi'
}
>
{
t
(
'login.pp'
)
}
</
Link
>
</
div
>
...
...
web/app/signin/oneMoreStep.tsx
View file @
f914eb95
...
...
@@ -4,6 +4,7 @@ import { useTranslation } from 'react-i18next'
import
Link
from
'next/link'
import
useSWR
from
'swr'
import
{
useRouter
}
from
'next/navigation'
import
{
useContext
}
from
'use-context-selector'
import
Button
from
'@/app/components/base/button'
import
Tooltip
from
'@/app/components/base/tooltip/index'
...
...
@@ -12,6 +13,7 @@ import { timezones } from '@/utils/timezone'
import
{
languageMaps
,
languages
}
from
'@/utils/language'
import
{
oneMoreStep
}
from
'@/service/common'
import
Toast
from
'@/app/components/base/toast'
import
I18n
from
'@/context/i18n'
type
IState
=
{
formState
:
'processing'
|
'error'
|
'success'
|
'initial'
...
...
@@ -45,6 +47,7 @@ const reducer = (state: IState, action: any) => {
const
OneMoreStep
=
()
=>
{
const
{
t
}
=
useTranslation
()
const
router
=
useRouter
()
const
{
locale
}
=
useContext
(
I18n
)
const
[
state
,
dispatch
]
=
useReducer
(
reducer
,
{
formState
:
'initial'
,
...
...
@@ -158,7 +161,7 @@ const OneMoreStep = () => {
<
Link
className=
'text-primary-600'
target=
{
'_blank'
}
href=
'https://docs.dify.ai/community/open-source'
href=
{
`https://docs.dify.ai/${locale === 'en' ? '' : `
v
/
$
{
locale
.
toLowerCase
()}
`}/community/open-source`
}
>
{
t
(
'login.license.link'
)
}
</
Link
>
</
div
>
</
div
>
...
...
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