Merge pull request #16 from PRO-Robotech/feature/Design

feature/Design
This commit is contained in:
typescreep
2025-06-20 13:26:38 +03:00
committed by GitHub
4 changed files with 28 additions and 6 deletions

8
package-lock.json generated
View File

@@ -11,7 +11,7 @@
"@ant-design/icons": "5.6.0",
"@monaco-editor/react": "4.6.0",
"@originjs/vite-plugin-federation": "1.3.6",
"@prorobotech/openapi-k8s-toolkit": "^0.0.1-alpha.30",
"@prorobotech/openapi-k8s-toolkit": "^0.0.1-alpha.31",
"@readme/openapi-parser": "4.0.0",
"@reduxjs/toolkit": "2.2.5",
"@tanstack/react-query": "5.62.2",
@@ -2807,9 +2807,9 @@
}
},
"node_modules/@prorobotech/openapi-k8s-toolkit": {
"version": "0.0.1-alpha.30",
"resolved": "https://registry.npmjs.org/@prorobotech/openapi-k8s-toolkit/-/openapi-k8s-toolkit-0.0.1-alpha.30.tgz",
"integrity": "sha512-+wepqcjIver8C1NS8W8gfDrboO0V7Ts5OZkMlCfF5WBzoP8JZqUz5Fkc+gJqA2Brl5EqSR9eQyTPHPydk5yPrw==",
"version": "0.0.1-alpha.31",
"resolved": "https://registry.npmjs.org/@prorobotech/openapi-k8s-toolkit/-/openapi-k8s-toolkit-0.0.1-alpha.31.tgz",
"integrity": "sha512-yqbAze2MuZ/31wZTqyPotVW6KzDwXhmstddXtm+gNPYSj9OUlirstiJyxfKKp7dqMU97+r4sZ7JTohjlCJujnw==",
"license": "MIT",
"dependencies": {
"@monaco-editor/react": "4.6.0",

View File

@@ -20,7 +20,7 @@
"@ant-design/icons": "5.6.0",
"@monaco-editor/react": "4.6.0",
"@originjs/vite-plugin-federation": "1.3.6",
"@prorobotech/openapi-k8s-toolkit": "0.0.1-alpha.30",
"@prorobotech/openapi-k8s-toolkit": "0.0.1-alpha.31",
"@readme/openapi-parser": "4.0.0",
"@reduxjs/toolkit": "2.2.5",
"@tanstack/react-query": "5.62.2",

View File

@@ -191,6 +191,10 @@ export const App: FC<TAppProps> = ({ isFederation, forcedTheme }) => {
Table: {
headerBg: colors?.colorBgLayout,
},
Slider: {
trackBg: colors?.colorText,
trackHoverBg: colors?.colorText,
},
},
}}
>

View File

@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import React, { FC } from 'react'
import React, { FC, useState, useEffect } from 'react'
import { useParams } from 'react-router-dom'
import {
BlackholeFormDataProvider,
@@ -44,6 +44,23 @@ export const BlackholeForm: FC<TBlackholeFormProps> = ({ data, isCreate, backlin
const swagger = useSelector((state: RootState) => state.swagger.swagger)
const params = useParams()
const [height, setHeight] = useState(0)
useEffect(() => {
const height = window.innerHeight - 52 - 52 - 20 * 2 - 26 - 20 - 38 - 10 - 24 * 2 - 28 - 10 - 46 - 50 - 33
setHeight(height)
const handleResize = () => {
setHeight(height)
}
window.addEventListener('resize', handleResize)
return () => {
window.removeEventListener('resize', handleResize)
}
}, [])
const urlParams = {
clusterName: params.clusterName,
namespace: params.namespace,
@@ -94,6 +111,7 @@ export const BlackholeForm: FC<TBlackholeFormProps> = ({ data, isCreate, backlin
backlink={backlink}
modeData={modeData}
designNewLayout
designNewLayoutHeight={height}
/>
)
}