Browse Source

fix: update @ant-design/pro-components to fix dark theme issue (#11645)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
pull/11648/head
afc163 6 months ago
committed by GitHub
parent
commit
b54cb6a4a5
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 8
      package.json
  2. 4
      src/pages/account/settings/style.style.ts
  3. 2
      src/pages/list/basic-list/components/OperationModal.tsx
  4. 32
      src/pages/user/login/__snapshots__/login.test.tsx.snap
  5. 2
      src/pages/user/login/index.tsx

8
package.json

@ -39,7 +39,7 @@
"dependencies": {
"@ant-design/icons": "^6.1.0",
"@ant-design/plots": "^2.6.0",
"@ant-design/pro-components": "3.1.2-0",
"@ant-design/pro-components": "^3.1.12-0",
"@antv/l7": "^2.22.7",
"@antv/l7-react": "^2.4.3",
"@rc-component/util": "^1.9.0",
@ -55,9 +55,10 @@
"@biomejs/biome": "^2.1.1",
"@commitlint/cli": "^20.1.0",
"@commitlint/config-conventional": "^20.0.0",
"@tailwindcss/postcss": "^4",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.3.0",
"@types/express": "^5.0.3",
"@types/express": "^4.17.25",
"@types/jest": "^30.0.0",
"@types/node": "^25.0.3",
"@types/numeral": "^2.0.5",
@ -67,7 +68,7 @@
"@umijs/lint": "^4.6.13",
"@umijs/max": "^4.6.25",
"cross-env": "^10.1.0",
"express": "^5.2.0",
"express": "^4.22.1",
"gh-pages": "^6.1.1",
"husky": "^9.1.7",
"jest": "^30.0.4",
@ -75,7 +76,6 @@
"lint-staged": "^16.1.2",
"mockjs": "^1.1.0",
"tailwindcss": "^4",
"@tailwindcss/postcss": "^4",
"ts-node": "^10.9.2",
"typescript": "^6.0.2",
"umi-presets-pro": "^2.0.3",

4
src/pages/account/settings/style.style.ts

@ -19,19 +19,19 @@ const useStyles = createStyles(({ token }) => {
},
leftMenu: {
width: '224px',
borderRight: `${token.lineWidth}px solid ${token.colorSplit}`,
'.ant-menu-inline': { border: 'none' },
'.ant-menu-horizontal': { fontWeight: 'bold' },
[`@media screen and (max-width: ${token.screenMD}px)`]: {
width: '100%',
border: 'none',
},
},
right: {
flex: '1',
padding: '8px 40px',
borderInlineStart: `${token.lineWidth}px solid ${token.colorSplit}`,
[`@media screen and (max-width: ${token.screenMD}px)`]: {
padding: '40px',
border: 'none',
},
},
title: {

2
src/pages/list/basic-list/components/OperationModal.tsx

@ -16,7 +16,7 @@ type OperationModalProps = {
current: Partial<BasicListItemDataType> | undefined;
onDone: () => void;
onSubmit: (values: BasicListItemDataType) => void;
children?: React.ReactNode;
children?: React.ReactElement;
};
const OperationModal: FC<OperationModalProps> = (props) => {
const { styles } = useStyles();

32
src/pages/user/login/__snapshots__/login.test.tsx.snap

@ -43,16 +43,16 @@ exports[`Login Page should login success 1`] = `
style="flex: 1 1 0%; padding: 32px 0px;"
>
<div
class="ant-pro-form-login-container "
class="ant-pro-form-login-container"
>
<div
class="ant-pro-form-login-top"
>
<div
class="ant-pro-form-login-header "
class="ant-pro-form-login-header"
>
<span
class="ant-pro-form-login-logo "
class="ant-pro-form-login-logo"
>
<img
alt="logo"
@ -60,19 +60,19 @@ exports[`Login Page should login success 1`] = `
/>
</span>
<span
class="ant-pro-form-login-title "
class="ant-pro-form-login-title"
>
Ant Design
</span>
</div>
<div
class="ant-pro-form-login-desc "
class="ant-pro-form-login-desc"
>
Ant Design is the most influential web design specification in Xihu district
</div>
</div>
<div
class="ant-pro-form-login-main "
class="ant-pro-form-login-main"
style="width: 328px; min-width: 280px; max-width: 75vw;"
>
<form
@ -389,7 +389,7 @@ exports[`Login Page should login success 1`] = `
</button>
</form>
<div
class="ant-pro-form-login-main-other "
class="ant-pro-form-login-main-other"
>
Login with :
<span
@ -456,10 +456,12 @@ exports[`Login Page should login success 1`] = `
</div>
<footer
class="ant-layout-footer"
data-testid="pro-layout-footer"
style="padding: 0px; background: none;"
>
<div
class="ant-pro-global-footer"
data-testid="pro-global-footer"
>
<div
class="ant-pro-global-footer-list"
@ -584,16 +586,16 @@ exports[`Login Page should show login form 1`] = `
style="flex: 1 1 0%; padding: 32px 0px;"
>
<div
class="ant-pro-form-login-container "
class="ant-pro-form-login-container"
>
<div
class="ant-pro-form-login-top"
>
<div
class="ant-pro-form-login-header "
class="ant-pro-form-login-header"
>
<span
class="ant-pro-form-login-logo "
class="ant-pro-form-login-logo"
>
<img
alt="logo"
@ -601,19 +603,19 @@ exports[`Login Page should show login form 1`] = `
/>
</span>
<span
class="ant-pro-form-login-title "
class="ant-pro-form-login-title"
>
Ant Design
</span>
</div>
<div
class="ant-pro-form-login-desc "
class="ant-pro-form-login-desc"
>
Ant Design is the most influential web design specification in Xihu district
</div>
</div>
<div
class="ant-pro-form-login-main "
class="ant-pro-form-login-main"
style="width: 328px; min-width: 280px; max-width: 75vw;"
>
<form
@ -929,7 +931,7 @@ exports[`Login Page should show login form 1`] = `
</button>
</form>
<div
class="ant-pro-form-login-main-other "
class="ant-pro-form-login-main-other"
>
Login with :
<span
@ -996,10 +998,12 @@ exports[`Login Page should show login form 1`] = `
</div>
<footer
class="ant-layout-footer"
data-testid="pro-layout-footer"
style="padding: 0px; background: none;"
>
<div
class="ant-pro-global-footer"
data-testid="pro-global-footer"
>
<div
class="ant-pro-global-footer-list"

2
src/pages/user/login/index.tsx

@ -123,7 +123,7 @@ const Login: React.FC = () => {
* Only allow same-origin relative paths starting with '/'
*/
const getSafeRedirectUrl = (redirect: string | null): string => {
if (!redirect || !redirect.startsWith('/')) return '/';
if (!redirect?.startsWith('/')) return '/';
// Block protocol-relative URLs (//example.com)
if (redirect.startsWith('//')) return '/';

Loading…
Cancel
Save