Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 8362939

Browse files
author
noah
committed
Add the link to redirect in UI
1 parent b520817 commit 8362939

File tree

4 files changed

+33
-14
lines changed

4 files changed

+33
-14
lines changed

ui/src/components/RepoSettingsForm.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Form, Input, Button, Space } from "antd"
1+
import { Form, Input, Button, Space, Typography } from "antd"
22
import { Repo } from "../models"
33

44
export interface RepoSettingsFormProps {
@@ -37,10 +37,20 @@ export default function RepoSettingForm(props: RepoSettingsFormProps): JSX.Eleme
3737
>
3838
<Form.Item
3939
label="Config"
40-
name="config"
41-
rules={[{required: true}]}
42-
{...layout}>
43-
<Input />
40+
{...layout}
41+
>
42+
<Space>
43+
<Form.Item
44+
name="config"
45+
rules={[{required: true}]}
46+
noStyle
47+
>
48+
<Input />
49+
</Form.Item>
50+
<Typography.Link target="_blank" href={`/link/${props.repo.namespace}/${props.repo.name}/config`}>
51+
Link
52+
</Typography.Link>
53+
</Space>
4454
</Form.Item>
4555
<Form.Item {...submitLayout}>
4656
<Form.Item noStyle>

ui/src/views/RepoDeploy.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,14 @@ export default function RepoDeploy(): JSX.Element {
114114
<Result
115115
status="warning"
116116
title="There is no configuration file."
117-
extra={
118-
<Button type="primary" key="console" href="https://docs.gitploy.io/concepts/deploy.yml">
117+
extra={[
118+
<Button type="primary" key="console" target="_blank" href="https://docs.gitploy.io/concepts/deploy.yml">
119119
Read Document
120+
</Button>,
121+
<Button type="link" key="link" target="_blank" href={`/link/${namespace}/${name}/config/new`}>
122+
New Configuration
120123
</Button>
121-
}
124+
]}
122125
/>
123126
)
124127
}

ui/src/views/RepoLock.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,14 @@ export default function RepoLock(): JSX.Element {
3838
<Result
3939
status="warning"
4040
title="There is no configuration file."
41-
extra={
42-
<Button type="primary" key="console" href="https://docs.gitploy.io/concepts/deploy.yml">
41+
extra={[
42+
<Button type="primary" key="console" target="_blank" href="https://docs.gitploy.io/concepts/deploy.yml">
4343
Read Document
44+
</Button>,
45+
<Button type="link" key="link" target="_blank" href={`/link/${namespace}/${name}/config/new`}>
46+
New Configuration
4447
</Button>
45-
}
48+
]}
4649
/>
4750
)
4851
}

ui/src/views/RepoRollback.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,14 @@ export default function RepoHome(): JSX.Element {
7070
<Result
7171
status="warning"
7272
title="There is no configuration file."
73-
extra={
74-
<Button type="primary" key="console" href="https://docs.gitploy.io/concepts/deploy.yml">
73+
extra={[
74+
<Button type="primary" key="console" target="_blank" href="https://docs.gitploy.io/concepts/deploy.yml">
7575
Read Document
76+
</Button>,
77+
<Button type="link" key="link" target="_blank" href={`/link/${namespace}/${name}/config/new`}>
78+
New Configuration
7679
</Button>
77-
}
80+
]}
7881
/>
7982
)
8083
}

0 commit comments

Comments
 (0)