Skip to content

Commit fa4ef43

Browse files
hai-tianYangyang96
andauthored
feat: UI enhancements for graph nodes, lists sorting and general styling (#1389)
* feat: sort * perf: pretty graph * perf: pretty graph * perf: pretty graph * perf: pretty graph * perf: pretty graph * perf: pretty graph * perf: pretty graph * perf: pretty graph * perf: pretty graph * style: resize resource graph node * perf: pretty graph * perf: pretty graph --------- Co-authored-by: Yang Yang <[email protected]>
1 parent da89ea5 commit fa4ef43

File tree

30 files changed

+853
-579
lines changed

30 files changed

+853
-579
lines changed

ui/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"@codemirror/lang-markdown": "^6.3.1",
1212
"@codemirror/language": "^6.10.6",
1313
"@codemirror/legacy-modes": "^6.4.2",
14+
"@codemirror/search": "^6.5.8",
1415
"@codemirror/view": "^6.35.3",
1516
"@hey-api/client-fetch": "^0.5.2",
1617
"@kusionstack/kusion-api-client-sdk": "^1.1.4",
@@ -118,4 +119,4 @@
118119
"stylelint-prettier": "^5.0.0"
119120
},
120121
"repository": "git@[email protected]:KusionStack/kusion.git"
121-
}
122+
}

ui/src/assets/graph/alicloud.png

6.86 KB
Loading

ui/src/assets/graph/aws-cloud.png

35 KB
Loading

ui/src/assets/graph/azure-cloud.png

15 KB
Loading

ui/src/assets/graph/google-cloud.png

65.6 KB
Loading

ui/src/assets/graph/hashicorp.png

43.9 KB
Loading

ui/src/assets/graph/terraform.png

345 KB
Loading

ui/src/components/backWithTitle/styles.module.less

+4
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@
77
margin-right: 10px;
88
cursor: pointer;
99
}
10+
11+
h3 {
12+
font-size: 20px;
13+
}
1014
}

ui/src/components/kusionTabs/index.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ export const KusionTabs = ({
5050
)
5151
})}
5252
</div>
53-
<div className={styles.add_box} onClick={handleAdd}>
54-
<PlusOutlined
55-
style={{ fontSize: 14, color: '#fff', marginRight: 10 }}
56-
/>New Stack
57-
</div>
53+
<Tooltip title="New Stack">
54+
<div className={styles.add_box} onClick={handleAdd}>
55+
<PlusOutlined style={{ fontSize: 14, color: '#fff' }} />
56+
</div>
57+
</Tooltip>
5858
</div>
5959
</div>
6060
)

ui/src/components/kusionTabs/styles.module.less

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
.tab {
1414
display: flex;
15-
padding: 10px 16px;
16-
margin-right: 2px;
17-
font-size: 14px;
15+
padding: 10px 24px;
16+
margin-right: 5px;
17+
font-size: 16px;
1818
font-weight: 500;
1919
cursor: pointer;
2020
background-color: rgb(0 0 0 / 2%);
@@ -24,17 +24,17 @@
2424

2525
&.active_tab {
2626
z-index: 1000;
27-
color: #1778ff;
28-
background: #1677ff14;
29-
border: 1px solid #f1f1f1;
27+
color: #fff;
28+
background: #1778ff;
29+
border: 1px solid #1778ff;
3030
}
3131

3232
.edit_icon {
33+
display: flex;
3334
padding: 0 6px;
3435
margin-right: -4px;
3536
margin-left: 8px;
3637
font-size: 14px;
37-
color: #8a8a8a;
3838

3939
&:hover {
4040
color: #f14c4c;
@@ -55,7 +55,7 @@
5555
cursor: pointer;
5656
border: 1px solid #1778ff;
5757
border-radius: 8px 8px 0 0;
58-
font-size: 14px;
58+
font-size: 16px;
5959
}
6060
}
6161

ui/src/components/layout/kusionMenu/index.tsx

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
import React, { memo, useEffect, useState } from 'react'
2-
import { Menu } from 'antd'
3-
import { useLocation, useNavigate } from 'react-router-dom'
4-
import { useSelector } from 'react-redux'
1+
import React, { memo } from 'react'
52
import type { MenuProps } from 'antd'
3+
64
import styles from "./style.module.less"
75

86
type MenuItem = Required<MenuProps>['items'][number]
@@ -27,9 +25,7 @@ function getItem(
2725
} as MenuItem
2826
}
2927

30-
31-
const KusionMenu = ({selectedKey, onClick}) => {
32-
28+
const KusionMenu = ({ selectedKey, onClick }) => {
3329

3430
const menuItems = [
3531
getItem('Projects', '/projects', null),

0 commit comments

Comments
 (0)