lynx-console 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +615 -112
- package/dist/index.css +0 -397
- package/dist/index.css.map +1 -1
- package/dist/index.mjs +616 -113
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/BottomSheet.css +0 -7
- package/src/components/BottomSheet.tsx +24 -3
- package/src/components/ConsolePanel.css +0 -141
- package/src/components/FloatingButton.css +0 -8
- package/src/components/FloatingButton.tsx +15 -2
- package/src/components/LogPanel.tsx +214 -26
- package/src/components/NetworkDetailSection.tsx +71 -9
- package/src/components/NetworkPanel.css +0 -91
- package/src/components/NetworkPanel.tsx +168 -20
- package/src/components/PerformancePanel.css +0 -60
- package/src/components/PerformancePanel.tsx +159 -29
- package/src/components/Tabs.css +0 -9
- package/src/components/Tabs.tsx +21 -3
- package/src/index.tsx +29 -23
- package/src/styles/ThemeContext.ts +10 -0
- package/src/styles/theme.ts +111 -0
- package/src/styles/global.css +0 -8
- package/src/styles/vars/color.ts +0 -41
- package/src/styles/vars/dimension.ts +0 -10
- package/src/styles/vars/index.css +0 -71
- package/src/styles/vars/index.ts +0 -18
- package/src/styles/vars/radius.ts +0 -2
|
@@ -17,21 +17,16 @@
|
|
|
17
17
|
.np-count {
|
|
18
18
|
font-size: 0.8125rem;
|
|
19
19
|
line-height: 1.125rem;
|
|
20
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
21
|
-
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
.np-clearButton {
|
|
25
23
|
padding: 3px 6px;
|
|
26
|
-
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
27
24
|
border-radius: 4px;
|
|
28
25
|
}
|
|
29
26
|
|
|
30
27
|
.np-clearButtonText {
|
|
31
28
|
font-size: 0.8125rem;
|
|
32
29
|
line-height: 1.125rem;
|
|
33
|
-
font-weight: var(--lynx-console-font-weight-medium);
|
|
34
|
-
color: var(--lynx-console-color-fg-neutral-muted);
|
|
35
30
|
}
|
|
36
31
|
|
|
37
32
|
.np-list {
|
|
@@ -48,25 +43,14 @@
|
|
|
48
43
|
.np-placeholderText {
|
|
49
44
|
font-size: 0.875rem;
|
|
50
45
|
line-height: 1.1875rem;
|
|
51
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
52
|
-
color: var(--lynx-console-color-fg-disabled);
|
|
53
46
|
}
|
|
54
47
|
|
|
55
48
|
.np-item {
|
|
56
49
|
padding: 8px;
|
|
57
50
|
border-bottom-width: 1px;
|
|
58
|
-
border-bottom-color: var(--lynx-console-color-stroke-neutral-weak);
|
|
59
51
|
border-bottom-style: solid;
|
|
60
52
|
}
|
|
61
53
|
|
|
62
|
-
.np-item--pending {
|
|
63
|
-
background-color: var(--lynx-console-color-palette-gray-100);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.np-item--error {
|
|
67
|
-
background-color: var(--lynx-console-color-palette-red-100);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
54
|
.np-itemHeader {
|
|
71
55
|
display: flex;
|
|
72
56
|
flex-direction: row;
|
|
@@ -78,68 +62,23 @@
|
|
|
78
62
|
.np-method {
|
|
79
63
|
font-size: 0.75rem;
|
|
80
64
|
line-height: 1rem;
|
|
81
|
-
font-weight: var(--lynx-console-font-weight-bold);
|
|
82
65
|
padding: 0 4px;
|
|
83
66
|
border-radius: 2px;
|
|
84
|
-
color: var(--lynx-console-color-fg-neutral);
|
|
85
|
-
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.np-method--GET {
|
|
89
|
-
color: var(--lynx-console-color-palette-blue-600);
|
|
90
|
-
background-color: var(--lynx-console-color-palette-blue-100);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.np-method--POST {
|
|
94
|
-
color: var(--lynx-console-color-palette-green-600);
|
|
95
|
-
background-color: var(--lynx-console-color-palette-green-100);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.np-method--PUT {
|
|
99
|
-
color: var(--lynx-console-color-palette-yellow-600);
|
|
100
|
-
background-color: var(--lynx-console-color-palette-yellow-100);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.np-method--PATCH {
|
|
104
|
-
color: var(--lynx-console-color-palette-purple-600);
|
|
105
|
-
background-color: var(--lynx-console-color-palette-purple-100);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.np-method--DELETE {
|
|
109
|
-
color: var(--lynx-console-color-palette-red-600);
|
|
110
|
-
background-color: var(--lynx-console-color-palette-red-100);
|
|
111
67
|
}
|
|
112
68
|
|
|
113
69
|
.np-statusCode {
|
|
114
70
|
font-size: 0.75rem;
|
|
115
71
|
line-height: 1rem;
|
|
116
|
-
font-weight: var(--lynx-console-font-weight-bold);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.np-statusCode--success {
|
|
120
|
-
color: var(--lynx-console-color-palette-green-600);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.np-statusCode--error {
|
|
124
|
-
color: var(--lynx-console-color-palette-red-600);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.np-statusCode--pending {
|
|
128
|
-
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
129
72
|
}
|
|
130
73
|
|
|
131
74
|
.np-time {
|
|
132
75
|
font-size: 0.75rem;
|
|
133
76
|
line-height: 1rem;
|
|
134
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
135
|
-
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
136
77
|
}
|
|
137
78
|
|
|
138
79
|
.np-url {
|
|
139
80
|
font-size: 0.8125rem;
|
|
140
81
|
line-height: 1.125rem;
|
|
141
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
142
|
-
color: var(--lynx-console-color-fg-neutral);
|
|
143
82
|
word-break: break-all;
|
|
144
83
|
margin-bottom: 4px;
|
|
145
84
|
}
|
|
@@ -147,8 +86,6 @@
|
|
|
147
86
|
.np-path {
|
|
148
87
|
font-size: 0.8125rem;
|
|
149
88
|
line-height: 1.125rem;
|
|
150
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
151
|
-
color: var(--lynx-console-color-fg-neutral);
|
|
152
89
|
word-break: break-all;
|
|
153
90
|
white-space: pre-wrap;
|
|
154
91
|
overflow: visible;
|
|
@@ -158,15 +95,12 @@
|
|
|
158
95
|
.np-details {
|
|
159
96
|
font-size: 0.8125rem;
|
|
160
97
|
line-height: 1.125rem;
|
|
161
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
162
|
-
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
163
98
|
}
|
|
164
99
|
|
|
165
100
|
.np-detailsContainer {
|
|
166
101
|
margin-top: 12px;
|
|
167
102
|
padding-top: 12px;
|
|
168
103
|
border-top-width: 1px;
|
|
169
|
-
border-top-color: var(--lynx-console-color-stroke-neutral-subtle);
|
|
170
104
|
border-top-style: solid;
|
|
171
105
|
}
|
|
172
106
|
|
|
@@ -183,19 +117,9 @@
|
|
|
183
117
|
cursor: pointer;
|
|
184
118
|
}
|
|
185
119
|
|
|
186
|
-
.np-tab--active {
|
|
187
|
-
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
120
|
.np-tabText {
|
|
191
121
|
font-size: 0.875rem;
|
|
192
122
|
line-height: 1.1875rem;
|
|
193
|
-
font-weight: var(--lynx-console-font-weight-medium);
|
|
194
|
-
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.np-tabText--active {
|
|
198
|
-
color: var(--lynx-console-color-fg-neutral);
|
|
199
123
|
}
|
|
200
124
|
|
|
201
125
|
.np-tabContent {
|
|
@@ -209,8 +133,6 @@
|
|
|
209
133
|
.np-detailSectionTitle {
|
|
210
134
|
font-size: 0.8125rem;
|
|
211
135
|
line-height: 1.125rem;
|
|
212
|
-
font-weight: var(--lynx-console-font-weight-bold);
|
|
213
|
-
color: var(--lynx-console-color-fg-neutral);
|
|
214
136
|
margin-bottom: 8px;
|
|
215
137
|
}
|
|
216
138
|
|
|
@@ -225,15 +147,12 @@
|
|
|
225
147
|
flex-direction: row;
|
|
226
148
|
gap: 8px;
|
|
227
149
|
padding: 4px 8px;
|
|
228
|
-
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
229
150
|
border-radius: 2px;
|
|
230
151
|
}
|
|
231
152
|
|
|
232
153
|
.np-tableKey {
|
|
233
154
|
font-size: 0.8125rem;
|
|
234
155
|
line-height: 1.125rem;
|
|
235
|
-
font-weight: var(--lynx-console-font-weight-bold);
|
|
236
|
-
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
237
156
|
min-width: 70px;
|
|
238
157
|
flex-shrink: 0;
|
|
239
158
|
}
|
|
@@ -241,8 +160,6 @@
|
|
|
241
160
|
.np-tableValue {
|
|
242
161
|
font-size: 0.8125rem;
|
|
243
162
|
line-height: 1.125rem;
|
|
244
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
245
|
-
color: var(--lynx-console-color-fg-neutral);
|
|
246
163
|
word-break: break-all;
|
|
247
164
|
flex: 1;
|
|
248
165
|
}
|
|
@@ -250,10 +167,7 @@
|
|
|
250
167
|
.np-bodyText {
|
|
251
168
|
font-size: 0.8125rem;
|
|
252
169
|
line-height: 1.125rem;
|
|
253
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
254
|
-
color: var(--lynx-console-color-fg-neutral);
|
|
255
170
|
padding: 8px;
|
|
256
|
-
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
257
171
|
border-radius: 4px;
|
|
258
172
|
word-break: break-all;
|
|
259
173
|
white-space: pre-wrap;
|
|
@@ -262,10 +176,7 @@
|
|
|
262
176
|
.np-errorText {
|
|
263
177
|
font-size: 0.8125rem;
|
|
264
178
|
line-height: 1.125rem;
|
|
265
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
266
|
-
color: var(--lynx-console-color-palette-red-600);
|
|
267
179
|
padding: 8px;
|
|
268
|
-
background-color: var(--lynx-console-color-palette-red-100);
|
|
269
180
|
border-radius: 4px;
|
|
270
181
|
word-break: break-all;
|
|
271
182
|
}
|
|
@@ -273,8 +184,6 @@
|
|
|
273
184
|
.np-emptyText {
|
|
274
185
|
font-size: 0.8125rem;
|
|
275
186
|
line-height: 1.125rem;
|
|
276
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
277
|
-
color: var(--lynx-console-color-fg-disabled);
|
|
278
187
|
text-align: center;
|
|
279
188
|
padding: 16px 0;
|
|
280
189
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { useState } from "@lynx-js/react";
|
|
2
|
+
import { useThemeColors } from "../styles/ThemeContext";
|
|
3
|
+
import { type ThemeColors, fontWeight } from "../styles/theme";
|
|
2
4
|
import type { NetworkEntry } from "../types";
|
|
3
5
|
import { FadeList } from "./FadeList";
|
|
4
6
|
import { NetworkDetailSection } from "./NetworkDetailSection";
|
|
@@ -11,10 +13,53 @@ interface NetworkPanelProps {
|
|
|
11
13
|
|
|
12
14
|
type TabType = "general" | "request" | "response";
|
|
13
15
|
|
|
16
|
+
function getMethodColors(colors: ThemeColors, method: string) {
|
|
17
|
+
switch (method) {
|
|
18
|
+
case "GET":
|
|
19
|
+
return { color: colors.palette.blue600, backgroundColor: colors.palette.blue100 };
|
|
20
|
+
case "POST":
|
|
21
|
+
return { color: colors.palette.green600, backgroundColor: colors.palette.green100 };
|
|
22
|
+
case "PUT":
|
|
23
|
+
return { color: colors.palette.yellow600, backgroundColor: colors.palette.yellow100 };
|
|
24
|
+
case "PATCH":
|
|
25
|
+
return { color: colors.palette.purple600, backgroundColor: colors.palette.purple100 };
|
|
26
|
+
case "DELETE":
|
|
27
|
+
return { color: colors.palette.red600, backgroundColor: colors.palette.red100 };
|
|
28
|
+
default:
|
|
29
|
+
return { color: colors.fg.neutral, backgroundColor: colors.bg.neutralWeak };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function getStatusCodeColor(
|
|
34
|
+
colors: ThemeColors,
|
|
35
|
+
variant: "success" | "error" | "pending",
|
|
36
|
+
): string {
|
|
37
|
+
switch (variant) {
|
|
38
|
+
case "success":
|
|
39
|
+
return colors.palette.green600;
|
|
40
|
+
case "error":
|
|
41
|
+
return colors.palette.red600;
|
|
42
|
+
case "pending":
|
|
43
|
+
return colors.fg.neutralSubtle;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function getItemBg(colors: ThemeColors, status: string): string | undefined {
|
|
48
|
+
switch (status) {
|
|
49
|
+
case "pending":
|
|
50
|
+
return colors.palette.gray100;
|
|
51
|
+
case "error":
|
|
52
|
+
return colors.palette.red100;
|
|
53
|
+
default:
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
14
58
|
export const NetworkPanel = ({
|
|
15
59
|
networks,
|
|
16
60
|
clearNetworks,
|
|
17
61
|
}: NetworkPanelProps) => {
|
|
62
|
+
const colors = useThemeColors();
|
|
18
63
|
const [selectedId, setSelectedId] = useState<string | null>(null);
|
|
19
64
|
const [activeTab, setActiveTab] = useState<TabType>("general");
|
|
20
65
|
const formatDuration = (duration?: number): string => {
|
|
@@ -69,21 +114,46 @@ export const NetworkPanel = ({
|
|
|
69
114
|
return (
|
|
70
115
|
<view className={"np-container"}>
|
|
71
116
|
<view className={"np-header"}>
|
|
72
|
-
<text
|
|
73
|
-
|
|
74
|
-
|
|
117
|
+
<text
|
|
118
|
+
className={"np-count"}
|
|
119
|
+
style={{ fontWeight: fontWeight.regular, color: colors.fg.neutralSubtle }}
|
|
120
|
+
>
|
|
121
|
+
Total: {networks.length} requests
|
|
122
|
+
</text>
|
|
123
|
+
<view
|
|
124
|
+
className={"np-clearButton"}
|
|
125
|
+
style={{ backgroundColor: colors.bg.neutralWeak }}
|
|
126
|
+
bindtap={clearNetworks}
|
|
127
|
+
>
|
|
128
|
+
<text
|
|
129
|
+
className={"np-clearButtonText"}
|
|
130
|
+
style={{ fontWeight: fontWeight.medium, color: colors.fg.neutralMuted }}
|
|
131
|
+
>
|
|
132
|
+
🗑
|
|
133
|
+
</text>
|
|
75
134
|
</view>
|
|
76
135
|
</view>
|
|
77
136
|
|
|
78
137
|
{networks.length === 0 ? (
|
|
79
138
|
<view className={"np-placeholder"}>
|
|
80
|
-
<text
|
|
139
|
+
<text
|
|
140
|
+
className={"np-placeholderText"}
|
|
141
|
+
style={{ fontWeight: fontWeight.regular, color: colors.fg.disabled }}
|
|
142
|
+
>
|
|
143
|
+
No network requests yet
|
|
144
|
+
</text>
|
|
81
145
|
</view>
|
|
82
146
|
) : (
|
|
83
147
|
<FadeList className={"np-list"}>
|
|
84
148
|
{networks.map((network) => (
|
|
85
149
|
<list-item key={network.id} item-key={network.id}>
|
|
86
|
-
<view
|
|
150
|
+
<view
|
|
151
|
+
className={"np-item"}
|
|
152
|
+
style={{
|
|
153
|
+
backgroundColor: getItemBg(colors, network.status),
|
|
154
|
+
borderBottomColor: colors.stroke.neutralWeak,
|
|
155
|
+
}}
|
|
156
|
+
>
|
|
87
157
|
<view
|
|
88
158
|
className={"np-itemHeader"}
|
|
89
159
|
bindtap={() =>
|
|
@@ -91,32 +161,56 @@ export const NetworkPanel = ({
|
|
|
91
161
|
}
|
|
92
162
|
>
|
|
93
163
|
<text
|
|
94
|
-
className={
|
|
164
|
+
className={"np-method"}
|
|
165
|
+
style={{
|
|
166
|
+
fontWeight: fontWeight.bold,
|
|
167
|
+
...getMethodColors(colors, network.method),
|
|
168
|
+
}}
|
|
95
169
|
>
|
|
96
170
|
{network.method}
|
|
97
171
|
</text>
|
|
98
172
|
{network.statusCode && (
|
|
99
173
|
<text
|
|
100
|
-
className={
|
|
174
|
+
className={"np-statusCode"}
|
|
175
|
+
style={{
|
|
176
|
+
fontWeight: fontWeight.bold,
|
|
177
|
+
color: getStatusCodeColor(
|
|
178
|
+
colors,
|
|
179
|
+
getStatusCodeVariant(network.status, network.statusCode),
|
|
180
|
+
),
|
|
181
|
+
}}
|
|
101
182
|
>
|
|
102
183
|
{network.statusCode}
|
|
103
184
|
</text>
|
|
104
185
|
)}
|
|
105
186
|
{network.status === "pending" && (
|
|
106
|
-
<text
|
|
187
|
+
<text
|
|
188
|
+
className={"np-statusCode"}
|
|
189
|
+
style={{
|
|
190
|
+
fontWeight: fontWeight.bold,
|
|
191
|
+
color: colors.fg.neutralSubtle,
|
|
192
|
+
}}
|
|
193
|
+
>
|
|
107
194
|
Pending...
|
|
108
195
|
</text>
|
|
109
196
|
)}
|
|
110
|
-
<text
|
|
197
|
+
<text
|
|
198
|
+
className={"np-time"}
|
|
199
|
+
style={{ fontWeight: fontWeight.regular, color: colors.fg.neutralSubtle }}
|
|
200
|
+
>
|
|
111
201
|
{formatDuration(network.duration)}
|
|
112
202
|
</text>
|
|
113
|
-
<text
|
|
203
|
+
<text
|
|
204
|
+
className={"np-time"}
|
|
205
|
+
style={{ fontWeight: fontWeight.regular, color: colors.fg.neutralSubtle }}
|
|
206
|
+
>
|
|
114
207
|
{new Date(network.startTime).toISOString()}
|
|
115
208
|
</text>
|
|
116
209
|
</view>
|
|
117
210
|
|
|
118
211
|
<text
|
|
119
212
|
className={"np-path"}
|
|
213
|
+
style={{ fontWeight: fontWeight.regular, color: colors.fg.neutral }}
|
|
120
214
|
bindtap={() =>
|
|
121
215
|
setSelectedId(selectedId === network.id ? null : network.id)
|
|
122
216
|
}
|
|
@@ -125,35 +219,71 @@ export const NetworkPanel = ({
|
|
|
125
219
|
</text>
|
|
126
220
|
|
|
127
221
|
{selectedId === network.id && (
|
|
128
|
-
<view
|
|
222
|
+
<view
|
|
223
|
+
className={"np-detailsContainer"}
|
|
224
|
+
style={{ borderTopColor: colors.stroke.neutralSubtle }}
|
|
225
|
+
>
|
|
129
226
|
{/* Tabs */}
|
|
130
227
|
<view className={"np-tabs"}>
|
|
131
228
|
<view
|
|
132
|
-
className={
|
|
229
|
+
className={"np-tab"}
|
|
230
|
+
style={{
|
|
231
|
+
backgroundColor:
|
|
232
|
+
activeTab === "general" ? colors.bg.neutralWeak : undefined,
|
|
233
|
+
}}
|
|
133
234
|
bindtap={() => setActiveTab("general")}
|
|
134
235
|
>
|
|
135
236
|
<text
|
|
136
|
-
className={
|
|
237
|
+
className={"np-tabText"}
|
|
238
|
+
style={{
|
|
239
|
+
fontWeight: fontWeight.medium,
|
|
240
|
+
color:
|
|
241
|
+
activeTab === "general"
|
|
242
|
+
? colors.fg.neutral
|
|
243
|
+
: colors.fg.neutralSubtle,
|
|
244
|
+
}}
|
|
137
245
|
>
|
|
138
246
|
General
|
|
139
247
|
</text>
|
|
140
248
|
</view>
|
|
141
249
|
<view
|
|
142
|
-
className={
|
|
250
|
+
className={"np-tab"}
|
|
251
|
+
style={{
|
|
252
|
+
backgroundColor:
|
|
253
|
+
activeTab === "request" ? colors.bg.neutralWeak : undefined,
|
|
254
|
+
}}
|
|
143
255
|
bindtap={() => setActiveTab("request")}
|
|
144
256
|
>
|
|
145
257
|
<text
|
|
146
|
-
className={
|
|
258
|
+
className={"np-tabText"}
|
|
259
|
+
style={{
|
|
260
|
+
fontWeight: fontWeight.medium,
|
|
261
|
+
color:
|
|
262
|
+
activeTab === "request"
|
|
263
|
+
? colors.fg.neutral
|
|
264
|
+
: colors.fg.neutralSubtle,
|
|
265
|
+
}}
|
|
147
266
|
>
|
|
148
267
|
Request
|
|
149
268
|
</text>
|
|
150
269
|
</view>
|
|
151
270
|
<view
|
|
152
|
-
className={
|
|
271
|
+
className={"np-tab"}
|
|
272
|
+
style={{
|
|
273
|
+
backgroundColor:
|
|
274
|
+
activeTab === "response" ? colors.bg.neutralWeak : undefined,
|
|
275
|
+
}}
|
|
153
276
|
bindtap={() => setActiveTab("response")}
|
|
154
277
|
>
|
|
155
278
|
<text
|
|
156
|
-
className={
|
|
279
|
+
className={"np-tabText"}
|
|
280
|
+
style={{
|
|
281
|
+
fontWeight: fontWeight.medium,
|
|
282
|
+
color:
|
|
283
|
+
activeTab === "response"
|
|
284
|
+
? colors.fg.neutral
|
|
285
|
+
: colors.fg.neutralSubtle,
|
|
286
|
+
}}
|
|
157
287
|
>
|
|
158
288
|
Response
|
|
159
289
|
</text>
|
|
@@ -165,9 +295,27 @@ export const NetworkPanel = ({
|
|
|
165
295
|
{activeTab === "general" && (
|
|
166
296
|
<view className={"np-table"}>
|
|
167
297
|
{getGeneralInfo(network).map((item) => (
|
|
168
|
-
<view
|
|
169
|
-
|
|
170
|
-
|
|
298
|
+
<view
|
|
299
|
+
key={item.key}
|
|
300
|
+
className={"np-tableRow"}
|
|
301
|
+
style={{ backgroundColor: colors.bg.neutralWeak }}
|
|
302
|
+
>
|
|
303
|
+
<text
|
|
304
|
+
className={"np-tableKey"}
|
|
305
|
+
style={{
|
|
306
|
+
fontWeight: fontWeight.bold,
|
|
307
|
+
color: colors.fg.neutralSubtle,
|
|
308
|
+
}}
|
|
309
|
+
>
|
|
310
|
+
{item.key}
|
|
311
|
+
</text>
|
|
312
|
+
<text
|
|
313
|
+
className={"np-tableValue"}
|
|
314
|
+
style={{
|
|
315
|
+
fontWeight: fontWeight.regular,
|
|
316
|
+
color: colors.fg.neutral,
|
|
317
|
+
}}
|
|
318
|
+
>
|
|
171
319
|
{item.value}
|
|
172
320
|
</text>
|
|
173
321
|
</view>
|
|
@@ -13,28 +13,22 @@
|
|
|
13
13
|
margin-bottom: 8px;
|
|
14
14
|
padding-bottom: 4px;
|
|
15
15
|
border-bottom-width: 1px;
|
|
16
|
-
border-bottom-color: var(--lynx-console-color-stroke-neutral-subtle);
|
|
17
16
|
border-bottom-style: solid;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
.pp-count {
|
|
21
20
|
font-size: 0.8125rem;
|
|
22
21
|
line-height: 1.125rem;
|
|
23
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
24
|
-
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
25
22
|
}
|
|
26
23
|
|
|
27
24
|
.pp-clearButton {
|
|
28
25
|
padding: 3px 6px;
|
|
29
|
-
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
30
26
|
border-radius: 4px;
|
|
31
27
|
}
|
|
32
28
|
|
|
33
29
|
.pp-clearButtonText {
|
|
34
30
|
font-size: 0.8125rem;
|
|
35
31
|
line-height: 1.125rem;
|
|
36
|
-
font-weight: var(--lynx-console-font-weight-medium);
|
|
37
|
-
color: var(--lynx-console-color-fg-neutral-muted);
|
|
38
32
|
}
|
|
39
33
|
|
|
40
34
|
.pp-list {
|
|
@@ -51,14 +45,11 @@
|
|
|
51
45
|
.pp-placeholderText {
|
|
52
46
|
font-size: 0.875rem;
|
|
53
47
|
line-height: 1.1875rem;
|
|
54
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
55
|
-
color: var(--lynx-console-color-fg-disabled);
|
|
56
48
|
}
|
|
57
49
|
|
|
58
50
|
.pp-item {
|
|
59
51
|
padding: 8px;
|
|
60
52
|
border-bottom-width: 1px;
|
|
61
|
-
border-bottom-color: var(--lynx-console-color-stroke-neutral-weak);
|
|
62
53
|
border-bottom-style: solid;
|
|
63
54
|
}
|
|
64
55
|
|
|
@@ -73,45 +64,18 @@
|
|
|
73
64
|
.pp-entryType {
|
|
74
65
|
font-size: 0.75rem;
|
|
75
66
|
line-height: 1rem;
|
|
76
|
-
font-weight: var(--lynx-console-font-weight-bold);
|
|
77
67
|
padding: 0 6px;
|
|
78
68
|
border-radius: 2px;
|
|
79
|
-
color: var(--lynx-console-color-fg-neutral);
|
|
80
|
-
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.pp-entryType--init {
|
|
84
|
-
color: var(--lynx-console-color-palette-blue-600);
|
|
85
|
-
background-color: var(--lynx-console-color-palette-blue-100);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.pp-entryType--metric {
|
|
89
|
-
color: var(--lynx-console-color-palette-green-600);
|
|
90
|
-
background-color: var(--lynx-console-color-palette-green-100);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.pp-entryType--pipeline {
|
|
94
|
-
color: var(--lynx-console-color-palette-purple-600);
|
|
95
|
-
background-color: var(--lynx-console-color-palette-purple-100);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.pp-entryType--resource {
|
|
99
|
-
color: var(--lynx-console-color-palette-yellow-600);
|
|
100
|
-
background-color: var(--lynx-console-color-palette-yellow-100);
|
|
101
69
|
}
|
|
102
70
|
|
|
103
71
|
.pp-entryName {
|
|
104
72
|
font-size: 0.75rem;
|
|
105
73
|
line-height: 1rem;
|
|
106
|
-
font-weight: var(--lynx-console-font-weight-medium);
|
|
107
|
-
color: var(--lynx-console-color-fg-neutral);
|
|
108
74
|
}
|
|
109
75
|
|
|
110
76
|
.pp-timestamp {
|
|
111
77
|
font-size: 0.75rem;
|
|
112
78
|
line-height: 1rem;
|
|
113
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
114
|
-
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
115
79
|
}
|
|
116
80
|
|
|
117
81
|
.pp-fcpMetricHeader {
|
|
@@ -124,9 +88,6 @@
|
|
|
124
88
|
.pp-fcpHighlight {
|
|
125
89
|
font-size: 0.8125rem;
|
|
126
90
|
line-height: 1.125rem;
|
|
127
|
-
font-weight: var(--lynx-console-font-weight-bold);
|
|
128
|
-
color: var(--lynx-console-color-palette-blue-600);
|
|
129
|
-
background-color: var(--lynx-console-color-palette-blue-100);
|
|
130
91
|
padding: 4px 8px;
|
|
131
92
|
border-radius: 4px;
|
|
132
93
|
margin-top: 4px;
|
|
@@ -145,15 +106,12 @@
|
|
|
145
106
|
align-items: center;
|
|
146
107
|
gap: 8px;
|
|
147
108
|
padding: 4px 8px;
|
|
148
|
-
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
149
109
|
border-radius: 2px;
|
|
150
110
|
}
|
|
151
111
|
|
|
152
112
|
.pp-metricName {
|
|
153
113
|
font-size: 0.8125rem;
|
|
154
114
|
line-height: 1.125rem;
|
|
155
|
-
font-weight: var(--lynx-console-font-weight-medium);
|
|
156
|
-
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
157
115
|
min-width: 100px;
|
|
158
116
|
flex-shrink: 0;
|
|
159
117
|
}
|
|
@@ -161,8 +119,6 @@
|
|
|
161
119
|
.pp-metricValue {
|
|
162
120
|
font-size: 0.8125rem;
|
|
163
121
|
line-height: 1.125rem;
|
|
164
|
-
font-weight: var(--lynx-console-font-weight-bold);
|
|
165
|
-
color: var(--lynx-console-color-palette-green-600);
|
|
166
122
|
flex: 1;
|
|
167
123
|
}
|
|
168
124
|
|
|
@@ -182,13 +138,10 @@
|
|
|
182
138
|
.pp-fcpSectionDescription {
|
|
183
139
|
font-size: 0.8125rem;
|
|
184
140
|
line-height: 1.125rem;
|
|
185
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
186
|
-
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
187
141
|
margin-bottom: 4px;
|
|
188
142
|
}
|
|
189
143
|
|
|
190
144
|
.pp-fcpMetric {
|
|
191
|
-
background-color: var(--lynx-console-color-bg-layer-default);
|
|
192
145
|
border-radius: 4px;
|
|
193
146
|
display: flex;
|
|
194
147
|
flex-direction: column;
|
|
@@ -198,51 +151,38 @@
|
|
|
198
151
|
.pp-fcpMetricName {
|
|
199
152
|
font-size: 0.75rem;
|
|
200
153
|
line-height: 1rem;
|
|
201
|
-
font-weight: var(--lynx-console-font-weight-bold);
|
|
202
|
-
color: var(--lynx-console-color-fg-neutral);
|
|
203
154
|
}
|
|
204
155
|
|
|
205
156
|
.pp-fcpMetricValue {
|
|
206
157
|
font-size: 0.6875rem;
|
|
207
158
|
line-height: 0.9375rem;
|
|
208
|
-
font-weight: var(--lynx-console-font-weight-bold);
|
|
209
|
-
color: var(--lynx-console-color-palette-blue-600);
|
|
210
159
|
}
|
|
211
160
|
|
|
212
161
|
.pp-fcpMetricDescription {
|
|
213
162
|
font-size: 0.8125rem;
|
|
214
163
|
line-height: 1.125rem;
|
|
215
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
216
|
-
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
217
164
|
}
|
|
218
165
|
|
|
219
166
|
.pp-fcpMetricFormula {
|
|
220
167
|
font-size: 0.875rem;
|
|
221
168
|
line-height: 1.1875rem;
|
|
222
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
223
|
-
color: var(--lynx-console-color-fg-disabled);
|
|
224
169
|
font-family: monospace;
|
|
225
170
|
}
|
|
226
171
|
|
|
227
172
|
.pp-rawEntrySection {
|
|
228
173
|
padding: 12px;
|
|
229
|
-
background-color: var(--lynx-console-color-bg-neutral-weak);
|
|
230
174
|
border-radius: 4px;
|
|
231
175
|
}
|
|
232
176
|
|
|
233
177
|
.pp-detailTitle {
|
|
234
178
|
font-size: 0.8125rem;
|
|
235
179
|
line-height: 1.125rem;
|
|
236
|
-
font-weight: var(--lynx-console-font-weight-bold);
|
|
237
|
-
color: var(--lynx-console-color-fg-neutral);
|
|
238
180
|
margin-bottom: 8px;
|
|
239
181
|
}
|
|
240
182
|
|
|
241
183
|
.pp-rawEntry {
|
|
242
184
|
font-size: 0.8125rem;
|
|
243
185
|
line-height: 1.125rem;
|
|
244
|
-
font-weight: var(--lynx-console-font-weight-regular);
|
|
245
|
-
color: var(--lynx-console-color-fg-neutral-subtle);
|
|
246
186
|
font-family: monospace;
|
|
247
187
|
white-space: pre-wrap;
|
|
248
188
|
word-break: break-all;
|