| @@ -64,4 +64,4 @@ mvnw | |||||
| /react-ui/docs | /react-ui/docs | ||||
| /react-ui/types/tsconfig.tsbuildinfo | /react-ui/types/tsconfig.tsbuildinfo | ||||
| /react-ui/storybook-static | /react-ui/storybook-static | ||||
| /react-ui/.storybook/deploy.sh | |||||
| /react-ui/.storybook/scripts | |||||
| @@ -0,0 +1,3 @@ | |||||
| # Dockerfile | |||||
| FROM nginx:alpine | |||||
| COPY storybook-static/ /usr/share/nginx/html | |||||
| @@ -40,7 +40,7 @@ | |||||
| "start:test": "cross-env REACT_APP_ENV=test MOCK=none UMI_ENV=dev max dev", | "start:test": "cross-env REACT_APP_ENV=test MOCK=none UMI_ENV=dev max dev", | ||||
| "storybook": "storybook dev -p 6006", | "storybook": "storybook dev -p 6006", | ||||
| "storybook-build": "storybook build", | "storybook-build": "storybook build", | ||||
| "storybook-deploy": "./.storybook/deploy.sh", | |||||
| "storybook-deploy": "./.storybook/scripts/upload-deploy.sh", | |||||
| "storybook-docs": "storybook dev --docs", | "storybook-docs": "storybook dev --docs", | ||||
| "storybook-docs-build": "storybook build --docs", | "storybook-docs-build": "storybook build --docs", | ||||
| "test": "jest", | "test": "jest", | ||||
| @@ -160,3 +160,8 @@ ol { | |||||
| input:-webkit-autofill { | input:-webkit-autofill { | ||||
| transition: background-color 5000s ease-in-out 0s; | transition: background-color 5000s ease-in-out 0s; | ||||
| } | } | ||||
| .ant-typography { | |||||
| color: inherit; | |||||
| font-size: inherit; | |||||
| } | |||||
| @@ -261,8 +261,3 @@ | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| .ant-typography { | |||||
| color: inherit; | |||||
| font-size: inherit; | |||||
| } | |||||
| @@ -3,9 +3,9 @@ | |||||
| flex: none; | flex: none; | ||||
| flex-direction: column; | flex-direction: column; | ||||
| align-items: center; | align-items: center; | ||||
| width: 326px; | width: 326px; | ||||
| height: 228px; | height: 228px; | ||||
| padding: 0 20px; | |||||
| .backgroundFullImage(url(@/assets/img/user-points-bg.png)); | .backgroundFullImage(url(@/assets/img/user-points-bg.png)); | ||||
| &__label { | &__label { | ||||
| @@ -16,12 +16,15 @@ | |||||
| } | } | ||||
| &__value { | &__value { | ||||
| width: 100%; | |||||
| margin-top: 8px; | margin-top: 8px; | ||||
| margin-bottom: 12px; | margin-bottom: 12px; | ||||
| color: @primary-color; | color: @primary-color; | ||||
| font-size: 36px; | font-size: 36px; | ||||
| font-family: DingTalk-JinBuTi; | font-family: DingTalk-JinBuTi; | ||||
| line-height: 43px; | line-height: 43px; | ||||
| text-align: center; | |||||
| .singleLine(); | |||||
| } | } | ||||
| &__button { | &__button { | ||||
| @@ -2,6 +2,7 @@ import { PointsStatistics } from '@/pages/Points/index'; | |||||
| import { getPointsStatisticsReq } from '@/services/points'; | import { getPointsStatisticsReq } from '@/services/points'; | ||||
| import { to } from '@/utils/promise'; | import { to } from '@/utils/promise'; | ||||
| import { useNavigate } from '@umijs/max'; | import { useNavigate } from '@umijs/max'; | ||||
| import { Typography } from 'antd'; | |||||
| import { useEffect, useState } from 'react'; | import { useEffect, useState } from 'react'; | ||||
| import styles from './index.less'; | import styles from './index.less'; | ||||
| @@ -23,8 +24,13 @@ function UserPoints() { | |||||
| return ( | return ( | ||||
| <div className={styles['user-points']}> | <div className={styles['user-points']}> | ||||
| <span className={styles['user-points__label']}>当前可用算力积分</span> | |||||
| <span className={styles['user-points__value']}>{statistics?.userCredit ?? '--'}</span> | |||||
| <div className={styles['user-points__label']}>当前可用算力积分</div> | |||||
| <Typography.Paragraph | |||||
| className={styles['user-points__value']} | |||||
| ellipsis={{ tooltip: statistics?.userCredit ?? '--' }} | |||||
| > | |||||
| {statistics?.userCredit ?? '--'} | |||||
| </Typography.Paragraph> | |||||
| <div | <div | ||||
| className={styles['user-points__button']} | className={styles['user-points__button']} | ||||
| onClick={() => { | onClick={() => { | ||||