Skip to content

Commit 02b582b

Browse files
committed
fix css
1 parent 5a58c16 commit 02b582b

File tree

7 files changed

+47
-38
lines changed

7 files changed

+47
-38
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ Submit bug reports and feature requests on [our Github repository](https://githu
8282

8383
## Release Notes
8484

85+
### 0.0.8
86+
- Fixed some Windows compatibility issues.
87+
- Optimized the UI interface of webview.
88+
8589
### 0.0.7
8690
- Launch experience satisfaction questionnaire survey
8791
- You are welcome to submit your questions and suggestions on the [experience questionnaire](https://g.alicdn.com/aes/tracker-survey-preview/0.0.13/survey.html?pid=fePxMy&id=3486).

README.zh_CN.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ Default Language [zh]: zh
9191

9292
## Release Notes
9393

94+
### 0.0.8
95+
- Fixed some Windows compatibility issues.
96+
- Optimized the UI interface of webview.
97+
9498
### 0.0.7
9599

96100
- Launch experience satisfaction questionnaire survey.

media/src/components/APIPage/API.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
border: 1px solid rgb(229, 229, 229);
1111
border-radius: 0 2px 2px 0;
1212
cursor: pointer;
13-
.codicon {
13+
/* .codicon {
1414
position: relative !important;
1515
line-height: 79px !important;
1616
right: 3px !important;
17-
}
17+
} */
1818
&:hover {
1919
background-color: #f5f5f5;
2020
}

media/src/components/APIPage/API.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ export const API: React.FC<APIProps> = (props) => {
128128

129129
const [boxWidth, setBoxWidth] = React.useState(0);
130130
const [isExpand, setIsExpand] = React.useState(true);
131-
React.useEffect(() => {
132-
const { width = 0, height = 0 } = resizeObserverEntry?.contentRect || {};
133-
if (width !== boxWidth) {
134-
if (width < 650) {
135-
setIsExpand(false);
136-
}
137-
setBoxWidth(width);
138-
}
139-
}, [boxWidth, resizeObserverEntry]);
131+
// React.useEffect(() => {
132+
// const { width = 0, height = 0 } = resizeObserverEntry?.contentRect || {};
133+
// if (width !== boxWidth) {
134+
// if (width < 650) {
135+
// setIsExpand(false);
136+
// }
137+
// setBoxWidth(width);
138+
// }
139+
// }, [boxWidth, resizeObserverEntry]);
140140

141141
const renderContent = React.useMemo(() => {
142142
const documentComp = (
@@ -181,9 +181,9 @@ export const API: React.FC<APIProps> = (props) => {
181181
<div className="flex h-[calc(100vh_-_140px)] bg-white">
182182
<div className={`expand-arrow ${isExpand ? "" : "!left-1"}`} onClick={() => setIsExpand(!isExpand)}>
183183
{isExpand ? (
184-
<div className="codicon codicon-chevron-left"></div>
184+
<div className="codicon codicon-chevron-left relative top-6 right-0.5"></div>
185185
) : (
186-
<div className="codicon codicon-chevron-right"></div>
186+
<div className="codicon codicon-chevron-right relative top-6 right-0.5"></div>
187187
)}
188188
</div>
189189
{isExpand && <div className="w-[25rem]">{isExpand && <APIDebugger></APIDebugger>}</div>}

media/src/components/APIPage/TryAPI/TryAPI.module.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@
22
position: relative;
33
padding: 16px;
44
height: 100%;
5-
.ant-btn {
6-
margin-left: 8px;
7-
padding: 8px;
8-
background-color: #f8f9fa;
9-
border: 1px #f8f9fa solid;
10-
}
11-
.ant-btn:hover {
12-
background-color: #fff;
13-
border: 1px #2f84ae solid;
14-
color: #2f84ae;
15-
}
165

176
.ant-alert {
187
margin-bottom: 16px;

media/src/components/APIPage/TryAPI/TryAPI.tsx

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import Editor from "@monaco-editor/react";
88
import { Alert, Button, Dropdown, Empty, Spin, message } from "antd";
99
import _ from "lodash";
1010
import React from "react";
11-
import { apiResponse } from "../../../mocks/openApiResponse";
1211
import { EditorLanguages } from "../../../types/EditorLanguages";
1312
import I18N from "../../../utils/I18N";
1413
import { getEditorMenuItems, parseXml } from "../../utils";
@@ -35,7 +34,7 @@ export const TryAPI: React.FC<TryAPIProps> = (props) => {
3534
const { openAPIResponses, isApiResultLoading, version, apiMeta, product, mode } = APIPageContext.useContainer();
3635
const doc = `${product}::${version}::${apiMeta.name}`;
3736
const [tab, setTab] = React.useState(TAB_PANES[0].value);
38-
const apiResult = openAPIResponses?.[doc] || apiResponse;
37+
const apiResult = openAPIResponses?.[doc];
3938

4039
const noShowMonacoEditor = ["byte"];
4140

@@ -158,22 +157,22 @@ export const TryAPI: React.FC<TryAPIProps> = (props) => {
158157
closable
159158
/>
160159
{apiResult?.result || isApiResultLoading ? (
161-
<div className="api-result">
160+
<div className="api-result w-full">
162161
{isApiResultLoading ? (
163162
<Spin>
164163
<span></span>
165164
</Spin>
166165
) : null}
167166

168167
<div className="api-res-header">
169-
<div className="title">{I18N.main.explorer.overview}</div>
168+
<div className="title mb-4 text-gray-900 text-sm font-medium">{I18N.main.explorer.overview}</div>
170169
{/* {apiResult?.result || props.isApiResultLoading ? ( */}
171-
<div className="res-info">
172-
<div className="item">
173-
<div className="debug-res">
170+
<div className="res-info mb-4 flex">
171+
<div className="item mr-6 mx-1 inline-block">
172+
<div className="debug-res flex">
174173
<div
175174
className={`codicon codicon-${
176-
String(statusCode).startsWith("2") ? "pass-filled success" : "error error-red"
175+
String(statusCode).startsWith("2") ? "pass-filled success text-green-600" : "error error-red text-red-700"
177176
}`}
178177
></div>
179178
<div className="value">
@@ -182,21 +181,21 @@ export const TryAPI: React.FC<TryAPIProps> = (props) => {
182181
</div>
183182
</div>
184183
{apiResult && statusCode ? (
185-
<div className="item">
184+
<div className="item mr-6 mx-1">
186185
{/* {httpStatusMessageMap[statusCode] || statusCode} */}
187-
<span className="label">{I18N.main.explorer.statusCode}</span>
186+
<span className="label font-medium mr-1 text-gray-500">{I18N.main.explorer.statusCode}</span>
188187
<span
189-
className={`value result-status ${
190-
String(statusCode).startsWith("2") ? "success" : "error error-red"
188+
className={`value result-status font-medium ${
189+
String(statusCode).startsWith("2") ? "text-green-600 success" : "error error-red text-red-700"
191190
}`}
192191
>
193192
{statusCode}
194193
</span>
195194
</div>
196195
) : null}
197196
{apiResult ? (
198-
<div className="item">
199-
<span className="label">{I18N.main.explorer.time}</span>
197+
<div className="item mr-6 mx-1">
198+
<span className="label font-medium mr-1 text-gray-500">{I18N.main.explorer.time}</span>
200199
<span className="value">{apiResult.cost}ms</span>
201200
</div>
202201
) : null}

media/src/components/common/MonacoEditor.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,16 @@
4040
position: relative;
4141
}
4242
}
43+
.content{
44+
.ant-btn {
45+
margin-left: 8px;
46+
padding: 8px;
47+
background-color: #f8f9fa;
48+
border: 1px #f8f9fa solid;
49+
}
50+
.ant-btn:hover {
51+
background-color: #fff;
52+
border: 1px #2f84ae solid;
53+
color: #2f84ae;
54+
}
55+
}

0 commit comments

Comments
 (0)