diff --git a/.gitignore b/.gitignore index 2797765a..54c883c5 100644 --- a/.gitignore +++ b/.gitignore @@ -64,4 +64,4 @@ mvnw /react-ui/docs /react-ui/types/tsconfig.tsbuildinfo /react-ui/storybook-static -/react-ui/.storybook/deploy.sh +/react-ui/.storybook/scripts diff --git a/react-ui/Dockerfile b/react-ui/Dockerfile new file mode 100644 index 00000000..077c862f --- /dev/null +++ b/react-ui/Dockerfile @@ -0,0 +1,3 @@ +# Dockerfile +FROM nginx:alpine +COPY storybook-static/ /usr/share/nginx/html \ No newline at end of file diff --git a/react-ui/package.json b/react-ui/package.json index c49cda16..c614d920 100644 --- a/react-ui/package.json +++ b/react-ui/package.json @@ -40,7 +40,7 @@ "start:test": "cross-env REACT_APP_ENV=test MOCK=none UMI_ENV=dev max dev", "storybook": "storybook dev -p 6006", "storybook-build": "storybook build", - "storybook-deploy": "./.storybook/deploy.sh", + "storybook-deploy": "./.storybook/scripts/upload-deploy.sh", "storybook-docs": "storybook dev --docs", "storybook-docs-build": "storybook build --docs", "test": "jest", diff --git a/react-ui/src/global.less b/react-ui/src/global.less index 9944c70e..df79e9f7 100644 --- a/react-ui/src/global.less +++ b/react-ui/src/global.less @@ -160,3 +160,8 @@ ol { input:-webkit-autofill { transition: background-color 5000s ease-in-out 0s; } + +.ant-typography { + color: inherit; + font-size: inherit; +} diff --git a/react-ui/src/overrides.less b/react-ui/src/overrides.less index 4709a97c..e129b4a7 100644 --- a/react-ui/src/overrides.less +++ b/react-ui/src/overrides.less @@ -261,8 +261,3 @@ } } } - -.ant-typography { - color: inherit; - font-size: inherit; -} diff --git a/react-ui/src/pages/Workspace/components/UserPoints/index.less b/react-ui/src/pages/Workspace/components/UserPoints/index.less index 4a7554bf..e8f9b750 100644 --- a/react-ui/src/pages/Workspace/components/UserPoints/index.less +++ b/react-ui/src/pages/Workspace/components/UserPoints/index.less @@ -3,9 +3,9 @@ flex: none; flex-direction: column; align-items: center; - width: 326px; height: 228px; + padding: 0 20px; .backgroundFullImage(url(@/assets/img/user-points-bg.png)); &__label { @@ -16,12 +16,15 @@ } &__value { + width: 100%; margin-top: 8px; margin-bottom: 12px; color: @primary-color; font-size: 36px; font-family: DingTalk-JinBuTi; line-height: 43px; + text-align: center; + .singleLine(); } &__button { diff --git a/react-ui/src/pages/Workspace/components/UserPoints/index.tsx b/react-ui/src/pages/Workspace/components/UserPoints/index.tsx index 3ea37e23..98e63cbf 100644 --- a/react-ui/src/pages/Workspace/components/UserPoints/index.tsx +++ b/react-ui/src/pages/Workspace/components/UserPoints/index.tsx @@ -2,6 +2,7 @@ import { PointsStatistics } from '@/pages/Points/index'; import { getPointsStatisticsReq } from '@/services/points'; import { to } from '@/utils/promise'; import { useNavigate } from '@umijs/max'; +import { Typography } from 'antd'; import { useEffect, useState } from 'react'; import styles from './index.less'; @@ -23,8 +24,13 @@ function UserPoints() { return (
- 当前可用算力积分 - {statistics?.userCredit ?? '--'} +
当前可用算力积分
+ + {statistics?.userCredit ?? '--'} +
{