Skip to content

Commit 6bcfd4a

Browse files
author
xwj02155382
committed
fix(#725): Modify the color usage method
1 parent 04c6a89 commit 6bcfd4a

File tree

3 files changed

+26
-23
lines changed

3 files changed

+26
-23
lines changed

packages/studio-website/src/pages/instance/lists/empty.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import React, { memo } from 'react';
2-
import { Row, Col, Card, Result, Flex, ConfigProvider, Typography } from 'antd';
2+
import { Row, Col, Card, Result, Flex, ConfigProvider, Typography,theme } from 'antd';
33
import { FormattedMessage } from 'react-intl';
44
import FeatureCase from '../../../components/feature-case';
55
import CreateInstance from '../create';
66

77
const { Text, Title } = Typography;
88
const ServerNotAvailable: React.FC = () => {
9+
const { token } = theme.useToken();
910
return (
1011
<ConfigProvider
1112
theme={{
@@ -27,7 +28,7 @@ const ServerNotAvailable: React.FC = () => {
2728
<Title level={3}>
2829
<FormattedMessage id="No graph available" />
2930
</Title>
30-
<Text style={{ fontSize: '16px',marginBottom: 30,marginTop:4 }}>
31+
<Text style={{ marginBottom: 30,marginTop:4 }} type="secondary">
3132
<FormattedMessage id="Please click the button below to 「Create instances」" />
3233
</Text>
3334
<FeatureCase match="MULTIPLE_GRAPHS">

packages/studio-website/src/pages/instance/lists/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const InstanceCard: React.FC<IProps> = ({ changeCreateAction }) => {
6363
}, []);
6464

6565

66-
if (isReady && !isServerAvailable) {
66+
if (isReady && isServerAvailable) {
6767
return (
6868
<ServerNotAvailable />
6969
);

packages/studio-website/src/pages/instance/lists/server-not-available.tsx

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
import React, { memo } from 'react';
2-
import { Row, Col, Card, Result, Flex, ConfigProvider, Typography } from 'antd';
2+
import { Row, Col, Card, Result, Flex, ConfigProvider, Typography, theme } from 'antd';
33
import { FormattedMessage } from 'react-intl';
44

55
const { Text, Title } = Typography;
6+
67
const ServerNotAvailable: React.FC = () => {
8+
9+
10+
const { token } = theme.useToken();
11+
const ColorText = (props) => <Text style={{ color: token.colorTextLightSolid }} >{props.children}</Text>;
712
return (
813
<ConfigProvider
914
theme={{
1015
components: {
1116
Result: {
1217
paddingLG: 0,
1318
marginXS: 0,
14-
iconFontSize: 20,
1519
},
1620
},
1721
}}
@@ -25,35 +29,33 @@ const ServerNotAvailable: React.FC = () => {
2529
<Title level={3}>
2630
<FormattedMessage id="No available Coordinator service" />
2731
</Title>
28-
<Text style={{ fontSize: '16px' }}>
32+
<Text type="secondary">
2933
<FormattedMessage id="Start the local service by following the steps below and then refresh this web page" />
3034
</Text>
3135
<Flex
3236
vertical
3337
style={{
34-
background: 'rgba(0, 0, 0, 0.7)',
38+
background: token.colorBgSpotlight,
3539
flex: 1,
36-
borderRadius: '10px',
40+
borderRadius: token.borderRadius,
3741
padding: '20px',
3842
marginTop: '20px',
3943
}}
4044
>
41-
<Text style={{ color: 'rgba(255,255,255,.8)' }}>
42-
<FormattedMessage id="# Pull the GraphScope Interactive Docker image" />
43-
</Text>
44-
<Text style={{ color: 'rgba(255,255,255,.8)' }}>
45-
<FormattedMessage id="docker pull registry.cn-hongkong.aliyuncs.com/graphscope/interactive:0.29.3-arm64" />
46-
</Text>
45+
<ColorText>
46+
# Pull the GraphScope Interactive Docker image
47+
</ColorText>
48+
<ColorText>
49+
docker pull registry.cn-hongkong.aliyuncs.com/graphscope/interactive:0.29.3-arm64
50+
</ColorText>
4751
<br />
48-
<Text style={{ color: 'rgba(255,255,255,.8)' }}>
49-
<FormattedMessage id="# Start the GraphScope Interactive service" />
50-
</Text>
51-
<Text style={{ color: 'rgba(255,255,255,.8)' }}>
52-
<FormattedMessage
53-
id="docker run -d --name gs -label flex=interactive - 8080:8080 - 7777:7777 - 10000:10000 -p
54-
7687:7687 registry.cn-hongkong.aliyuncs.com/graphscope/interactive:0.29.3-arm64-enable-coordinator"
55-
/>
56-
</Text>
52+
<ColorText>
53+
# Start the GraphScope Interactive service
54+
</ColorText>
55+
<ColorText>
56+
docker run -d --name gs -label flex=interactive - 8080:8080 - 7777:7777 - 10000:10000 -p
57+
7687:7687 registry.cn-hongkong.aliyuncs.com/graphscope/interactive:0.29.3-arm64-enable-coordinator
58+
</ColorText>
5759
</Flex>
5860
</Flex>
5961
</Flex>

0 commit comments

Comments
 (0)