This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch release-v1.0-auto-cherry-pick-7840 in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 8756fc9ee230ba74ca0454350c4ff9a737fdc2d8 Author: 青湛 <[email protected]> AuthorDate: Tue Aug 6 23:17:24 2024 +1200 feat: improve some description for onboard (#7840) --- .../src/plugins/components/connection-form/fields/token.tsx | 4 ++-- config-ui/src/routes/onboard/step-1.tsx | 13 ++++++++++++- config-ui/src/routes/onboard/step-2.tsx | 9 ++++++++- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/config-ui/src/plugins/components/connection-form/fields/token.tsx b/config-ui/src/plugins/components/connection-form/fields/token.tsx index 904569e24..ce1e84f7e 100644 --- a/config-ui/src/plugins/components/connection-form/fields/token.tsx +++ b/config-ui/src/plugins/components/connection-form/fields/token.tsx @@ -23,8 +23,8 @@ import { Block } from '@/components'; interface Props { type: 'create' | 'update'; - label?: string; - subLabel?: string; + label?: React.ReactNode; + subLabel?: React.ReactNode; initialValue: string; value: string; error: string; diff --git a/config-ui/src/routes/onboard/step-1.tsx b/config-ui/src/routes/onboard/step-1.tsx index 50d10a889..219db1a3f 100644 --- a/config-ui/src/routes/onboard/step-1.tsx +++ b/config-ui/src/routes/onboard/step-1.tsx @@ -17,10 +17,12 @@ */ import { useState, useEffect, useContext } from 'react'; +import { Link } from 'react-router-dom'; import { Input, Flex, Button, message } from 'antd'; import API from '@/api'; import { Block, Markdown } from '@/components'; +import { PATHS } from '@/config'; import { ConnectionSelect } from '@/plugins'; import { validName } from '@/routes/project'; import { operator } from '@/utils'; @@ -87,7 +89,16 @@ export const Step1 = () => { onChange={(e) => setProjectName(e.target.value)} /> </Block> - <Block title="Data Connection" description="You can only choose one data connection" required> + <Block + title="Data Connection" + description={ + <p> + For self-managed GitLab/GitHub/Bitbucket, please skip the onboarding and configure via{' '} + <Link to={PATHS.CONNECTIONS()}>Data Connections</Link>. + </p> + } + required + > <ConnectionSelect placeholder="Select a Data Connection" options={[ diff --git a/config-ui/src/routes/onboard/step-2.tsx b/config-ui/src/routes/onboard/step-2.tsx index eb7afbba1..cd2eba4dc 100644 --- a/config-ui/src/routes/onboard/step-2.tsx +++ b/config-ui/src/routes/onboard/step-2.tsx @@ -17,10 +17,12 @@ */ import { useState, useContext, useEffect, useMemo } from 'react'; +import { Link } from 'react-router-dom'; import { Flex, Button, Tooltip } from 'antd'; import API from '@/api'; import { Markdown } from '@/components'; +import { PATHS } from '@/config'; import { getPluginConfig } from '@/plugins'; import { ConnectionToken } from '@/plugins/components/connection-form/fields/token'; import { ConnectionUsername } from '@/plugins/components/connection-form/fields/username'; @@ -135,7 +137,12 @@ export const Step2 = () => { <ConnectionToken type="create" label="Personal Access Token" - subLabel={`Create a personal access token in ${config.name}`} + subLabel={ + <p> + Create a personal access token in GitHub. For self-managed {config.name}, please skip the onboarding + and configure via <Link to={PATHS.CONNECTIONS()}>Data Connections</Link>. + </p> + } initialValue="" value={payload.token} setValue={(token) => {
