react-native-inapp-inspector 1.0.9 → 1.0.10
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/README.md +5 -6
- package/dist/commonjs/components/AnalyticsDetail.js +28 -23
- package/dist/commonjs/components/AnalyticsEventCard.js +9 -9
- package/dist/commonjs/components/BrandSquareIcon.d.ts +5 -0
- package/dist/commonjs/components/BrandSquareIcon.js +180 -0
- package/dist/commonjs/components/CodeSnippet.js +32 -24
- package/dist/commonjs/components/ConsoleLogCard.js +127 -70
- package/dist/commonjs/components/JsonViewer.d.ts +2 -1
- package/dist/commonjs/components/JsonViewer.js +2 -2
- package/dist/commonjs/components/MetaAccordion.d.ts +1 -1
- package/dist/commonjs/components/MetaAccordion.js +45 -2
- package/dist/commonjs/components/NetworkIcons.d.ts +7 -0
- package/dist/commonjs/components/NetworkIcons.js +42 -1
- package/dist/commonjs/components/ReduxTreeView.d.ts +6 -0
- package/dist/commonjs/components/ReduxTreeView.js +403 -0
- package/dist/commonjs/components/TouchableScale.js +15 -1
- package/dist/commonjs/components/TreeNode.js +3 -3
- package/dist/commonjs/customHooks/reduxLogger.d.ts +4 -0
- package/dist/commonjs/customHooks/reduxLogger.js +48 -2
- package/dist/commonjs/index.js +1520 -504
- package/dist/commonjs/styles/index.d.ts +11 -1
- package/dist/commonjs/styles/index.js +19 -9
- package/dist/commonjs/types/index.d.ts +4 -0
- package/dist/esm/components/AnalyticsDetail.js +28 -23
- package/dist/esm/components/AnalyticsEventCard.js +9 -9
- package/dist/esm/components/BrandSquareIcon.d.ts +5 -0
- package/dist/esm/components/BrandSquareIcon.js +140 -0
- package/dist/esm/components/CodeSnippet.js +32 -24
- package/dist/esm/components/ConsoleLogCard.js +127 -70
- package/dist/esm/components/JsonViewer.d.ts +2 -1
- package/dist/esm/components/JsonViewer.js +2 -2
- package/dist/esm/components/MetaAccordion.d.ts +1 -1
- package/dist/esm/components/MetaAccordion.js +46 -3
- package/dist/esm/components/NetworkIcons.d.ts +7 -0
- package/dist/esm/components/NetworkIcons.js +34 -0
- package/dist/esm/components/ReduxTreeView.d.ts +6 -0
- package/dist/esm/components/ReduxTreeView.js +366 -0
- package/dist/esm/components/TouchableScale.js +16 -2
- package/dist/esm/components/TreeNode.js +3 -3
- package/dist/esm/customHooks/reduxLogger.d.ts +4 -0
- package/dist/esm/customHooks/reduxLogger.js +43 -1
- package/dist/esm/index.js +1523 -507
- package/dist/esm/styles/index.d.ts +11 -1
- package/dist/esm/styles/index.js +19 -9
- package/dist/esm/types/index.d.ts +4 -0
- package/example/App.tsx +46 -0
- package/package.json +7 -5
package/dist/commonjs/index.js
CHANGED
|
@@ -50,6 +50,7 @@ const CopyButton_1 = __importDefault(require("./components/CopyButton"));
|
|
|
50
50
|
const SectionHeader_1 = __importDefault(require("./components/SectionHeader"));
|
|
51
51
|
const EmptyState_1 = __importDefault(require("./components/EmptyState"));
|
|
52
52
|
const JsonViewer_1 = __importDefault(require("./components/JsonViewer"));
|
|
53
|
+
const ReduxTreeView_1 = require("./components/ReduxTreeView");
|
|
53
54
|
const DomainHeader_1 = __importDefault(require("./components/DomainHeader"));
|
|
54
55
|
const DiffViewer_1 = __importDefault(require("./components/DiffViewer"));
|
|
55
56
|
const LogCard_1 = __importDefault(require("./components/LogCard"));
|
|
@@ -75,8 +76,67 @@ const logFilters_1 = require("./customHooks/logFilters");
|
|
|
75
76
|
const analyticsLogger_1 = require("./customHooks/analyticsLogger");
|
|
76
77
|
const AnalyticsEventCard_1 = __importStar(require("./components/AnalyticsEventCard"));
|
|
77
78
|
const AnalyticsDetail_1 = __importDefault(require("./components/AnalyticsDetail"));
|
|
78
|
-
// WebView
|
|
79
79
|
const webViewLogger_1 = require("./customHooks/webViewLogger");
|
|
80
|
+
let OriginalWebView = null;
|
|
81
|
+
try {
|
|
82
|
+
const RNWebView = require('react-native-webview');
|
|
83
|
+
OriginalWebView = RNWebView.WebView || RNWebView.default;
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
// Silent fail
|
|
87
|
+
}
|
|
88
|
+
const previewInspectScript = `
|
|
89
|
+
(function() {
|
|
90
|
+
var style = document.createElement('style');
|
|
91
|
+
style.innerHTML = '* { cursor: pointer !important; }';
|
|
92
|
+
document.head.appendChild(style);
|
|
93
|
+
|
|
94
|
+
document.addEventListener('click', function(e) {
|
|
95
|
+
var el = e.target;
|
|
96
|
+
if (!el) return;
|
|
97
|
+
|
|
98
|
+
e.preventDefault();
|
|
99
|
+
e.stopPropagation();
|
|
100
|
+
|
|
101
|
+
var oldOutline = el.style.outline;
|
|
102
|
+
var oldTransition = el.style.transition;
|
|
103
|
+
el.style.transition = 'outline 0.15s ease';
|
|
104
|
+
el.style.outline = '3px solid #684B9B';
|
|
105
|
+
setTimeout(function() {
|
|
106
|
+
el.style.outline = oldOutline;
|
|
107
|
+
el.style.transition = oldTransition;
|
|
108
|
+
}, 600);
|
|
109
|
+
|
|
110
|
+
var tagName = el.tagName.toLowerCase();
|
|
111
|
+
var searchStr = '<' + tagName;
|
|
112
|
+
|
|
113
|
+
if (el.id) {
|
|
114
|
+
searchStr += ' id="' + el.id + '"';
|
|
115
|
+
} else if (el.className && typeof el.className === 'string') {
|
|
116
|
+
var firstClass = el.className.trim().split(/\\s+/)[0];
|
|
117
|
+
if (firstClass) {
|
|
118
|
+
searchStr += ' class="' + firstClass;
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
var text = (el.textContent || '').trim().substring(0, 25);
|
|
122
|
+
if (text) {
|
|
123
|
+
searchStr = text;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (window.ReactNativeWebView && window.ReactNativeWebView.postMessage) {
|
|
128
|
+
window.ReactNativeWebView.postMessage(JSON.stringify({
|
|
129
|
+
type: 'preview-inspect',
|
|
130
|
+
tagName: tagName,
|
|
131
|
+
id: el.id || '',
|
|
132
|
+
className: typeof el.className === 'string' ? el.className : '',
|
|
133
|
+
searchStr: searchStr
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
}, true);
|
|
137
|
+
})();
|
|
138
|
+
true;
|
|
139
|
+
`;
|
|
80
140
|
const reduxLogger_1 = require("./customHooks/reduxLogger");
|
|
81
141
|
const constants_1 = require("./constants");
|
|
82
142
|
const NavigationTracker = ({ onStateChange }) => {
|
|
@@ -86,7 +146,7 @@ const NavigationTracker = ({ onStateChange }) => {
|
|
|
86
146
|
}, [navState, onStateChange]);
|
|
87
147
|
return null;
|
|
88
148
|
};
|
|
89
|
-
const NetworkInspector = () => {
|
|
149
|
+
const NetworkInspector = ({ enabled = true }) => {
|
|
90
150
|
const [isDark, setIsDark] = (0, react_1.useState)(false);
|
|
91
151
|
const [reduxState, setReduxState] = (0, react_1.useState)(null);
|
|
92
152
|
const [expandedReducers, setExpandedReducers] = (0, react_1.useState)({});
|
|
@@ -98,10 +158,21 @@ const NetworkInspector = () => {
|
|
|
98
158
|
const [search, setSearch] = (0, react_1.useState)('');
|
|
99
159
|
const [detailSearch, setDetailSearch] = (0, react_1.useState)('');
|
|
100
160
|
const [reduxSearch, setReduxSearch] = (0, react_1.useState)('');
|
|
101
|
-
const [apiDetailActiveTab, setApiDetailActiveTab] = (0, react_1.useState)('
|
|
161
|
+
const [apiDetailActiveTab, setApiDetailActiveTab] = (0, react_1.useState)('response');
|
|
162
|
+
(0, react_1.useEffect)(() => {
|
|
163
|
+
if (enabled && visible) {
|
|
164
|
+
react_native_1.LogBox.ignoreAllLogs(true);
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
react_native_1.LogBox.ignoreAllLogs(false);
|
|
168
|
+
}
|
|
169
|
+
return () => {
|
|
170
|
+
react_native_1.LogBox.ignoreAllLogs(false);
|
|
171
|
+
};
|
|
172
|
+
}, [enabled, visible]);
|
|
102
173
|
(0, react_1.useEffect)(() => {
|
|
103
174
|
if (selected) {
|
|
104
|
-
setApiDetailActiveTab('
|
|
175
|
+
setApiDetailActiveTab('response');
|
|
105
176
|
setDetailSearch('');
|
|
106
177
|
}
|
|
107
178
|
}, [selected]);
|
|
@@ -122,9 +193,43 @@ const NetworkInspector = () => {
|
|
|
122
193
|
const [analyticsEvents, setAnalyticsEvents] = (0, react_1.useState)([]);
|
|
123
194
|
// ─── Logs state ────────────────────────────────────────────────────────────
|
|
124
195
|
const [consoleLogs, setConsoleLogs] = (0, react_1.useState)([]);
|
|
196
|
+
const [lastReadLogsCount, setLastReadLogsCount] = (0, react_1.useState)(0);
|
|
197
|
+
const [lastReadApisCount, setLastReadApisCount] = (0, react_1.useState)(0);
|
|
198
|
+
(0, react_1.useEffect)(() => {
|
|
199
|
+
if (visible) {
|
|
200
|
+
if (activeTab === 'apis') {
|
|
201
|
+
setLastReadApisCount(logs.length);
|
|
202
|
+
}
|
|
203
|
+
if (activeTab === 'logs') {
|
|
204
|
+
setLastReadLogsCount(consoleLogs.length);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}, [visible]);
|
|
208
|
+
(0, react_1.useEffect)(() => {
|
|
209
|
+
if (activeTab === 'apis') {
|
|
210
|
+
setLastReadApisCount(logs.length);
|
|
211
|
+
}
|
|
212
|
+
}, [activeTab, logs.length]);
|
|
213
|
+
(0, react_1.useEffect)(() => {
|
|
214
|
+
if (activeTab === 'logs') {
|
|
215
|
+
setLastReadLogsCount(consoleLogs.length);
|
|
216
|
+
}
|
|
217
|
+
}, [activeTab, consoleLogs.length]);
|
|
218
|
+
const [maxConsoleLogs, setMaxConsoleLogs] = (0, react_1.useState)(200);
|
|
219
|
+
const [showConsoleLevels, setShowConsoleLevels] = (0, react_1.useState)({
|
|
220
|
+
info: true,
|
|
221
|
+
warn: true,
|
|
222
|
+
error: true,
|
|
223
|
+
});
|
|
125
224
|
const visibleConsoleLogs = (0, react_1.useMemo)(() => {
|
|
126
|
-
|
|
225
|
+
const filtered = consoleLogs.filter(log => {
|
|
127
226
|
const type = log.type;
|
|
227
|
+
if (type === 'info' && !showConsoleLevels.info)
|
|
228
|
+
return false;
|
|
229
|
+
if (type === 'warn' && !showConsoleLevels.warn)
|
|
230
|
+
return false;
|
|
231
|
+
if (type === 'error' && !showConsoleLevels.error)
|
|
232
|
+
return false;
|
|
128
233
|
const message = log.message || '';
|
|
129
234
|
const allPrefixes = [
|
|
130
235
|
...((logFilters_1.IGNORED_LOG_PREFIXES && logFilters_1.IGNORED_LOG_PREFIXES.info) || []),
|
|
@@ -138,13 +243,79 @@ const NetworkInspector = () => {
|
|
|
138
243
|
message.toLowerCase().trim().includes(prefix.toLowerCase().trim()));
|
|
139
244
|
return !isIgnored;
|
|
140
245
|
});
|
|
141
|
-
|
|
246
|
+
return filtered.slice(0, maxConsoleLogs);
|
|
247
|
+
}, [consoleLogs, showConsoleLevels, maxConsoleLogs]);
|
|
142
248
|
const [logSearch, setLogSearch] = (0, react_1.useState)('');
|
|
143
249
|
const [logFilters, setLogFilters] = (0, react_1.useState)(new Set(['user-log']));
|
|
144
250
|
// ─── WebView state ─────────────────────────────────────────────────────────
|
|
145
251
|
const [webViewLogs, setWebViewLogs] = (0, react_1.useState)([]);
|
|
146
252
|
const [webViewNavHistory, setWebViewNavHistory] = (0, react_1.useState)([]);
|
|
147
253
|
const [webViewSubTab, setWebViewSubTab] = (0, react_1.useState)('html');
|
|
254
|
+
const [inspectedElement, setInspectedElement] = (0, react_1.useState)(null);
|
|
255
|
+
// ─── Settings state ──────────────────────────────────────────────────────────
|
|
256
|
+
const [settingsPage, setSettingsPage] = (0, react_1.useState)(null);
|
|
257
|
+
const [tabVisibility, setTabVisibility] = (0, react_1.useState)({
|
|
258
|
+
insights: true,
|
|
259
|
+
apis: true,
|
|
260
|
+
logs: true,
|
|
261
|
+
analytics: true,
|
|
262
|
+
webview: true,
|
|
263
|
+
redux: true,
|
|
264
|
+
});
|
|
265
|
+
const [maxNetworkLogs, setMaxNetworkLogs] = (0, react_1.useState)(100);
|
|
266
|
+
const [webViewCaptureCssJs, setWebViewCaptureCssJs] = (0, react_1.useState)(true);
|
|
267
|
+
const [reduxAutoRefresh, setReduxAutoRefreshState] = (0, react_1.useState)(true);
|
|
268
|
+
const [reduxExpandDepth, setReduxExpandDepth] = (0, react_1.useState)(1);
|
|
269
|
+
const [slowRequestThreshold, setSlowRequestThreshold] = (0, react_1.useState)(1000);
|
|
270
|
+
const [insightsShowConsoleAlerts, setInsightsShowConsoleAlerts] = (0, react_1.useState)(true);
|
|
271
|
+
(0, react_1.useEffect)(() => {
|
|
272
|
+
(0, reduxLogger_1.setReduxAutoRefresh)(reduxAutoRefresh);
|
|
273
|
+
}, [reduxAutoRefresh]);
|
|
274
|
+
const toggleTabVisibility = (key) => {
|
|
275
|
+
if (key === 'apis')
|
|
276
|
+
return;
|
|
277
|
+
setTabVisibility(prev => {
|
|
278
|
+
const nextVal = !prev[key];
|
|
279
|
+
const newVisibility = { ...prev, [key]: nextVal };
|
|
280
|
+
if (!nextVal && activeTab === key) {
|
|
281
|
+
setActiveTab('apis');
|
|
282
|
+
}
|
|
283
|
+
return newVisibility;
|
|
284
|
+
});
|
|
285
|
+
};
|
|
286
|
+
const navigateFromDashboard = (key) => {
|
|
287
|
+
setTabVisibility(prev => ({ ...prev, [key]: true }));
|
|
288
|
+
setActiveTab(key);
|
|
289
|
+
};
|
|
290
|
+
const getSearchTermForTab = () => {
|
|
291
|
+
if (!inspectedElement)
|
|
292
|
+
return '';
|
|
293
|
+
const { tagName, id, className, searchStr } = inspectedElement;
|
|
294
|
+
if (htmlSubTab === 'html') {
|
|
295
|
+
return searchStr;
|
|
296
|
+
}
|
|
297
|
+
if (htmlSubTab === 'css') {
|
|
298
|
+
if (className) {
|
|
299
|
+
const firstClass = className.trim().split(/\s+/)[0];
|
|
300
|
+
if (firstClass)
|
|
301
|
+
return `.${firstClass}`;
|
|
302
|
+
}
|
|
303
|
+
if (id)
|
|
304
|
+
return `#${id}`;
|
|
305
|
+
return tagName;
|
|
306
|
+
}
|
|
307
|
+
if (htmlSubTab === 'javascript') {
|
|
308
|
+
if (id)
|
|
309
|
+
return id;
|
|
310
|
+
if (className) {
|
|
311
|
+
const firstClass = className.trim().split(/\s+/)[0];
|
|
312
|
+
if (firstClass)
|
|
313
|
+
return firstClass;
|
|
314
|
+
}
|
|
315
|
+
return tagName;
|
|
316
|
+
}
|
|
317
|
+
return '';
|
|
318
|
+
};
|
|
148
319
|
const [webViewSearch, setWebViewSearch] = (0, react_1.useState)('');
|
|
149
320
|
const [webViewHtml, setWebViewHtml] = (0, react_1.useState)('');
|
|
150
321
|
const [webViewCss, setWebViewCss] = (0, react_1.useState)('');
|
|
@@ -183,6 +354,8 @@ const NetworkInspector = () => {
|
|
|
183
354
|
const [newLogIds, setNewLogIds] = (0, react_1.useState)(new Set());
|
|
184
355
|
const pulseAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
185
356
|
const badgeAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
357
|
+
const activePulseAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0.4)).current;
|
|
358
|
+
const unreadPulseAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
186
359
|
(0, react_1.useEffect)(() => {
|
|
187
360
|
const loop = react_native_1.Animated.loop(react_native_1.Animated.sequence([
|
|
188
361
|
react_native_1.Animated.timing(pulseAnim, {
|
|
@@ -199,6 +372,38 @@ const NetworkInspector = () => {
|
|
|
199
372
|
loop.start();
|
|
200
373
|
return () => loop.stop();
|
|
201
374
|
}, [pulseAnim]);
|
|
375
|
+
(0, react_1.useEffect)(() => {
|
|
376
|
+
const loop = react_native_1.Animated.loop(react_native_1.Animated.sequence([
|
|
377
|
+
react_native_1.Animated.timing(activePulseAnim, {
|
|
378
|
+
toValue: 1,
|
|
379
|
+
duration: 1200,
|
|
380
|
+
useNativeDriver: true,
|
|
381
|
+
}),
|
|
382
|
+
react_native_1.Animated.timing(activePulseAnim, {
|
|
383
|
+
toValue: 0.4,
|
|
384
|
+
duration: 1200,
|
|
385
|
+
useNativeDriver: true,
|
|
386
|
+
}),
|
|
387
|
+
]));
|
|
388
|
+
loop.start();
|
|
389
|
+
return () => loop.stop();
|
|
390
|
+
}, [activePulseAnim]);
|
|
391
|
+
(0, react_1.useEffect)(() => {
|
|
392
|
+
const loop = react_native_1.Animated.loop(react_native_1.Animated.sequence([
|
|
393
|
+
react_native_1.Animated.timing(unreadPulseAnim, {
|
|
394
|
+
toValue: 1.3,
|
|
395
|
+
duration: 800,
|
|
396
|
+
useNativeDriver: true,
|
|
397
|
+
}),
|
|
398
|
+
react_native_1.Animated.timing(unreadPulseAnim, {
|
|
399
|
+
toValue: 0.8,
|
|
400
|
+
duration: 800,
|
|
401
|
+
useNativeDriver: true,
|
|
402
|
+
}),
|
|
403
|
+
]));
|
|
404
|
+
loop.start();
|
|
405
|
+
return () => loop.stop();
|
|
406
|
+
}, [unreadPulseAnim]);
|
|
202
407
|
(0, react_1.useEffect)(() => {
|
|
203
408
|
if ((logs.length > 0 || analyticsEvents.length > 0) && newLogIds.size > 0) {
|
|
204
409
|
badgeAnim.setValue(0.8);
|
|
@@ -357,8 +562,8 @@ const NetworkInspector = () => {
|
|
|
357
562
|
if (sortOrder === 'oldest') {
|
|
358
563
|
result = [...result].reverse();
|
|
359
564
|
}
|
|
360
|
-
return result;
|
|
361
|
-
}, [logs, search, statusFilters, methodFilters, sortOrder]);
|
|
565
|
+
return result.slice(0, maxNetworkLogs);
|
|
566
|
+
}, [logs, search, statusFilters, methodFilters, sortOrder, maxNetworkLogs]);
|
|
362
567
|
const availableMethods = (0, react_1.useMemo)(() => {
|
|
363
568
|
const methods = new Set();
|
|
364
569
|
logs.forEach(log => {
|
|
@@ -755,6 +960,574 @@ const NetworkInspector = () => {
|
|
|
755
960
|
toggleSectionFilter,
|
|
756
961
|
toggleSectionCollapse,
|
|
757
962
|
]);
|
|
963
|
+
const renderSettings = () => {
|
|
964
|
+
if (settingsPage === 'main') {
|
|
965
|
+
const settingsTabs = [
|
|
966
|
+
{ key: 'insights', label: 'Insights', icon: 'insights' },
|
|
967
|
+
{ key: 'apis', label: 'APIs', icon: 'apis' },
|
|
968
|
+
{ key: 'logs', label: 'Logs', icon: 'logs' },
|
|
969
|
+
{ key: 'analytics', label: 'Analytics', icon: 'analytics' },
|
|
970
|
+
{ key: 'webview', label: 'WebView', icon: 'webview' },
|
|
971
|
+
{ key: 'redux', label: 'Redux', icon: 'redux' },
|
|
972
|
+
];
|
|
973
|
+
return (<react_native_1.View style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }}>
|
|
974
|
+
{/* Settings Header with back button */}
|
|
975
|
+
<react_native_linear_gradient_1.default colors={[AppColors_1.AppColors.purple, '#6B4EFF']} start={{ x: 0, y: 0 }} end={{ x: 1, y: 0 }} style={styles_1.default.headerGradient}>
|
|
976
|
+
<react_native_1.View style={[styles_1.default.header, { paddingHorizontal: 16, gap: 12 }]}>
|
|
977
|
+
<TouchableScale_1.default onPress={() => {
|
|
978
|
+
setSettingsPage(null);
|
|
979
|
+
setActiveTab('apis');
|
|
980
|
+
}} hitSlop={12} style={{
|
|
981
|
+
padding: 8,
|
|
982
|
+
borderRadius: 10,
|
|
983
|
+
backgroundColor: 'rgba(255, 255, 255, 0.15)',
|
|
984
|
+
borderWidth: 1,
|
|
985
|
+
borderColor: 'rgba(255, 255, 255, 0.08)',
|
|
986
|
+
}}>
|
|
987
|
+
<NetworkIcons_1.WhiteBackNavigation color="#FFFFFF" size={16}/>
|
|
988
|
+
</TouchableScale_1.default>
|
|
989
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
990
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 17, color: '#FFFFFF' }}>Settings</react_native_1.Text>
|
|
991
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 11, color: 'rgba(255,255,255,0.75)', marginTop: 1 }}>Manage modules and preferences</react_native_1.Text>
|
|
992
|
+
</react_native_1.View>
|
|
993
|
+
<react_native_1.View style={{
|
|
994
|
+
backgroundColor: 'rgba(255, 255, 255, 0.15)',
|
|
995
|
+
paddingHorizontal: 8,
|
|
996
|
+
paddingVertical: 4,
|
|
997
|
+
borderRadius: 8,
|
|
998
|
+
borderWidth: 1,
|
|
999
|
+
borderColor: 'rgba(255, 255, 255, 0.1)'
|
|
1000
|
+
}}>
|
|
1001
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 10.5, color: '#FFFFFF' }}>v1.0.10</react_native_1.Text>
|
|
1002
|
+
</react_native_1.View>
|
|
1003
|
+
</react_native_1.View>
|
|
1004
|
+
</react_native_linear_gradient_1.default>
|
|
1005
|
+
|
|
1006
|
+
<react_native_1.ScrollView style={{ flex: 1 }} contentContainerStyle={{ padding: 16, gap: 12 }}>
|
|
1007
|
+
|
|
1008
|
+
{/* Tab list */}
|
|
1009
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, overflow: 'hidden' }}>
|
|
1010
|
+
{/* Table Header */}
|
|
1011
|
+
<react_native_1.View style={{
|
|
1012
|
+
flexDirection: 'row',
|
|
1013
|
+
alignItems: 'center',
|
|
1014
|
+
paddingVertical: 8,
|
|
1015
|
+
paddingHorizontal: 14,
|
|
1016
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
1017
|
+
borderBottomWidth: 1,
|
|
1018
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1019
|
+
gap: 12,
|
|
1020
|
+
}}>
|
|
1021
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak, letterSpacing: 0.6, flex: 1 }}>MODULE</react_native_1.Text>
|
|
1022
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak, letterSpacing: 0.6, width: 90, textAlign: 'right', paddingRight: 4 }}>VISIBILITY</react_native_1.Text>
|
|
1023
|
+
</react_native_1.View>
|
|
1024
|
+
|
|
1025
|
+
{settingsTabs.map((tab, idx) => {
|
|
1026
|
+
const isVisible = tab.key === 'apis' || tabVisibility[tab.key];
|
|
1027
|
+
const isLast = idx === settingsTabs.length - 1;
|
|
1028
|
+
const isLocked = tab.key === 'apis';
|
|
1029
|
+
return (<react_native_1.View key={tab.key} style={{
|
|
1030
|
+
flexDirection: 'row',
|
|
1031
|
+
alignItems: 'center',
|
|
1032
|
+
paddingVertical: 10,
|
|
1033
|
+
paddingHorizontal: 14,
|
|
1034
|
+
borderBottomWidth: isLast ? 0 : 1,
|
|
1035
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1036
|
+
gap: 12,
|
|
1037
|
+
}}>
|
|
1038
|
+
{/* Icon + Label — fills remaining space */}
|
|
1039
|
+
<react_native_1.View style={{ flex: 1, flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1040
|
+
{/* Small icon tile */}
|
|
1041
|
+
<react_native_1.View style={{
|
|
1042
|
+
width: 20, height: 20, borderRadius: 6,
|
|
1043
|
+
backgroundColor: isLocked ? AppColors_1.AppColors.grayBorderSecondary : AppColors_1.AppColors.purpleShade50,
|
|
1044
|
+
borderWidth: 1,
|
|
1045
|
+
borderColor: isLocked ? AppColors_1.AppColors.dividerColor : 'rgba(104,75,155,0.2)',
|
|
1046
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1047
|
+
}}>
|
|
1048
|
+
{tab.icon === 'insights' && <NetworkIcons_1.InsightsIcon color={isLocked ? AppColors_1.AppColors.grayTextWeak : AppColors_1.AppColors.purple} size={11}/>}
|
|
1049
|
+
{tab.icon === 'apis' && <NetworkIcons_1.SignalIcon color={isLocked ? AppColors_1.AppColors.grayTextWeak : AppColors_1.AppColors.purple} size={11}/>}
|
|
1050
|
+
{tab.icon === 'logs' && <NetworkIcons_1.TerminalIcon color={isLocked ? AppColors_1.AppColors.grayTextWeak : AppColors_1.AppColors.purple} size={11}/>}
|
|
1051
|
+
{tab.icon === 'analytics' && <NetworkIcons_1.AnalyticsIcon color={isLocked ? AppColors_1.AppColors.grayTextWeak : AppColors_1.AppColors.purple} size={11}/>}
|
|
1052
|
+
{tab.icon === 'webview' && <NetworkIcons_1.GlobeIcon color={isLocked ? AppColors_1.AppColors.grayTextWeak : AppColors_1.AppColors.purple} size={11}/>}
|
|
1053
|
+
{tab.icon === 'redux' && <NetworkIcons_1.TerminalIcon color={isLocked ? AppColors_1.AppColors.grayTextWeak : AppColors_1.AppColors.purple} size={11}/>}
|
|
1054
|
+
</react_native_1.View>
|
|
1055
|
+
{/* Label + Required badge */}
|
|
1056
|
+
<react_native_1.Text style={{
|
|
1057
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1058
|
+
fontSize: 13,
|
|
1059
|
+
color: isLocked ? AppColors_1.AppColors.grayText : AppColors_1.AppColors.primaryBlack,
|
|
1060
|
+
}}>
|
|
1061
|
+
{tab.label}
|
|
1062
|
+
</react_native_1.Text>
|
|
1063
|
+
{isLocked && (<react_native_1.View style={{
|
|
1064
|
+
flexDirection: 'row',
|
|
1065
|
+
alignItems: 'center',
|
|
1066
|
+
backgroundColor: 'rgba(104,75,155,0.08)',
|
|
1067
|
+
borderRadius: 20,
|
|
1068
|
+
paddingHorizontal: 6,
|
|
1069
|
+
paddingVertical: 2,
|
|
1070
|
+
borderWidth: 1,
|
|
1071
|
+
borderColor: 'rgba(104,75,155,0.18)',
|
|
1072
|
+
gap: 3,
|
|
1073
|
+
}}>
|
|
1074
|
+
<react_native_1.View style={{ width: 4, height: 4, borderRadius: 2, backgroundColor: AppColors_1.AppColors.purple, opacity: 0.7 }}/>
|
|
1075
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 8.5, color: AppColors_1.AppColors.purple, letterSpacing: 0.4 }}>
|
|
1076
|
+
DEFAULT
|
|
1077
|
+
</react_native_1.Text>
|
|
1078
|
+
</react_native_1.View>)}
|
|
1079
|
+
|
|
1080
|
+
{/* Settings gear icon next to label */}
|
|
1081
|
+
<TouchableScale_1.default onPress={() => setSettingsPage(tab.key)} hitSlop={8} style={{
|
|
1082
|
+
marginLeft: 4,
|
|
1083
|
+
padding: 4,
|
|
1084
|
+
borderRadius: 6,
|
|
1085
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1086
|
+
borderWidth: 1,
|
|
1087
|
+
borderColor: 'rgba(104,75,155,0.15)',
|
|
1088
|
+
alignItems: 'center',
|
|
1089
|
+
justifyContent: 'center',
|
|
1090
|
+
}}>
|
|
1091
|
+
<NetworkIcons_1.SettingsIcon color={AppColors_1.AppColors.purple} size={10}/>
|
|
1092
|
+
</TouchableScale_1.default>
|
|
1093
|
+
</react_native_1.View>
|
|
1094
|
+
|
|
1095
|
+
{/* Visibility Switch in VISIBILITY column */}
|
|
1096
|
+
<react_native_1.View style={{ width: 90, alignItems: 'flex-end', justifyContent: 'center' }}>
|
|
1097
|
+
<TouchableScale_1.default disabled={isLocked} onPress={() => toggleTabVisibility(tab.key)} style={{
|
|
1098
|
+
width: 38,
|
|
1099
|
+
height: 22,
|
|
1100
|
+
borderRadius: 11,
|
|
1101
|
+
backgroundColor: isVisible ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayBorderSecondary,
|
|
1102
|
+
padding: 2,
|
|
1103
|
+
justifyContent: 'center',
|
|
1104
|
+
alignItems: isVisible ? 'flex-end' : 'flex-start',
|
|
1105
|
+
}}>
|
|
1106
|
+
<react_native_1.View style={{
|
|
1107
|
+
width: 18,
|
|
1108
|
+
height: 18,
|
|
1109
|
+
borderRadius: 9,
|
|
1110
|
+
backgroundColor: '#FFFFFF',
|
|
1111
|
+
shadowColor: '#000',
|
|
1112
|
+
shadowOpacity: 0.15,
|
|
1113
|
+
shadowRadius: 1.5,
|
|
1114
|
+
shadowOffset: { width: 0, height: 1 },
|
|
1115
|
+
}}/>
|
|
1116
|
+
</TouchableScale_1.default>
|
|
1117
|
+
</react_native_1.View>
|
|
1118
|
+
</react_native_1.View>);
|
|
1119
|
+
})}
|
|
1120
|
+
</react_native_1.View>
|
|
1121
|
+
|
|
1122
|
+
{/* Preferences Section */}
|
|
1123
|
+
<react_native_1.View style={{ marginTop: 8 }}>
|
|
1124
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak, letterSpacing: 0.6, marginBottom: 8 }}>PREFERENCES</react_native_1.Text>
|
|
1125
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, overflow: 'hidden' }}>
|
|
1126
|
+
<react_native_1.View style={{
|
|
1127
|
+
flexDirection: 'row',
|
|
1128
|
+
alignItems: 'center',
|
|
1129
|
+
paddingVertical: 12,
|
|
1130
|
+
paddingHorizontal: 14,
|
|
1131
|
+
gap: 12,
|
|
1132
|
+
}}>
|
|
1133
|
+
{/* Icon + Label */}
|
|
1134
|
+
<react_native_1.View style={{ flex: 1, flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1135
|
+
<react_native_1.View style={{
|
|
1136
|
+
width: 20, height: 20, borderRadius: 6,
|
|
1137
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1138
|
+
borderWidth: 1,
|
|
1139
|
+
borderColor: 'rgba(104,75,155,0.2)',
|
|
1140
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1141
|
+
}}>
|
|
1142
|
+
{isDark ? (<NetworkIcons_1.SunIcon color={AppColors_1.AppColors.purple} size={11}/>) : (<NetworkIcons_1.MoonIcon color={AppColors_1.AppColors.purple} size={11}/>)}
|
|
1143
|
+
</react_native_1.View>
|
|
1144
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
1145
|
+
<react_native_1.Text style={{
|
|
1146
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1147
|
+
fontSize: 13,
|
|
1148
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
1149
|
+
}}>
|
|
1150
|
+
Dark Theme
|
|
1151
|
+
</react_native_1.Text>
|
|
1152
|
+
</react_native_1.View>
|
|
1153
|
+
</react_native_1.View>
|
|
1154
|
+
|
|
1155
|
+
{/* Toggle Switch */}
|
|
1156
|
+
<TouchableScale_1.default onPress={() => {
|
|
1157
|
+
const newTheme = !isDark;
|
|
1158
|
+
setIsDark(newTheme);
|
|
1159
|
+
(0, styles_1.toggleGlobalTheme)(newTheme);
|
|
1160
|
+
}} style={{
|
|
1161
|
+
width: 38,
|
|
1162
|
+
height: 22,
|
|
1163
|
+
borderRadius: 11,
|
|
1164
|
+
backgroundColor: isDark ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayBorderSecondary,
|
|
1165
|
+
padding: 2,
|
|
1166
|
+
justifyContent: 'center',
|
|
1167
|
+
alignItems: isDark ? 'flex-end' : 'flex-start',
|
|
1168
|
+
}}>
|
|
1169
|
+
<react_native_1.View style={{
|
|
1170
|
+
width: 18,
|
|
1171
|
+
height: 18,
|
|
1172
|
+
borderRadius: 9,
|
|
1173
|
+
backgroundColor: '#FFFFFF',
|
|
1174
|
+
shadowColor: '#000',
|
|
1175
|
+
shadowOpacity: 0.15,
|
|
1176
|
+
shadowRadius: 1.5,
|
|
1177
|
+
shadowOffset: { width: 0, height: 1 },
|
|
1178
|
+
}}/>
|
|
1179
|
+
</TouchableScale_1.default>
|
|
1180
|
+
</react_native_1.View>
|
|
1181
|
+
</react_native_1.View>
|
|
1182
|
+
</react_native_1.View>
|
|
1183
|
+
</react_native_1.ScrollView>
|
|
1184
|
+
</react_native_1.View>);
|
|
1185
|
+
}
|
|
1186
|
+
const goBackToMain = () => setSettingsPage('main');
|
|
1187
|
+
const renderSubHeader = (title, icon, rightInfo) => (<react_native_1.View style={{
|
|
1188
|
+
flexDirection: 'row',
|
|
1189
|
+
alignItems: 'center',
|
|
1190
|
+
gap: 12,
|
|
1191
|
+
paddingBottom: 16,
|
|
1192
|
+
borderBottomWidth: 1,
|
|
1193
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1194
|
+
marginBottom: 16,
|
|
1195
|
+
}}>
|
|
1196
|
+
<TouchableScale_1.default onPress={goBackToMain} style={{
|
|
1197
|
+
width: 36,
|
|
1198
|
+
height: 36,
|
|
1199
|
+
borderRadius: 10,
|
|
1200
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1201
|
+
borderWidth: 1,
|
|
1202
|
+
borderColor: 'rgba(104,75,155,0.2)',
|
|
1203
|
+
alignItems: 'center',
|
|
1204
|
+
justifyContent: 'center',
|
|
1205
|
+
}}>
|
|
1206
|
+
<NetworkIcons_1.WhiteBackNavigation color={AppColors_1.AppColors.purple} size={16}/>
|
|
1207
|
+
</TouchableScale_1.default>
|
|
1208
|
+
{icon && (<react_native_1.View style={{
|
|
1209
|
+
width: 36, height: 36, borderRadius: 10,
|
|
1210
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1211
|
+
borderWidth: 1, borderColor: 'rgba(104,75,155,0.2)',
|
|
1212
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1213
|
+
}}>
|
|
1214
|
+
{icon}
|
|
1215
|
+
</react_native_1.View>)}
|
|
1216
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 18, color: AppColors_1.AppColors.primaryBlack, flex: 1 }}>
|
|
1217
|
+
{title}
|
|
1218
|
+
</react_native_1.Text>
|
|
1219
|
+
{rightInfo ? (<react_native_1.View style={{
|
|
1220
|
+
backgroundColor: 'rgba(104,75,155,0.08)',
|
|
1221
|
+
paddingHorizontal: 10,
|
|
1222
|
+
paddingVertical: 5,
|
|
1223
|
+
borderRadius: 8,
|
|
1224
|
+
borderWidth: 1,
|
|
1225
|
+
borderColor: 'rgba(104,75,155,0.15)',
|
|
1226
|
+
}}>
|
|
1227
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.purple }}>
|
|
1228
|
+
{rightInfo}
|
|
1229
|
+
</react_native_1.Text>
|
|
1230
|
+
</react_native_1.View>) : null}
|
|
1231
|
+
</react_native_1.View>);
|
|
1232
|
+
// Helper: settings row with icon + label + optional description
|
|
1233
|
+
const renderSettingRow = (opts) => (<react_native_1.View style={{
|
|
1234
|
+
paddingVertical: 12,
|
|
1235
|
+
borderBottomWidth: opts.isLast ? 0 : 1,
|
|
1236
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1237
|
+
}}>
|
|
1238
|
+
<TouchableScale_1.default disabled={!opts.onPress} onPress={opts.onPress} style={{
|
|
1239
|
+
flexDirection: 'row',
|
|
1240
|
+
alignItems: 'center',
|
|
1241
|
+
gap: 12,
|
|
1242
|
+
}}>
|
|
1243
|
+
<react_native_1.View style={{
|
|
1244
|
+
width: 36, height: 36, borderRadius: 10,
|
|
1245
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1246
|
+
borderWidth: 1, borderColor: 'rgba(104,75,155,0.18)',
|
|
1247
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1248
|
+
}}>
|
|
1249
|
+
{opts.icon}
|
|
1250
|
+
</react_native_1.View>
|
|
1251
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
1252
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 14, color: AppColors_1.AppColors.primaryBlack }}>
|
|
1253
|
+
{opts.label}
|
|
1254
|
+
</react_native_1.Text>
|
|
1255
|
+
{opts.description ? (<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 11, color: AppColors_1.AppColors.grayText, marginTop: 1 }}>
|
|
1256
|
+
{opts.description}
|
|
1257
|
+
</react_native_1.Text>) : null}
|
|
1258
|
+
</react_native_1.View>
|
|
1259
|
+
{opts.right || null}
|
|
1260
|
+
</TouchableScale_1.default>
|
|
1261
|
+
{opts.picker && (<react_native_1.View style={{
|
|
1262
|
+
flexDirection: 'row',
|
|
1263
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
1264
|
+
borderRadius: 8,
|
|
1265
|
+
padding: 2.5,
|
|
1266
|
+
marginTop: 10,
|
|
1267
|
+
borderWidth: 1,
|
|
1268
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1269
|
+
}}>
|
|
1270
|
+
{opts.picker.options.map(opt => {
|
|
1271
|
+
const isActive = opts.picker.selectedValue === opt;
|
|
1272
|
+
return (<TouchableScale_1.default key={String(opt)} onPress={() => opts.picker.onSelect(opt)} style={{
|
|
1273
|
+
flex: 1,
|
|
1274
|
+
paddingVertical: 6,
|
|
1275
|
+
alignItems: 'center',
|
|
1276
|
+
borderRadius: 6,
|
|
1277
|
+
backgroundColor: isActive ? AppColors_1.AppColors.purple : 'transparent',
|
|
1278
|
+
}}>
|
|
1279
|
+
<react_native_1.Text style={{
|
|
1280
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1281
|
+
fontSize: 11,
|
|
1282
|
+
color: isActive ? '#FFFFFF' : AppColors_1.AppColors.grayText,
|
|
1283
|
+
}}>
|
|
1284
|
+
{typeof opt === 'number' && opt >= 500 && settingsPage === 'insights' ? `${opt}ms` : opt}
|
|
1285
|
+
</react_native_1.Text>
|
|
1286
|
+
</TouchableScale_1.default>);
|
|
1287
|
+
})}
|
|
1288
|
+
</react_native_1.View>)}
|
|
1289
|
+
</react_native_1.View>);
|
|
1290
|
+
if (settingsPage === 'apis') {
|
|
1291
|
+
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1292
|
+
{renderSubHeader('APIs Settings', <NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={16}/>, `Total: ${logs.length}`)}
|
|
1293
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, padding: 16, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, gap: 4 }}>
|
|
1294
|
+
{renderSettingRow({
|
|
1295
|
+
icon: <NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1296
|
+
label: 'Max Request Logs',
|
|
1297
|
+
description: 'How many network requests to keep in memory',
|
|
1298
|
+
picker: {
|
|
1299
|
+
options: [50, 100, 200, 500],
|
|
1300
|
+
selectedValue: maxNetworkLogs,
|
|
1301
|
+
onSelect: setMaxNetworkLogs,
|
|
1302
|
+
},
|
|
1303
|
+
isLast: true,
|
|
1304
|
+
})}
|
|
1305
|
+
</react_native_1.View>
|
|
1306
|
+
|
|
1307
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, padding: 16, marginTop: 12 }}>
|
|
1308
|
+
{renderSettingRow({
|
|
1309
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1310
|
+
label: 'Clear Network Logs',
|
|
1311
|
+
description: `${logs.length} requests stored`,
|
|
1312
|
+
isLast: true,
|
|
1313
|
+
onPress: () => {
|
|
1314
|
+
(0, networkLogger_1.clearNetworkLogs)();
|
|
1315
|
+
setSelected(null);
|
|
1316
|
+
react_native_1.Alert.alert('Success', 'Network logs cleared.');
|
|
1317
|
+
},
|
|
1318
|
+
right: (<react_native_1.View style={{ paddingHorizontal: 10, paddingVertical: 5, borderRadius: 7, backgroundColor: 'rgba(255,46,87,0.08)', borderWidth: 1, borderColor: 'rgba(255,46,87,0.2)' }}>
|
|
1319
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.errorColor }}>Clear</react_native_1.Text>
|
|
1320
|
+
</react_native_1.View>),
|
|
1321
|
+
})}
|
|
1322
|
+
</react_native_1.View>
|
|
1323
|
+
</react_native_1.ScrollView>);
|
|
1324
|
+
}
|
|
1325
|
+
if (settingsPage === 'logs') {
|
|
1326
|
+
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1327
|
+
{renderSubHeader('Logs Settings', <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>, `Total: ${consoleLogs.length}`)}
|
|
1328
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, padding: 16, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, gap: 4 }}>
|
|
1329
|
+
{renderSettingRow({
|
|
1330
|
+
icon: <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1331
|
+
label: 'Max Console Logs',
|
|
1332
|
+
description: 'How many console messages to retain',
|
|
1333
|
+
picker: {
|
|
1334
|
+
options: [100, 200, 500, 1000],
|
|
1335
|
+
selectedValue: maxConsoleLogs,
|
|
1336
|
+
onSelect: setMaxConsoleLogs,
|
|
1337
|
+
},
|
|
1338
|
+
})}
|
|
1339
|
+
<react_native_1.View style={{ height: 1, backgroundColor: AppColors_1.AppColors.dividerColor }}/>
|
|
1340
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 13, color: AppColors_1.AppColors.primaryBlack, paddingTop: 4 }}>Log Levels</react_native_1.Text>
|
|
1341
|
+
{['info', 'warn', 'error'].map((level, li) => {
|
|
1342
|
+
const isLvlActive = showConsoleLevels[level];
|
|
1343
|
+
const levelColor = level === 'error' ? AppColors_1.AppColors.errorColor : level === 'warn' ? AppColors_1.AppColors.warningIconGold : AppColors_1.AppColors.skyBlue;
|
|
1344
|
+
return renderSettingRow({
|
|
1345
|
+
icon: <react_native_1.View style={{ width: 10, height: 10, borderRadius: 5, backgroundColor: levelColor }}/>,
|
|
1346
|
+
label: `Show ${level.charAt(0).toUpperCase() + level.slice(1)} logs`,
|
|
1347
|
+
description: level === 'info' ? 'Informational messages' : level === 'warn' ? 'Warning messages' : 'Error messages',
|
|
1348
|
+
isLast: level === 'error',
|
|
1349
|
+
onPress: () => setShowConsoleLevels(prev => ({ ...prev, [level]: !prev[level] })),
|
|
1350
|
+
right: (<react_native_1.View style={{
|
|
1351
|
+
width: 22, height: 22, borderRadius: 6,
|
|
1352
|
+
borderWidth: 2,
|
|
1353
|
+
borderColor: isLvlActive ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayTextWeak,
|
|
1354
|
+
backgroundColor: isLvlActive ? 'rgba(104, 75, 155, 0.1)' : 'transparent',
|
|
1355
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1356
|
+
}}>
|
|
1357
|
+
{isLvlActive && <NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>}
|
|
1358
|
+
</react_native_1.View>),
|
|
1359
|
+
});
|
|
1360
|
+
})}
|
|
1361
|
+
</react_native_1.View>
|
|
1362
|
+
|
|
1363
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, padding: 16, marginTop: 12 }}>
|
|
1364
|
+
{renderSettingRow({
|
|
1365
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1366
|
+
label: 'Clear Console Logs',
|
|
1367
|
+
description: `${consoleLogs.length} logs stored`,
|
|
1368
|
+
isLast: true,
|
|
1369
|
+
onPress: () => {
|
|
1370
|
+
(0, consoleLogger_1.clearConsoleLogs)();
|
|
1371
|
+
react_native_1.Alert.alert('Success', 'Console logs cleared.');
|
|
1372
|
+
},
|
|
1373
|
+
right: (<react_native_1.View style={{ paddingHorizontal: 10, paddingVertical: 5, borderRadius: 7, backgroundColor: 'rgba(255,46,87,0.08)', borderWidth: 1, borderColor: 'rgba(255,46,87,0.2)' }}>
|
|
1374
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.errorColor }}>Clear</react_native_1.Text>
|
|
1375
|
+
</react_native_1.View>),
|
|
1376
|
+
})}
|
|
1377
|
+
</react_native_1.View>
|
|
1378
|
+
</react_native_1.ScrollView>);
|
|
1379
|
+
}
|
|
1380
|
+
if (settingsPage === 'analytics') {
|
|
1381
|
+
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1382
|
+
{renderSubHeader('Analytics Settings', <NetworkIcons_1.AnalyticsIcon color={AppColors_1.AppColors.purple} size={16}/>, `Events: ${analyticsEvents.length}`)}
|
|
1383
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, padding: 16, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, gap: 4 }}>
|
|
1384
|
+
{renderSettingRow({
|
|
1385
|
+
icon: <NetworkIcons_1.AnalyticsIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1386
|
+
label: 'Events Captured',
|
|
1387
|
+
description: `${analyticsEvents.length} analytics events stored`,
|
|
1388
|
+
isLast: true,
|
|
1389
|
+
})}
|
|
1390
|
+
</react_native_1.View>
|
|
1391
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, padding: 16, marginTop: 12 }}>
|
|
1392
|
+
{renderSettingRow({
|
|
1393
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1394
|
+
label: 'Clear Analytics History',
|
|
1395
|
+
description: 'Remove all captured events',
|
|
1396
|
+
isLast: true,
|
|
1397
|
+
onPress: () => {
|
|
1398
|
+
(0, analyticsLogger_1.clearAnalyticsEvents)();
|
|
1399
|
+
setSelectedEvent(null);
|
|
1400
|
+
react_native_1.Alert.alert('Success', 'Analytics events cleared.');
|
|
1401
|
+
},
|
|
1402
|
+
right: (<react_native_1.View style={{ paddingHorizontal: 10, paddingVertical: 5, borderRadius: 7, backgroundColor: 'rgba(255,46,87,0.08)', borderWidth: 1, borderColor: 'rgba(255,46,87,0.2)' }}>
|
|
1403
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.errorColor }}>Clear</react_native_1.Text>
|
|
1404
|
+
</react_native_1.View>),
|
|
1405
|
+
})}
|
|
1406
|
+
</react_native_1.View>
|
|
1407
|
+
</react_native_1.ScrollView>);
|
|
1408
|
+
}
|
|
1409
|
+
if (settingsPage === 'webview') {
|
|
1410
|
+
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1411
|
+
{renderSubHeader('WebView Settings', <NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={16}/>, `History: ${webViewNavHistory.length}`)}
|
|
1412
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, padding: 16, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, gap: 4 }}>
|
|
1413
|
+
{renderSettingRow({
|
|
1414
|
+
icon: <NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1415
|
+
label: 'Capture CSS & JavaScript',
|
|
1416
|
+
description: 'Extract stylesheet and script source from pages',
|
|
1417
|
+
onPress: () => setWebViewCaptureCssJs(prev => !prev),
|
|
1418
|
+
right: (<react_native_1.View style={{
|
|
1419
|
+
width: 22, height: 22, borderRadius: 6,
|
|
1420
|
+
borderWidth: 2,
|
|
1421
|
+
borderColor: webViewCaptureCssJs ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayTextWeak,
|
|
1422
|
+
backgroundColor: webViewCaptureCssJs ? 'rgba(104, 75, 155, 0.1)' : 'transparent',
|
|
1423
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1424
|
+
}}>
|
|
1425
|
+
{webViewCaptureCssJs && <NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>}
|
|
1426
|
+
</react_native_1.View>),
|
|
1427
|
+
isLast: true,
|
|
1428
|
+
})}
|
|
1429
|
+
</react_native_1.View>
|
|
1430
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, padding: 16, marginTop: 12 }}>
|
|
1431
|
+
{renderSettingRow({
|
|
1432
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1433
|
+
label: 'Clear WebView Data',
|
|
1434
|
+
description: 'Remove all captured source & navigation history',
|
|
1435
|
+
isLast: true,
|
|
1436
|
+
onPress: () => {
|
|
1437
|
+
(0, webViewLogger_1.clearWebViewData)();
|
|
1438
|
+
react_native_1.Alert.alert('Success', 'WebView source history cleared.');
|
|
1439
|
+
},
|
|
1440
|
+
right: (<react_native_1.View style={{ paddingHorizontal: 10, paddingVertical: 5, borderRadius: 7, backgroundColor: 'rgba(255,46,87,0.08)', borderWidth: 1, borderColor: 'rgba(255,46,87,0.2)' }}>
|
|
1441
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.errorColor }}>Clear</react_native_1.Text>
|
|
1442
|
+
</react_native_1.View>),
|
|
1443
|
+
})}
|
|
1444
|
+
</react_native_1.View>
|
|
1445
|
+
</react_native_1.ScrollView>);
|
|
1446
|
+
}
|
|
1447
|
+
if (settingsPage === 'redux') {
|
|
1448
|
+
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1449
|
+
{renderSubHeader('Redux Settings', <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>, `Reducers: ${Object.keys(reduxState || {}).length}`)}
|
|
1450
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, padding: 16, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, gap: 4 }}>
|
|
1451
|
+
{renderSettingRow({
|
|
1452
|
+
icon: <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1453
|
+
label: 'Auto-refresh Store',
|
|
1454
|
+
description: 'Automatically capture Redux store state updates',
|
|
1455
|
+
onPress: () => setReduxAutoRefreshState(prev => !prev),
|
|
1456
|
+
right: (<react_native_1.View style={{
|
|
1457
|
+
width: 22, height: 22, borderRadius: 6,
|
|
1458
|
+
borderWidth: 2,
|
|
1459
|
+
borderColor: reduxAutoRefresh ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayTextWeak,
|
|
1460
|
+
backgroundColor: reduxAutoRefresh ? 'rgba(104, 75, 155, 0.1)' : 'transparent',
|
|
1461
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1462
|
+
}}>
|
|
1463
|
+
{reduxAutoRefresh && <NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>}
|
|
1464
|
+
</react_native_1.View>),
|
|
1465
|
+
})}
|
|
1466
|
+
<react_native_1.View style={{ height: 1, backgroundColor: AppColors_1.AppColors.dividerColor }}/>
|
|
1467
|
+
{renderSettingRow({
|
|
1468
|
+
icon: <NetworkIcons_1.InsightsIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1469
|
+
label: 'Default JSON Expand Depth',
|
|
1470
|
+
description: 'Initial depth of Redux state tree to auto-expand',
|
|
1471
|
+
picker: {
|
|
1472
|
+
options: [1, 2, 3, 5],
|
|
1473
|
+
selectedValue: reduxExpandDepth,
|
|
1474
|
+
onSelect: setReduxExpandDepth,
|
|
1475
|
+
},
|
|
1476
|
+
isLast: true,
|
|
1477
|
+
})}
|
|
1478
|
+
</react_native_1.View>
|
|
1479
|
+
|
|
1480
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, padding: 16, marginTop: 12 }}>
|
|
1481
|
+
{renderSettingRow({
|
|
1482
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1483
|
+
label: 'Clear Redux State',
|
|
1484
|
+
description: reduxState ? 'Reset state snapshot in inspector' : 'No store snapshot stored',
|
|
1485
|
+
isLast: true,
|
|
1486
|
+
onPress: () => {
|
|
1487
|
+
setReduxState(null);
|
|
1488
|
+
react_native_1.Alert.alert('Success', 'Redux state snapshot cleared.');
|
|
1489
|
+
},
|
|
1490
|
+
right: (<react_native_1.View style={{ paddingHorizontal: 10, paddingVertical: 5, borderRadius: 7, backgroundColor: 'rgba(255,46,87,0.08)', borderWidth: 1, borderColor: 'rgba(255,46,87,0.2)' }}>
|
|
1491
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.errorColor }}>Clear</react_native_1.Text>
|
|
1492
|
+
</react_native_1.View>),
|
|
1493
|
+
})}
|
|
1494
|
+
</react_native_1.View>
|
|
1495
|
+
</react_native_1.ScrollView>);
|
|
1496
|
+
}
|
|
1497
|
+
// Default return page is Insights settings
|
|
1498
|
+
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1499
|
+
{renderSubHeader('Insights Settings', <NetworkIcons_1.InsightsIcon color={AppColors_1.AppColors.purple} size={16}/>)}
|
|
1500
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, padding: 16, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, gap: 4 }}>
|
|
1501
|
+
{renderSettingRow({
|
|
1502
|
+
icon: <NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1503
|
+
label: 'Slow Latency Warning',
|
|
1504
|
+
description: 'Alert threshold for slow API request duration',
|
|
1505
|
+
picker: {
|
|
1506
|
+
options: [500, 1000, 2000],
|
|
1507
|
+
selectedValue: slowRequestThreshold,
|
|
1508
|
+
onSelect: setSlowRequestThreshold,
|
|
1509
|
+
},
|
|
1510
|
+
})}
|
|
1511
|
+
<react_native_1.View style={{ height: 1, backgroundColor: AppColors_1.AppColors.dividerColor }}/>
|
|
1512
|
+
{renderSettingRow({
|
|
1513
|
+
icon: <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1514
|
+
label: 'Show Console Alerts',
|
|
1515
|
+
description: 'Flags critical warnings or crash events on dashboard',
|
|
1516
|
+
isLast: true,
|
|
1517
|
+
onPress: () => setInsightsShowConsoleAlerts(prev => !prev),
|
|
1518
|
+
right: (<react_native_1.View style={{
|
|
1519
|
+
width: 22, height: 22, borderRadius: 6,
|
|
1520
|
+
borderWidth: 2,
|
|
1521
|
+
borderColor: insightsShowConsoleAlerts ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayTextWeak,
|
|
1522
|
+
backgroundColor: insightsShowConsoleAlerts ? 'rgba(104, 75, 155, 0.1)' : 'transparent',
|
|
1523
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1524
|
+
}}>
|
|
1525
|
+
{insightsShowConsoleAlerts && <NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>}
|
|
1526
|
+
</react_native_1.View>),
|
|
1527
|
+
})}
|
|
1528
|
+
</react_native_1.View>
|
|
1529
|
+
</react_native_1.ScrollView>);
|
|
1530
|
+
};
|
|
758
1531
|
const renderInsightsDashboard = () => {
|
|
759
1532
|
const apiTotal = logs.length;
|
|
760
1533
|
const apiErrors = logs.filter(l => (l.status != null && l.status >= 400) || l.status === 0 || l.status == null).length;
|
|
@@ -774,168 +1547,168 @@ const NetworkInspector = () => {
|
|
|
774
1547
|
const webviewTotal = webViewNavHistory.length;
|
|
775
1548
|
return (<react_native_1.View style={styles_1.default.dashboardContainer}>
|
|
776
1549
|
{/* Module 1: APIs */}
|
|
777
|
-
<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('apis')}>
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
</react_native_1.View>
|
|
785
|
-
<react_native_1.View style={styles_1.default.dashboardModuleGrid}>
|
|
786
|
-
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
787
|
-
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{apiTotal}</react_native_1.Text>
|
|
788
|
-
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Requests</react_native_1.Text>
|
|
789
|
-
</react_native_1.View>
|
|
790
|
-
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
791
|
-
<react_native_1.Text style={[styles_1.default.dashboardGridVal, apiSuccessRate < 90 && { color: AppColors_1.AppColors.warningIconGold }]}>
|
|
792
|
-
{apiSuccessRate}%
|
|
793
|
-
</react_native_1.Text>
|
|
794
|
-
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Success Rate</react_native_1.Text>
|
|
795
|
-
</react_native_1.View>
|
|
796
|
-
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
797
|
-
<react_native_1.Text style={[styles_1.default.dashboardGridVal, apiErrors > 0 && { color: AppColors_1.AppColors.errorColor }]}>
|
|
798
|
-
{apiErrors}
|
|
799
|
-
</react_native_1.Text>
|
|
800
|
-
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Errors</react_native_1.Text>
|
|
1550
|
+
{tabVisibility.apis && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('apis')}>
|
|
1551
|
+
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1552
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1553
|
+
<NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={18}/>
|
|
1554
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>APIs & Network</react_native_1.Text>
|
|
1555
|
+
</react_native_1.View>
|
|
1556
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
801
1557
|
</react_native_1.View>
|
|
802
|
-
<react_native_1.View style={styles_1.default.
|
|
803
|
-
<react_native_1.
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
1558
|
+
<react_native_1.View style={styles_1.default.dashboardModuleGrid}>
|
|
1559
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1560
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{apiTotal}</react_native_1.Text>
|
|
1561
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Requests</react_native_1.Text>
|
|
1562
|
+
</react_native_1.View>
|
|
1563
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1564
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, apiSuccessRate < 90 && { color: AppColors_1.AppColors.warningIconGold }]}>
|
|
1565
|
+
{apiSuccessRate}%
|
|
1566
|
+
</react_native_1.Text>
|
|
1567
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Success Rate</react_native_1.Text>
|
|
1568
|
+
</react_native_1.View>
|
|
1569
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1570
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, apiErrors > 0 && { color: AppColors_1.AppColors.errorColor }]}>
|
|
1571
|
+
{apiErrors}
|
|
1572
|
+
</react_native_1.Text>
|
|
1573
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Errors</react_native_1.Text>
|
|
1574
|
+
</react_native_1.View>
|
|
1575
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1576
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>
|
|
1577
|
+
{avgTime != null ? `${avgTime}ms` : '—'}
|
|
1578
|
+
</react_native_1.Text>
|
|
1579
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Avg Latency</react_native_1.Text>
|
|
1580
|
+
</react_native_1.View>
|
|
807
1581
|
</react_native_1.View>
|
|
808
|
-
</
|
|
809
|
-
</TouchableScale_1.default>
|
|
1582
|
+
</TouchableScale_1.default>)}
|
|
810
1583
|
|
|
811
1584
|
{/* Module 2: Logs */}
|
|
812
|
-
<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('logs')}>
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
1585
|
+
{tabVisibility.logs && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('logs')}>
|
|
1586
|
+
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1587
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1588
|
+
<NetworkIcons_1.TerminalIcon color="#0D9488" size={18}/>
|
|
1589
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>Console Logs</react_native_1.Text>
|
|
1590
|
+
</react_native_1.View>
|
|
1591
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
817
1592
|
</react_native_1.View>
|
|
818
|
-
<react_native_1.
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
<react_native_1.
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
<react_native_1.
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
{
|
|
832
|
-
</react_native_1.
|
|
833
|
-
<react_native_1.
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
{
|
|
838
|
-
</react_native_1.
|
|
839
|
-
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Errors</react_native_1.Text>
|
|
1593
|
+
<react_native_1.View style={styles_1.default.dashboardModuleGrid}>
|
|
1594
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1595
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{logTotal}</react_native_1.Text>
|
|
1596
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Total Logs</react_native_1.Text>
|
|
1597
|
+
</react_native_1.View>
|
|
1598
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1599
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#0D9488' }]}>{logInfos}</react_native_1.Text>
|
|
1600
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Info</react_native_1.Text>
|
|
1601
|
+
</react_native_1.View>
|
|
1602
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1603
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, logWarns > 0 && { color: AppColors_1.AppColors.warningIconGold }]}>
|
|
1604
|
+
{logWarns}
|
|
1605
|
+
</react_native_1.Text>
|
|
1606
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Warnings</react_native_1.Text>
|
|
1607
|
+
</react_native_1.View>
|
|
1608
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1609
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, logErrors > 0 && { color: AppColors_1.AppColors.errorColor }]}>
|
|
1610
|
+
{logErrors}
|
|
1611
|
+
</react_native_1.Text>
|
|
1612
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Errors</react_native_1.Text>
|
|
1613
|
+
</react_native_1.View>
|
|
840
1614
|
</react_native_1.View>
|
|
841
|
-
</
|
|
842
|
-
</TouchableScale_1.default>
|
|
1615
|
+
</TouchableScale_1.default>)}
|
|
843
1616
|
|
|
844
1617
|
{/* Module 3: Analytics */}
|
|
845
|
-
<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('analytics')}>
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
</react_native_1.View>
|
|
853
|
-
<react_native_1.View style={styles_1.default.dashboardModuleGrid}>
|
|
854
|
-
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
855
|
-
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{analyticsTotal}</react_native_1.Text>
|
|
856
|
-
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Total Events</react_native_1.Text>
|
|
857
|
-
</react_native_1.View>
|
|
858
|
-
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
859
|
-
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#EA580C' }]}>{uniqueEvents}</react_native_1.Text>
|
|
860
|
-
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Unique Names</react_native_1.Text>
|
|
861
|
-
</react_native_1.View>
|
|
862
|
-
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
863
|
-
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{screenViews}</react_native_1.Text>
|
|
864
|
-
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Screen Views</react_native_1.Text>
|
|
1618
|
+
{tabVisibility.analytics && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('analytics')}>
|
|
1619
|
+
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1620
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1621
|
+
<NetworkIcons_1.AnalyticsIcon color="#EA580C" size={18}/>
|
|
1622
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>Analytics Events</react_native_1.Text>
|
|
1623
|
+
</react_native_1.View>
|
|
1624
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
865
1625
|
</react_native_1.View>
|
|
866
|
-
<react_native_1.View style={styles_1.default.
|
|
867
|
-
<react_native_1.
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
1626
|
+
<react_native_1.View style={styles_1.default.dashboardModuleGrid}>
|
|
1627
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1628
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{analyticsTotal}</react_native_1.Text>
|
|
1629
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Total Events</react_native_1.Text>
|
|
1630
|
+
</react_native_1.View>
|
|
1631
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1632
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#EA580C' }]}>{uniqueEvents}</react_native_1.Text>
|
|
1633
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Unique Names</react_native_1.Text>
|
|
1634
|
+
</react_native_1.View>
|
|
1635
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1636
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{screenViews}</react_native_1.Text>
|
|
1637
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Screen Views</react_native_1.Text>
|
|
1638
|
+
</react_native_1.View>
|
|
1639
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1640
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>
|
|
1641
|
+
{analyticsTotal > 0 ? Math.round(analyticsTotal / Math.max(1, logs.length / 5)) : 0}
|
|
1642
|
+
</react_native_1.Text>
|
|
1643
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Events Ratio</react_native_1.Text>
|
|
1644
|
+
</react_native_1.View>
|
|
871
1645
|
</react_native_1.View>
|
|
872
|
-
</
|
|
873
|
-
</TouchableScale_1.default>
|
|
1646
|
+
</TouchableScale_1.default>)}
|
|
874
1647
|
|
|
875
1648
|
{/* Module 4: WebView */}
|
|
876
|
-
<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('webview')}>
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
</react_native_1.View>
|
|
884
|
-
<react_native_1.View style={styles_1.default.dashboardModuleGrid}>
|
|
885
|
-
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
886
|
-
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{webviewTotal}</react_native_1.Text>
|
|
887
|
-
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>History Size</react_native_1.Text>
|
|
888
|
-
</react_native_1.View>
|
|
889
|
-
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
890
|
-
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#16A34A' }]}>Active</react_native_1.Text>
|
|
891
|
-
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Status</react_native_1.Text>
|
|
1649
|
+
{tabVisibility.webview && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('webview')}>
|
|
1650
|
+
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1651
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1652
|
+
<NetworkIcons_1.GlobeIcon color="#2563EB" size={18}/>
|
|
1653
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>WebView Captures</react_native_1.Text>
|
|
1654
|
+
</react_native_1.View>
|
|
1655
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
892
1656
|
</react_native_1.View>
|
|
893
|
-
<react_native_1.View style={styles_1.default.
|
|
894
|
-
<react_native_1.
|
|
895
|
-
{
|
|
896
|
-
|
|
897
|
-
|
|
1657
|
+
<react_native_1.View style={styles_1.default.dashboardModuleGrid}>
|
|
1658
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1659
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{webviewTotal}</react_native_1.Text>
|
|
1660
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>History Size</react_native_1.Text>
|
|
1661
|
+
</react_native_1.View>
|
|
1662
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1663
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#16A34A' }]}>Active</react_native_1.Text>
|
|
1664
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Status</react_native_1.Text>
|
|
1665
|
+
</react_native_1.View>
|
|
1666
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1667
|
+
<react_native_1.Text numberOfLines={1} style={styles_1.default.dashboardGridVal}>
|
|
1668
|
+
{webviewTotal > 0 ? `${webViewNavHistory[0]?.title?.substring(0, 10) ?? ''}...` : '—'}
|
|
1669
|
+
</react_native_1.Text>
|
|
1670
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Last URL</react_native_1.Text>
|
|
1671
|
+
</react_native_1.View>
|
|
898
1672
|
</react_native_1.View>
|
|
899
|
-
</
|
|
900
|
-
</TouchableScale_1.default>
|
|
1673
|
+
</TouchableScale_1.default>)}
|
|
901
1674
|
|
|
902
1675
|
{/* Module 5: Redux Store */}
|
|
903
|
-
<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('redux')}>
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1676
|
+
{tabVisibility.redux && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('redux')}>
|
|
1677
|
+
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1678
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1679
|
+
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={18}/>
|
|
1680
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>Redux Store State</react_native_1.Text>
|
|
1681
|
+
</react_native_1.View>
|
|
1682
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
908
1683
|
</react_native_1.View>
|
|
909
|
-
<react_native_1.
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
1684
|
+
{reduxState ? (<react_native_1.View style={{ paddingHorizontal: 12, paddingBottom: 12, gap: 6 }}>
|
|
1685
|
+
<react_native_1.View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 4 }}>
|
|
1686
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak, letterSpacing: 0.5 }}>
|
|
1687
|
+
REDUCER NAME
|
|
1688
|
+
</react_native_1.Text>
|
|
1689
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak, letterSpacing: 0.5 }}>
|
|
1690
|
+
SIZE / FIELDS
|
|
1691
|
+
</react_native_1.Text>
|
|
1692
|
+
</react_native_1.View>
|
|
1693
|
+
{Object.keys(reduxState).map(key => {
|
|
1694
|
+
const val = reduxState[key];
|
|
1695
|
+
const fieldsCount = typeof val === 'object' && val !== null ? Object.keys(val).length : 0;
|
|
1696
|
+
const sizeStr = (0, helpers_1.getSize)(val);
|
|
1697
|
+
return (<react_native_1.View key={key} style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingVertical: 2 }}>
|
|
1698
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interMedium, fontSize: 12, color: AppColors_1.AppColors.grayTextStrong }}>
|
|
1699
|
+
{key}
|
|
1700
|
+
</react_native_1.Text>
|
|
1701
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 11, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
1702
|
+
{sizeStr} ({fieldsCount} fields)
|
|
1703
|
+
</react_native_1.Text>
|
|
1704
|
+
</react_native_1.View>);
|
|
1705
|
+
})}
|
|
1706
|
+
</react_native_1.View>) : (<react_native_1.View style={{ padding: 12, alignItems: 'center' }}>
|
|
1707
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 12, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
1708
|
+
No connected Redux store.
|
|
918
1709
|
</react_native_1.Text>
|
|
919
|
-
</react_native_1.View>
|
|
920
|
-
|
|
921
|
-
const val = reduxState[key];
|
|
922
|
-
const fieldsCount = typeof val === 'object' && val !== null ? Object.keys(val).length : 0;
|
|
923
|
-
const sizeStr = (0, helpers_1.getSize)(val);
|
|
924
|
-
return (<react_native_1.View key={key} style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingVertical: 2 }}>
|
|
925
|
-
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interMedium, fontSize: 12, color: AppColors_1.AppColors.grayTextStrong }}>
|
|
926
|
-
{key}
|
|
927
|
-
</react_native_1.Text>
|
|
928
|
-
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 11, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
929
|
-
{sizeStr} ({fieldsCount} fields)
|
|
930
|
-
</react_native_1.Text>
|
|
931
|
-
</react_native_1.View>);
|
|
932
|
-
})}
|
|
933
|
-
</react_native_1.View>) : (<react_native_1.View style={{ padding: 12, alignItems: 'center' }}>
|
|
934
|
-
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 12, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
935
|
-
No connected Redux store.
|
|
936
|
-
</react_native_1.Text>
|
|
937
|
-
</react_native_1.View>)}
|
|
938
|
-
</TouchableScale_1.default>
|
|
1710
|
+
</react_native_1.View>)}
|
|
1711
|
+
</TouchableScale_1.default>)}
|
|
939
1712
|
</react_native_1.View>);
|
|
940
1713
|
};
|
|
941
1714
|
const renderReduxTab = () => {
|
|
@@ -957,37 +1730,52 @@ const NetworkInspector = () => {
|
|
|
957
1730
|
<react_native_1.Text style={styles_1.default.emptySub}>Connected store state is empty.</react_native_1.Text>
|
|
958
1731
|
</react_native_1.View>);
|
|
959
1732
|
}
|
|
1733
|
+
// Build hierarchical tree: Store -> Reducers -> Action -> Data
|
|
1734
|
+
const lastActionMap = (0, reduxLogger_1.getLastActionForReducer)();
|
|
960
1735
|
return (<react_native_1.ScrollView style={styles_1.default.detailScroll} contentContainerStyle={{ paddingBottom: 24 }}>
|
|
1736
|
+
{/* Top Summary Card */}
|
|
961
1737
|
<react_native_1.View style={{
|
|
1738
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1739
|
+
borderRadius: 12,
|
|
1740
|
+
borderWidth: 1,
|
|
1741
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1742
|
+
padding: 14,
|
|
1743
|
+
marginHorizontal: 16,
|
|
1744
|
+
marginTop: 12,
|
|
1745
|
+
marginBottom: 12,
|
|
962
1746
|
flexDirection: 'row',
|
|
963
1747
|
alignItems: 'center',
|
|
964
|
-
|
|
965
|
-
paddingHorizontal: 16,
|
|
966
|
-
paddingVertical: 12,
|
|
967
|
-
borderBottomWidth: 1,
|
|
968
|
-
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
969
|
-
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1748
|
+
gap: 12,
|
|
970
1749
|
}}>
|
|
971
|
-
<react_native_1.
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1750
|
+
<react_native_1.View style={{
|
|
1751
|
+
width: 44,
|
|
1752
|
+
height: 44,
|
|
1753
|
+
borderRadius: 10,
|
|
1754
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1755
|
+
alignItems: 'center',
|
|
1756
|
+
justifyContent: 'center',
|
|
977
1757
|
}}>
|
|
978
|
-
|
|
979
|
-
</react_native_1.
|
|
1758
|
+
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={20}/>
|
|
1759
|
+
</react_native_1.View>
|
|
1760
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
1761
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 13, color: AppColors_1.AppColors.primaryBlack }}>
|
|
1762
|
+
Redux Store Snapshot
|
|
1763
|
+
</react_native_1.Text>
|
|
1764
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 11, color: AppColors_1.AppColors.grayText, marginTop: 2 }}>
|
|
1765
|
+
Total size: {(0, helpers_1.getSize)(reduxState)} • {reducerKeys.length} Reducers
|
|
1766
|
+
</react_native_1.Text>
|
|
1767
|
+
</react_native_1.View>
|
|
980
1768
|
<CopyButton_1.default value={() => reduxState} label="Overall Store"/>
|
|
981
1769
|
</react_native_1.View>
|
|
982
1770
|
|
|
1771
|
+
{/* Search Bar */}
|
|
983
1772
|
<react_native_1.View style={{
|
|
984
1773
|
flexDirection: 'row',
|
|
985
1774
|
alignItems: 'center',
|
|
986
1775
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
987
1776
|
borderRadius: 8,
|
|
988
1777
|
marginHorizontal: 16,
|
|
989
|
-
|
|
990
|
-
marginBottom: 8,
|
|
1778
|
+
marginBottom: 12,
|
|
991
1779
|
paddingHorizontal: 10,
|
|
992
1780
|
borderWidth: 1,
|
|
993
1781
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
@@ -1005,66 +1793,24 @@ const NetworkInspector = () => {
|
|
|
1005
1793
|
</react_native_1.Pressable>)}
|
|
1006
1794
|
</react_native_1.View>
|
|
1007
1795
|
|
|
1008
|
-
{
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
[key]: !prev[key],
|
|
1020
|
-
}));
|
|
1021
|
-
}} style={{
|
|
1022
|
-
flexDirection: 'row',
|
|
1023
|
-
alignItems: 'center',
|
|
1024
|
-
justifyContent: 'space-between',
|
|
1025
|
-
paddingHorizontal: 16,
|
|
1026
|
-
paddingVertical: 12,
|
|
1027
|
-
}}>
|
|
1028
|
-
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8, flex: 1 }}>
|
|
1029
|
-
<react_native_1.Animated.View style={{ transform: [{ rotate: isExpanded ? '0deg' : '-90deg' }] }}>
|
|
1030
|
-
<NetworkIcons_1.ChevronIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
1031
|
-
</react_native_1.Animated.View>
|
|
1032
|
-
<react_native_1.Text style={{
|
|
1033
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1034
|
-
fontSize: 13,
|
|
1035
|
-
color: AppColors_1.AppColors.purple,
|
|
1036
|
-
}}>
|
|
1037
|
-
{key}
|
|
1038
|
-
</react_native_1.Text>
|
|
1039
|
-
<react_native_1.Text style={{
|
|
1040
|
-
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
1041
|
-
fontSize: 11,
|
|
1042
|
-
color: AppColors_1.AppColors.grayTextWeak,
|
|
1043
|
-
}}>
|
|
1044
|
-
({typeof val === 'object' && val !== null ? `${Object.keys(val).length} fields` : typeof val})
|
|
1045
|
-
</react_native_1.Text>
|
|
1046
|
-
</react_native_1.View>
|
|
1047
|
-
<CopyButton_1.default value={() => val} label={`${key} Reducer`}/>
|
|
1048
|
-
</react_native_1.Pressable>
|
|
1049
|
-
|
|
1050
|
-
{isExpanded && (<react_native_1.View style={{
|
|
1051
|
-
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
1052
|
-
paddingHorizontal: 12,
|
|
1053
|
-
paddingVertical: 8,
|
|
1054
|
-
borderTopWidth: 1,
|
|
1055
|
-
borderTopColor: AppColors_1.AppColors.dividerColor,
|
|
1056
|
-
}}>
|
|
1057
|
-
<JsonViewer_1.default data={val} search={reduxSearch}/>
|
|
1058
|
-
</react_native_1.View>)}
|
|
1059
|
-
</react_native_1.View>);
|
|
1060
|
-
})}
|
|
1796
|
+
{/* Main Tree Card */}
|
|
1797
|
+
<react_native_1.View style={{
|
|
1798
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1799
|
+
borderRadius: 12,
|
|
1800
|
+
borderWidth: 1,
|
|
1801
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1802
|
+
marginHorizontal: 16,
|
|
1803
|
+
padding: 12,
|
|
1804
|
+
}}>
|
|
1805
|
+
<ReduxTreeView_1.ReduxTreeView state={reduxState} lastActionMap={lastActionMap} search={reduxSearch}/>
|
|
1806
|
+
</react_native_1.View>
|
|
1061
1807
|
</react_native_1.ScrollView>);
|
|
1062
1808
|
};
|
|
1063
1809
|
return (<>
|
|
1064
1810
|
{hasNavigationContext && (<NavigationTracker onStateChange={setNavState}/>)}
|
|
1065
1811
|
<TouchableScale_1.default style={styles_1.default.fabWrapper} onPress={() => setVisible(true)} hitSlop={10}>
|
|
1066
1812
|
<react_native_1.Animated.View style={[styles_1.default.fabPulseRing, { transform: [{ scale: pulseAnim }] }]}/>
|
|
1067
|
-
<NetworkIcons_1.BrandCircleIcon size={
|
|
1813
|
+
<NetworkIcons_1.BrandCircleIcon size={62}/>
|
|
1068
1814
|
{(logs.length > 0 || analyticsEvents.length > 0) && (<react_native_1.Animated.View style={[
|
|
1069
1815
|
styles_1.default.fabBadge,
|
|
1070
1816
|
hasErrors ? styles_1.default.fabBadgeError : styles_1.default.fabBadgeNormal,
|
|
@@ -1109,7 +1855,33 @@ const NetworkInspector = () => {
|
|
|
1109
1855
|
<NetworkIcons_1.WhiteBackNavigation />
|
|
1110
1856
|
</TouchableScale_1.default>
|
|
1111
1857
|
|
|
1112
|
-
{selected == null && selectedEvent == null ? (<react_native_1.
|
|
1858
|
+
{selected == null && selectedEvent == null ? (<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 14, flex: 1 }}>
|
|
1859
|
+
<react_native_1.View style={{
|
|
1860
|
+
width: 42,
|
|
1861
|
+
height: 42,
|
|
1862
|
+
borderRadius: 10,
|
|
1863
|
+
backgroundColor: 'rgba(255,255,255,0.13)',
|
|
1864
|
+
borderWidth: 1.5,
|
|
1865
|
+
borderColor: 'rgba(255,255,255,0.25)',
|
|
1866
|
+
alignItems: 'center',
|
|
1867
|
+
justifyContent: 'center',
|
|
1868
|
+
shadowColor: '#000',
|
|
1869
|
+
shadowOpacity: 0.15,
|
|
1870
|
+
shadowRadius: 4,
|
|
1871
|
+
shadowOffset: { width: 0, height: 2 },
|
|
1872
|
+
}}>
|
|
1873
|
+
<NetworkIcons_1.BrandSquareIcon size={36}/>
|
|
1874
|
+
</react_native_1.View>
|
|
1875
|
+
<react_native_1.View style={{ gap: 3 }}>
|
|
1876
|
+
<react_native_1.Text style={[styles_1.default.headerTitle, { fontSize: 17, letterSpacing: 0.2 }]}>RN InApp Inspector</react_native_1.Text>
|
|
1877
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 5 }}>
|
|
1878
|
+
<react_native_1.Animated.View style={{ width: 6, height: 6, borderRadius: 3, backgroundColor: '#4ADE80', opacity: activePulseAnim }}/>
|
|
1879
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interMedium, fontSize: 10, color: 'rgba(255,255,255,0.78)', letterSpacing: 0.3 }}>
|
|
1880
|
+
Active • {react_native_1.Platform.OS === 'ios' ? 'iOS' : 'Android'} (v1.0.10)
|
|
1881
|
+
</react_native_1.Text>
|
|
1882
|
+
</react_native_1.View>
|
|
1883
|
+
</react_native_1.View>
|
|
1884
|
+
</react_native_1.View>) : null}
|
|
1113
1885
|
</react_native_1.View>
|
|
1114
1886
|
|
|
1115
1887
|
<react_native_1.View style={styles_1.default.headerCenter}>
|
|
@@ -1185,15 +1957,11 @@ const NetworkInspector = () => {
|
|
|
1185
1957
|
</react_native_1.View>
|
|
1186
1958
|
|
|
1187
1959
|
<react_native_1.View style={styles_1.default.headerRight}>
|
|
1188
|
-
<TouchableScale_1.default onPress={() => {
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
(0, styles_1.toggleGlobalTheme)(newTheme);
|
|
1192
|
-
}} hitSlop={15} style={[styles_1.default.closeButtonCircle, { marginRight: 8 }]}>
|
|
1193
|
-
{isDark ? (<NetworkIcons_1.SunIcon color="#FFFFFF" size={16}/>) : (<NetworkIcons_1.MoonIcon color="#FFFFFF" size={16}/>)}
|
|
1194
|
-
</TouchableScale_1.default>
|
|
1960
|
+
{selected == null && selectedEvent == null && (<TouchableScale_1.default onPress={() => setSettingsPage('main')} hitSlop={15} style={[styles_1.default.closeButtonSquare, { marginRight: 8, backgroundColor: 'rgba(255,255,255,0.15)' }]}>
|
|
1961
|
+
<NetworkIcons_1.SettingsIcon color="#FFFFFF" size={16}/>
|
|
1962
|
+
</TouchableScale_1.default>)}
|
|
1195
1963
|
|
|
1196
|
-
<TouchableScale_1.default onPress={closeModal} hitSlop={15} style={styles_1.default.
|
|
1964
|
+
<TouchableScale_1.default onPress={closeModal} hitSlop={15} style={styles_1.default.closeButtonSquare}>
|
|
1197
1965
|
<NetworkIcons_1.CloseWhite size={16}/>
|
|
1198
1966
|
</TouchableScale_1.default>
|
|
1199
1967
|
</react_native_1.View>
|
|
@@ -1201,7 +1969,7 @@ const NetworkInspector = () => {
|
|
|
1201
1969
|
</react_native_linear_gradient_1.default>
|
|
1202
1970
|
|
|
1203
1971
|
{/* ─── Horizontal Scrollable Tab Bar inside Content ─── */}
|
|
1204
|
-
{selected == null && selectedEvent == null ? (<react_native_1.View style={styles_1.default.tabBarContainer}>
|
|
1972
|
+
{selected == null && selectedEvent == null && settingsPage === null ? (<react_native_1.View style={styles_1.default.tabBarContainer}>
|
|
1205
1973
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{ paddingRight: 16 }}>
|
|
1206
1974
|
{[
|
|
1207
1975
|
{ key: 'insights', label: 'Insights', count: 0, icon: 'insights' },
|
|
@@ -1210,10 +1978,12 @@ const NetworkInspector = () => {
|
|
|
1210
1978
|
{ key: 'analytics', label: 'Analytics', count: analyticsEvents.length, icon: 'analytics' },
|
|
1211
1979
|
{ key: 'webview', label: 'WebView', count: webViewNavHistory.length, icon: 'webview' },
|
|
1212
1980
|
{ key: 'redux', label: 'Redux', count: 0, icon: 'redux' },
|
|
1213
|
-
].map(tab => {
|
|
1981
|
+
].filter(tab => tabVisibility[tab.key]).map(tab => {
|
|
1214
1982
|
const isActive = activeTab === tab.key;
|
|
1215
1983
|
const iconColor = isActive ? '#FFFFFF' : AppColors_1.AppColors.grayText;
|
|
1216
1984
|
const countLabel = tab.count > 9 ? '9+' : String(tab.count);
|
|
1985
|
+
const hasUnreadApis = activeTab !== 'apis' && logs.length > lastReadApisCount;
|
|
1986
|
+
const hasUnreadLogs = activeTab !== 'logs' && consoleLogs.length > lastReadLogsCount;
|
|
1217
1987
|
return (<TouchableScale_1.default key={tab.key} onPress={() => {
|
|
1218
1988
|
requestAnimationFrame(() => {
|
|
1219
1989
|
setActiveTab(tab.key);
|
|
@@ -1235,6 +2005,15 @@ const NetworkInspector = () => {
|
|
|
1235
2005
|
]}>
|
|
1236
2006
|
{tab.label} {tab.count > 0 ? `(${countLabel})` : ''}
|
|
1237
2007
|
</react_native_1.Text>
|
|
2008
|
+
{((tab.key === 'apis' && hasUnreadApis) || (tab.key === 'logs' && hasUnreadLogs)) && (<react_native_1.Animated.View style={{
|
|
2009
|
+
width: 6,
|
|
2010
|
+
height: 6,
|
|
2011
|
+
borderRadius: 3,
|
|
2012
|
+
backgroundColor: AppColors_1.AppColors.errorColor,
|
|
2013
|
+
marginLeft: 4,
|
|
2014
|
+
alignSelf: 'center',
|
|
2015
|
+
transform: [{ scale: unreadPulseAnim }],
|
|
2016
|
+
}}/>)}
|
|
1238
2017
|
</react_native_1.View>
|
|
1239
2018
|
</TouchableScale_1.default>);
|
|
1240
2019
|
})}
|
|
@@ -1857,156 +2636,250 @@ const NetworkInspector = () => {
|
|
|
1857
2636
|
styles_1.default.listContent,
|
|
1858
2637
|
filteredConsoleLogs.length === 0 && { flexGrow: 1 },
|
|
1859
2638
|
]} keyboardShouldPersistTaps="handled"/>
|
|
1860
|
-
</react_native_1.View>) : activeTab === 'webview' ? (<react_native_1.View style={
|
|
2639
|
+
</react_native_1.View>) : activeTab === 'webview' ? (webViewNavHistory.length === 0 ? (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
2640
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
2641
|
+
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
2642
|
+
</react_native_1.View>
|
|
2643
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>No WebView Activity</react_native_1.Text>
|
|
2644
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
2645
|
+
Load a webpage within a connected WebView component to inspect pages, page source, and console logs.
|
|
2646
|
+
</react_native_1.Text>
|
|
2647
|
+
</react_native_1.View>) : (<react_native_1.View style={{ flex: 1 }}>
|
|
2648
|
+
{/* ─── Current Page Address Bar (Now on top) ─── */}
|
|
2649
|
+
{(() => {
|
|
2650
|
+
const currentUrl = webViewNavHistory[0]?.url;
|
|
2651
|
+
if (!currentUrl)
|
|
2652
|
+
return null;
|
|
2653
|
+
return (<react_native_1.View style={{
|
|
2654
|
+
paddingHorizontal: 12,
|
|
2655
|
+
paddingTop: 6,
|
|
2656
|
+
paddingBottom: 6,
|
|
2657
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
2658
|
+
borderBottomWidth: 1,
|
|
2659
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
2660
|
+
}}>
|
|
2661
|
+
<react_native_1.View style={{
|
|
2662
|
+
flexDirection: 'row',
|
|
2663
|
+
alignItems: 'center',
|
|
2664
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
2665
|
+
borderRadius: 8,
|
|
2666
|
+
borderWidth: 1.5,
|
|
2667
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
2668
|
+
paddingHorizontal: 10,
|
|
2669
|
+
paddingVertical: 5,
|
|
2670
|
+
gap: 8,
|
|
2671
|
+
}}>
|
|
2672
|
+
{/* Left: Lock and HTTPS label */}
|
|
2673
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
2674
|
+
<react_native_1.Text style={{ fontSize: 11 }}>🔒</react_native_1.Text>
|
|
2675
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 9.5, color: AppColors_1.AppColors.greenColor, letterSpacing: 0.5 }}>HTTPS</react_native_1.Text>
|
|
2676
|
+
</react_native_1.View>
|
|
2677
|
+
<react_native_1.View style={{ width: 1.5, height: 12, backgroundColor: AppColors_1.AppColors.grayBorderSecondary }}/>
|
|
2678
|
+
|
|
2679
|
+
{/* Middle: URL text (Address style) */}
|
|
2680
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
2681
|
+
<HighlightText_1.default text={currentUrl} search={webViewSearch} numberOfLines={1} ellipsizeMode="tail" style={{
|
|
2682
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2683
|
+
fontSize: 11.5,
|
|
2684
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
2685
|
+
}} highlightStyle={styles_1.default.highlight} detectLinks={false}/>
|
|
2686
|
+
</react_native_1.View>
|
|
2687
|
+
|
|
2688
|
+
{/* Right: Copy Button */}
|
|
2689
|
+
<CopyButton_1.default value={currentUrl} label="URL"/>
|
|
2690
|
+
|
|
2691
|
+
{/* Right: Globe Icon button to open browser */}
|
|
2692
|
+
<TouchableScale_1.default onPress={() => react_native_1.Linking.openURL(currentUrl)} hitSlop={8} style={{
|
|
2693
|
+
width: 26,
|
|
2694
|
+
height: 26,
|
|
2695
|
+
borderRadius: 13,
|
|
2696
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
2697
|
+
borderWidth: 1,
|
|
2698
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
2699
|
+
alignItems: 'center',
|
|
2700
|
+
justifyContent: 'center',
|
|
2701
|
+
}}>
|
|
2702
|
+
<NetworkIcons_1.GlobeIcon size={11} color={AppColors_1.AppColors.purple}/>
|
|
2703
|
+
</TouchableScale_1.default>
|
|
2704
|
+
</react_native_1.View>
|
|
2705
|
+
</react_native_1.View>);
|
|
2706
|
+
})()}
|
|
2707
|
+
|
|
2708
|
+
{/* ─── WebView Sub-Tabs (Now below Address Bar) ─── */}
|
|
1861
2709
|
<react_native_1.View style={{
|
|
1862
|
-
backgroundColor:
|
|
2710
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1863
2711
|
borderBottomWidth: 1,
|
|
1864
2712
|
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1865
|
-
|
|
2713
|
+
paddingVertical: 6,
|
|
1866
2714
|
}}>
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
marginHorizontal: 16,
|
|
1870
|
-
marginTop: webViewSubTab === 'navigation' ? 12 : 4,
|
|
1871
|
-
marginBottom: 8,
|
|
1872
|
-
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
1873
|
-
borderRadius: 8,
|
|
1874
|
-
padding: 4,
|
|
2715
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
2716
|
+
paddingHorizontal: 12,
|
|
1875
2717
|
flexDirection: 'row',
|
|
1876
|
-
|
|
1877
|
-
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
2718
|
+
gap: 8,
|
|
1878
2719
|
}}>
|
|
2720
|
+
{/* Sub-tab 1: Preview */}
|
|
1879
2721
|
<react_native_1.Pressable style={[
|
|
1880
2722
|
{
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
borderRadius:
|
|
2723
|
+
paddingVertical: 6,
|
|
2724
|
+
paddingHorizontal: 14,
|
|
2725
|
+
borderRadius: 8,
|
|
1884
2726
|
alignItems: 'center',
|
|
2727
|
+
flexDirection: 'row',
|
|
2728
|
+
gap: 6,
|
|
2729
|
+
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
2730
|
+
borderWidth: 1,
|
|
2731
|
+
borderColor: 'transparent',
|
|
1885
2732
|
},
|
|
1886
|
-
webViewSubTab === '
|
|
1887
|
-
backgroundColor: AppColors_1.AppColors.
|
|
1888
|
-
|
|
1889
|
-
shadowOpacity: 0.1,
|
|
1890
|
-
shadowRadius: 3,
|
|
1891
|
-
shadowOffset: { width: 0, height: 1 },
|
|
1892
|
-
elevation: 2,
|
|
2733
|
+
webViewSubTab === 'preview' && {
|
|
2734
|
+
backgroundColor: AppColors_1.AppColors.purple,
|
|
2735
|
+
borderColor: AppColors_1.AppColors.purple,
|
|
1893
2736
|
},
|
|
1894
|
-
]} onPress={() => setWebViewSubTab('
|
|
1895
|
-
<
|
|
2737
|
+
]} onPress={() => setWebViewSubTab('preview')}>
|
|
2738
|
+
<NetworkIcons_1.EyeIcon color={webViewSubTab === 'preview' ? '#FFFFFF' : AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
2739
|
+
<react_native_1.Text style={{
|
|
2740
|
+
fontFamily: webViewSubTab === 'preview' ? AppFonts_1.AppFonts.interBold : AppFonts_1.AppFonts.interMedium,
|
|
2741
|
+
fontSize: 12,
|
|
2742
|
+
color: webViewSubTab === 'preview' ? '#FFFFFF' : AppColors_1.AppColors.grayTextStrong,
|
|
2743
|
+
}}>
|
|
2744
|
+
Preview
|
|
2745
|
+
</react_native_1.Text>
|
|
2746
|
+
</react_native_1.Pressable>
|
|
2747
|
+
|
|
2748
|
+
{/* Sub-tab 2: Page Source */}
|
|
2749
|
+
<react_native_1.Pressable style={[
|
|
1896
2750
|
{
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
2751
|
+
paddingVertical: 6,
|
|
2752
|
+
paddingHorizontal: 14,
|
|
2753
|
+
borderRadius: 8,
|
|
2754
|
+
alignItems: 'center',
|
|
2755
|
+
flexDirection: 'row',
|
|
2756
|
+
gap: 6,
|
|
2757
|
+
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
2758
|
+
borderWidth: 1,
|
|
2759
|
+
borderColor: 'transparent',
|
|
1900
2760
|
},
|
|
1901
2761
|
webViewSubTab === 'html' && {
|
|
1902
|
-
|
|
1903
|
-
|
|
2762
|
+
backgroundColor: AppColors_1.AppColors.purple,
|
|
2763
|
+
borderColor: AppColors_1.AppColors.purple,
|
|
1904
2764
|
},
|
|
1905
|
-
]}>
|
|
1906
|
-
|
|
2765
|
+
]} onPress={() => setWebViewSubTab('html')}>
|
|
2766
|
+
<NetworkIcons_1.HtmlIcon color={webViewSubTab === 'html' ? '#FFFFFF' : AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
2767
|
+
<react_native_1.Text style={{
|
|
2768
|
+
fontFamily: webViewSubTab === 'html' ? AppFonts_1.AppFonts.interBold : AppFonts_1.AppFonts.interMedium,
|
|
2769
|
+
fontSize: 12,
|
|
2770
|
+
color: webViewSubTab === 'html' ? '#FFFFFF' : AppColors_1.AppColors.grayTextStrong,
|
|
2771
|
+
}}>
|
|
2772
|
+
Page Source
|
|
1907
2773
|
</react_native_1.Text>
|
|
1908
2774
|
</react_native_1.Pressable>
|
|
2775
|
+
|
|
2776
|
+
{/* Sub-tab 3: History */}
|
|
1909
2777
|
<react_native_1.Pressable style={[
|
|
1910
2778
|
{
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
borderRadius:
|
|
2779
|
+
paddingVertical: 6,
|
|
2780
|
+
paddingHorizontal: 14,
|
|
2781
|
+
borderRadius: 8,
|
|
1914
2782
|
alignItems: 'center',
|
|
2783
|
+
flexDirection: 'row',
|
|
2784
|
+
gap: 6,
|
|
2785
|
+
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
2786
|
+
borderWidth: 1,
|
|
2787
|
+
borderColor: 'transparent',
|
|
1915
2788
|
},
|
|
1916
2789
|
webViewSubTab === 'navigation' && {
|
|
1917
|
-
backgroundColor: AppColors_1.AppColors.
|
|
1918
|
-
|
|
1919
|
-
shadowOpacity: 0.1,
|
|
1920
|
-
shadowRadius: 3,
|
|
1921
|
-
shadowOffset: { width: 0, height: 1 },
|
|
1922
|
-
elevation: 2,
|
|
2790
|
+
backgroundColor: AppColors_1.AppColors.purple,
|
|
2791
|
+
borderColor: AppColors_1.AppColors.purple,
|
|
1923
2792
|
},
|
|
1924
2793
|
]} onPress={() => setWebViewSubTab('navigation')}>
|
|
1925
|
-
<
|
|
2794
|
+
<NetworkIcons_1.ClockIcon color={webViewSubTab === 'navigation' ? '#FFFFFF' : AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
2795
|
+
<react_native_1.Text style={{
|
|
2796
|
+
fontFamily: webViewSubTab === 'navigation' ? AppFonts_1.AppFonts.interBold : AppFonts_1.AppFonts.interMedium,
|
|
2797
|
+
fontSize: 12,
|
|
2798
|
+
color: webViewSubTab === 'navigation' ? '#FFFFFF' : AppColors_1.AppColors.grayTextStrong,
|
|
2799
|
+
}}>
|
|
2800
|
+
History ({webViewNavHistory.length})
|
|
2801
|
+
</react_native_1.Text>
|
|
2802
|
+
</react_native_1.Pressable>
|
|
2803
|
+
|
|
2804
|
+
{/* Sub-tab 4: Console */}
|
|
2805
|
+
<react_native_1.Pressable style={[
|
|
1926
2806
|
{
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
2807
|
+
paddingVertical: 6,
|
|
2808
|
+
paddingHorizontal: 14,
|
|
2809
|
+
borderRadius: 8,
|
|
2810
|
+
alignItems: 'center',
|
|
2811
|
+
flexDirection: 'row',
|
|
2812
|
+
gap: 6,
|
|
2813
|
+
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
2814
|
+
borderWidth: 1,
|
|
2815
|
+
borderColor: 'transparent',
|
|
1930
2816
|
},
|
|
1931
|
-
webViewSubTab === '
|
|
1932
|
-
|
|
1933
|
-
|
|
2817
|
+
webViewSubTab === 'console' && {
|
|
2818
|
+
backgroundColor: AppColors_1.AppColors.purple,
|
|
2819
|
+
borderColor: AppColors_1.AppColors.purple,
|
|
1934
2820
|
},
|
|
1935
|
-
]}>
|
|
1936
|
-
|
|
2821
|
+
]} onPress={() => setWebViewSubTab('console')}>
|
|
2822
|
+
<NetworkIcons_1.TerminalIcon color={webViewSubTab === 'console' ? '#FFFFFF' : AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
2823
|
+
<react_native_1.Text style={{
|
|
2824
|
+
fontFamily: webViewSubTab === 'console' ? AppFonts_1.AppFonts.interBold : AppFonts_1.AppFonts.interMedium,
|
|
2825
|
+
fontSize: 12,
|
|
2826
|
+
color: webViewSubTab === 'console' ? '#FFFFFF' : AppColors_1.AppColors.grayTextStrong,
|
|
2827
|
+
}}>
|
|
2828
|
+
Console ({webViewLogs.length})
|
|
1937
2829
|
</react_native_1.Text>
|
|
1938
2830
|
</react_native_1.Pressable>
|
|
1939
|
-
</react_native_1.
|
|
2831
|
+
</react_native_1.ScrollView>
|
|
1940
2832
|
</react_native_1.View>
|
|
1941
2833
|
|
|
1942
|
-
{/* ─── Current Page Address Bar (Always visible at the top) ─── */}
|
|
1943
|
-
{(() => {
|
|
1944
|
-
const currentUrl = webViewNavHistory[0]?.url;
|
|
1945
|
-
if (!currentUrl)
|
|
1946
|
-
return null;
|
|
1947
|
-
return (<react_native_1.View style={{
|
|
1948
|
-
paddingHorizontal: 16,
|
|
1949
|
-
paddingTop: 10,
|
|
1950
|
-
paddingBottom: 10,
|
|
1951
|
-
backgroundColor: '#FFFFFF',
|
|
1952
|
-
borderBottomWidth: 1,
|
|
1953
|
-
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1954
|
-
}}>
|
|
1955
|
-
<react_native_1.Text style={{
|
|
1956
|
-
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1957
|
-
fontSize: 10,
|
|
1958
|
-
color: '#64748B',
|
|
1959
|
-
textTransform: 'uppercase',
|
|
1960
|
-
letterSpacing: 0.5,
|
|
1961
|
-
marginBottom: 6,
|
|
1962
|
-
}}>
|
|
1963
|
-
Currently debugging for URL
|
|
1964
|
-
</react_native_1.Text>
|
|
1965
|
-
<react_native_1.View style={{
|
|
1966
|
-
flexDirection: 'row',
|
|
1967
|
-
alignItems: 'center',
|
|
1968
|
-
backgroundColor: '#F1F5F9',
|
|
1969
|
-
borderRadius: 20,
|
|
1970
|
-
borderWidth: 1,
|
|
1971
|
-
borderColor: '#E2E8F0',
|
|
1972
|
-
paddingHorizontal: 12,
|
|
1973
|
-
paddingVertical: 6,
|
|
1974
|
-
gap: 8,
|
|
1975
|
-
}}>
|
|
1976
|
-
{/* Left: Clickable Globe Icon to open browser */}
|
|
1977
|
-
<TouchableScale_1.default onPress={() => react_native_1.Linking.openURL(currentUrl)} hitSlop={8} style={{
|
|
1978
|
-
width: 24,
|
|
1979
|
-
height: 24,
|
|
1980
|
-
borderRadius: 12,
|
|
1981
|
-
backgroundColor: '#E2E8F0',
|
|
1982
|
-
alignItems: 'center',
|
|
1983
|
-
justifyContent: 'center',
|
|
1984
|
-
}} children={<NetworkIcons_1.GlobeIcon size={12} color="#475569"/>}/>
|
|
1985
|
-
|
|
1986
|
-
{/* Middle: URL text (Address style) */}
|
|
1987
|
-
<react_native_1.View style={{ flex: 1 }}>
|
|
1988
|
-
<HighlightText_1.default text={currentUrl} search={webViewSearch} numberOfLines={1} ellipsizeMode="tail" style={{
|
|
1989
|
-
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
1990
|
-
fontSize: 11,
|
|
1991
|
-
color: '#475569',
|
|
1992
|
-
}} highlightStyle={styles_1.default.highlight} detectLinks={false}/>
|
|
1993
|
-
</react_native_1.View>
|
|
1994
|
-
|
|
1995
|
-
{/* Right: Copy Button */}
|
|
1996
|
-
<CopyButton_1.default value={currentUrl} label="URL"/>
|
|
1997
|
-
</react_native_1.View>
|
|
1998
|
-
</react_native_1.View>);
|
|
1999
|
-
})()}
|
|
2000
|
-
|
|
2001
2834
|
{webViewSubTab === 'html' ? (<react_native_1.View style={{ flex: 1 }}>
|
|
2002
2835
|
{webViewHtml || webViewCss || webViewJs ? (<react_native_1.View style={{ flex: 1 }}>
|
|
2836
|
+
{/* Clear Inspect Banner */}
|
|
2837
|
+
{inspectedElement && (<react_native_1.View style={{
|
|
2838
|
+
flexDirection: 'row',
|
|
2839
|
+
alignItems: 'center',
|
|
2840
|
+
justifyContent: 'space-between',
|
|
2841
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
2842
|
+
paddingHorizontal: 12,
|
|
2843
|
+
paddingVertical: 6,
|
|
2844
|
+
borderBottomWidth: 1,
|
|
2845
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
2846
|
+
}}>
|
|
2847
|
+
<react_native_1.Text style={{
|
|
2848
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2849
|
+
fontSize: 11.5,
|
|
2850
|
+
color: AppColors_1.AppColors.purple,
|
|
2851
|
+
flex: 1,
|
|
2852
|
+
}}>
|
|
2853
|
+
Inspecting element:{' '}
|
|
2854
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold }}>
|
|
2855
|
+
<{inspectedElement.tagName}
|
|
2856
|
+
{inspectedElement.id ? ` id="${inspectedElement.id}"` : ''}
|
|
2857
|
+
{inspectedElement.className ? ` class="${inspectedElement.className.trim().split(/\s+/)[0]}"` : ''}
|
|
2858
|
+
>
|
|
2859
|
+
</react_native_1.Text>
|
|
2860
|
+
</react_native_1.Text>
|
|
2861
|
+
<react_native_1.Pressable onPress={() => setInspectedElement(null)} style={{
|
|
2862
|
+
paddingHorizontal: 8,
|
|
2863
|
+
paddingVertical: 4,
|
|
2864
|
+
}}>
|
|
2865
|
+
<react_native_1.Text style={{
|
|
2866
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2867
|
+
fontSize: 11,
|
|
2868
|
+
color: AppColors_1.AppColors.purple,
|
|
2869
|
+
}}>
|
|
2870
|
+
Clear Inspect
|
|
2871
|
+
</react_native_1.Text>
|
|
2872
|
+
</react_native_1.Pressable>
|
|
2873
|
+
</react_native_1.View>)}
|
|
2874
|
+
|
|
2003
2875
|
{/* Inner sub-tabs inside HTML source view */}
|
|
2004
2876
|
<react_native_1.View style={{
|
|
2005
2877
|
flexDirection: 'row',
|
|
2006
2878
|
borderBottomWidth: 1,
|
|
2007
|
-
borderBottomColor:
|
|
2008
|
-
backgroundColor:
|
|
2009
|
-
paddingHorizontal:
|
|
2879
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
2880
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
2881
|
+
paddingHorizontal: 12,
|
|
2882
|
+
gap: 12,
|
|
2010
2883
|
}}>
|
|
2011
2884
|
{['html', 'css', 'javascript'].map(tab => {
|
|
2012
2885
|
const active = htmlSubTab === tab;
|
|
@@ -2014,23 +2887,34 @@ const NetworkInspector = () => {
|
|
|
2014
2887
|
? 'HTML'
|
|
2015
2888
|
: tab === 'css'
|
|
2016
2889
|
? 'CSS'
|
|
2017
|
-
: '
|
|
2890
|
+
: 'JavaScript';
|
|
2891
|
+
const activeColor = tab === 'html'
|
|
2892
|
+
? '#EA580C' // Orange
|
|
2893
|
+
: tab === 'css'
|
|
2894
|
+
? '#2563EB' // Blue
|
|
2895
|
+
: '#D97706'; // Dark Yellow/Amber
|
|
2018
2896
|
return (<react_native_1.Pressable key={tab} onPress={() => setHtmlSubTab(tab)} style={{
|
|
2019
|
-
paddingVertical:
|
|
2020
|
-
|
|
2897
|
+
paddingVertical: 8,
|
|
2898
|
+
paddingHorizontal: 4,
|
|
2021
2899
|
borderBottomWidth: 2,
|
|
2022
2900
|
borderBottomColor: active
|
|
2023
|
-
?
|
|
2901
|
+
? activeColor
|
|
2024
2902
|
: 'transparent',
|
|
2903
|
+
flexDirection: 'row',
|
|
2904
|
+
alignItems: 'center',
|
|
2905
|
+
gap: 4,
|
|
2025
2906
|
}}>
|
|
2907
|
+
{tab === 'html' && (<NetworkIcons_1.HtmlIcon color={active ? activeColor : AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
2908
|
+
{tab === 'css' && (<NetworkIcons_1.CssIcon color={active ? activeColor : AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
2909
|
+
{tab === 'javascript' && (<NetworkIcons_1.JsIcon color={active ? activeColor : AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
2026
2910
|
<react_native_1.Text style={{
|
|
2027
2911
|
fontFamily: active
|
|
2028
2912
|
? AppFonts_1.AppFonts.interBold
|
|
2029
2913
|
: AppFonts_1.AppFonts.interMedium,
|
|
2030
|
-
fontSize:
|
|
2914
|
+
fontSize: 13,
|
|
2031
2915
|
color: active
|
|
2032
|
-
?
|
|
2033
|
-
:
|
|
2916
|
+
? activeColor
|
|
2917
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
2034
2918
|
}}>
|
|
2035
2919
|
{label}
|
|
2036
2920
|
</react_native_1.Text>
|
|
@@ -2040,21 +2924,21 @@ const NetworkInspector = () => {
|
|
|
2040
2924
|
<react_native_1.View style={{ flex: 1, padding: 12 }}>
|
|
2041
2925
|
{!isHtmlTabReady ? (<react_native_1.View style={{ flex: 1, justifyContent: 'center', alignItems: 'center', minHeight: 200 }}>
|
|
2042
2926
|
<react_native_1.ActivityIndicator size="large" color={AppColors_1.AppColors.purple}/>
|
|
2043
|
-
</react_native_1.View>) : htmlSubTab === 'html' ? (webViewHtml ? (<CodeSnippet_1.default code={webViewHtml} language="html"/>) : (<react_native_1.Text style={{
|
|
2927
|
+
</react_native_1.View>) : htmlSubTab === 'html' ? (webViewHtml ? (<CodeSnippet_1.default code={webViewHtml} language="html" search={getSearchTermForTab()}/>) : (<react_native_1.Text style={{
|
|
2044
2928
|
fontFamily: 'monospace',
|
|
2045
2929
|
fontSize: 11,
|
|
2046
2930
|
color: '#94A3B8',
|
|
2047
2931
|
padding: 12,
|
|
2048
2932
|
}}>
|
|
2049
2933
|
No HTML content captured.
|
|
2050
|
-
</react_native_1.Text>)) : htmlSubTab === 'css' ? (webViewCss ? (<CodeSnippet_1.default code={webViewCss} language="css"/>) : (<react_native_1.Text style={{
|
|
2934
|
+
</react_native_1.Text>)) : htmlSubTab === 'css' ? (webViewCss ? (<CodeSnippet_1.default code={webViewCss} language="css" search={getSearchTermForTab()}/>) : (<react_native_1.Text style={{
|
|
2051
2935
|
fontFamily: 'monospace',
|
|
2052
2936
|
fontSize: 11,
|
|
2053
2937
|
color: '#94A3B8',
|
|
2054
2938
|
padding: 12,
|
|
2055
2939
|
}}>
|
|
2056
2940
|
No CSS styles detected on this page.
|
|
2057
|
-
</react_native_1.Text>)) : webViewJs ? (<CodeSnippet_1.default code={webViewJs} language="javascript"/>) : (<react_native_1.Text style={{
|
|
2941
|
+
</react_native_1.Text>)) : webViewJs ? (<CodeSnippet_1.default code={webViewJs} language="javascript" search={getSearchTermForTab()}/>) : (<react_native_1.Text style={{
|
|
2058
2942
|
fontFamily: 'monospace',
|
|
2059
2943
|
fontSize: 11,
|
|
2060
2944
|
color: '#94A3B8',
|
|
@@ -2075,7 +2959,7 @@ const NetworkInspector = () => {
|
|
|
2075
2959
|
or Javascript source.
|
|
2076
2960
|
</react_native_1.Text>
|
|
2077
2961
|
</react_native_1.View>)}
|
|
2078
|
-
</react_native_1.View>) : (<react_native_1.FlatList data={filteredNavHistory} keyExtractor={(item, index) => `${index}-${item.timestamp}`} ListHeaderComponent={<react_native_1.View style={{
|
|
2962
|
+
</react_native_1.View>) : webViewSubTab === 'navigation' ? (<react_native_1.FlatList data={filteredNavHistory} keyExtractor={(item, index) => `${index}-${item.timestamp}`} style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} ListHeaderComponent={<react_native_1.View style={{
|
|
2079
2963
|
paddingHorizontal: 16,
|
|
2080
2964
|
paddingTop: 12,
|
|
2081
2965
|
paddingBottom: 8,
|
|
@@ -2090,191 +2974,304 @@ const NetworkInspector = () => {
|
|
|
2090
2974
|
return `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`;
|
|
2091
2975
|
};
|
|
2092
2976
|
return (<react_native_1.View style={{
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2977
|
+
marginHorizontal: 16,
|
|
2978
|
+
marginVertical: 6,
|
|
2979
|
+
borderRadius: 12,
|
|
2980
|
+
borderWidth: 1,
|
|
2981
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
2982
|
+
backgroundColor: isLatest ? AppColors_1.AppColors.purpleShade50 : AppColors_1.AppColors.primaryLight,
|
|
2983
|
+
padding: 14,
|
|
2098
2984
|
flexDirection: 'row',
|
|
2099
2985
|
alignItems: 'center',
|
|
2100
2986
|
justifyContent: 'space-between',
|
|
2101
2987
|
gap: 12,
|
|
2988
|
+
shadowColor: '#000000',
|
|
2989
|
+
shadowOffset: { width: 0, height: 2 },
|
|
2990
|
+
shadowOpacity: isDark ? 0.2 : 0.04,
|
|
2991
|
+
shadowRadius: 4,
|
|
2992
|
+
elevation: 2,
|
|
2102
2993
|
}}>
|
|
2103
|
-
<react_native_1.View style={{ flex: 1, gap:
|
|
2994
|
+
<react_native_1.View style={{ flex: 1, gap: 8 }}>
|
|
2995
|
+
{/* Top row: Title and Badge */}
|
|
2104
2996
|
<react_native_1.View style={{
|
|
2105
2997
|
flexDirection: 'row',
|
|
2106
2998
|
alignItems: 'center',
|
|
2107
|
-
gap:
|
|
2999
|
+
gap: 8,
|
|
2108
3000
|
flexWrap: 'wrap',
|
|
2109
3001
|
}}>
|
|
2110
3002
|
<react_native_1.Text numberOfLines={1} ellipsizeMode="tail" style={{
|
|
2111
3003
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2112
|
-
fontSize:
|
|
2113
|
-
color:
|
|
3004
|
+
fontSize: 14,
|
|
3005
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
2114
3006
|
flexShrink: 1,
|
|
2115
3007
|
}}>
|
|
2116
3008
|
{item.title || 'Untitled Page'}
|
|
2117
3009
|
</react_native_1.Text>
|
|
2118
3010
|
{isLatest && (<react_native_1.View style={{
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
3011
|
+
flexDirection: 'row',
|
|
3012
|
+
alignItems: 'center',
|
|
3013
|
+
gap: 4,
|
|
3014
|
+
backgroundColor: AppColors_1.AppColors.greenStatus,
|
|
3015
|
+
paddingHorizontal: 8,
|
|
3016
|
+
paddingVertical: 3,
|
|
3017
|
+
borderRadius: 12,
|
|
2123
3018
|
}}>
|
|
3019
|
+
<react_native_1.View style={{
|
|
3020
|
+
width: 6,
|
|
3021
|
+
height: 6,
|
|
3022
|
+
borderRadius: 3,
|
|
3023
|
+
backgroundColor: AppColors_1.AppColors.greenBaggageText,
|
|
3024
|
+
}}/>
|
|
2124
3025
|
<react_native_1.Text style={{
|
|
2125
3026
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2126
|
-
fontSize: 9,
|
|
2127
|
-
color:
|
|
3027
|
+
fontSize: 9.5,
|
|
3028
|
+
color: AppColors_1.AppColors.greenBaggageText,
|
|
2128
3029
|
}}>
|
|
2129
3030
|
Active
|
|
2130
3031
|
</react_native_1.Text>
|
|
2131
3032
|
</react_native_1.View>)}
|
|
2132
3033
|
</react_native_1.View>
|
|
2133
|
-
|
|
3034
|
+
|
|
3035
|
+
{/* Middle row: URL with Globe Icon */}
|
|
3036
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
3037
|
+
<NetworkIcons_1.GlobeIcon size={12} color={AppColors_1.AppColors.grayTextWeak}/>
|
|
3038
|
+
<HighlightText_1.default text={item.url} search={webViewSearch} numberOfLines={2} ellipsizeMode="tail" style={{
|
|
2134
3039
|
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2135
|
-
fontSize:
|
|
2136
|
-
color:
|
|
2137
|
-
|
|
3040
|
+
fontSize: 12,
|
|
3041
|
+
color: AppColors_1.AppColors.grayText,
|
|
3042
|
+
flex: 1,
|
|
2138
3043
|
}} highlightStyle={styles_1.default.highlight} detectLinks={true}/>
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
{
|
|
2145
|
-
|
|
3044
|
+
</react_native_1.View>
|
|
3045
|
+
|
|
3046
|
+
{/* Bottom row: Time */}
|
|
3047
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
3048
|
+
<NetworkIcons_1.ClockIcon size={11} color={AppColors_1.AppColors.grayTextWeak}/>
|
|
3049
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 11, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
3050
|
+
{formatNavTime(item.timestamp)}
|
|
3051
|
+
</react_native_1.Text>
|
|
3052
|
+
</react_native_1.View>
|
|
2146
3053
|
</react_native_1.View>
|
|
2147
|
-
<CopyButton_1.default value={item.url} label="
|
|
3054
|
+
<CopyButton_1.default value={item.url} label="URL"/>
|
|
2148
3055
|
</react_native_1.View>);
|
|
2149
|
-
}} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState_1.default isSearch={
|
|
3056
|
+
}} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState_1.default isSearch={webViewSearch.length > 0}/>} contentContainerStyle={[
|
|
2150
3057
|
styles_1.default.listContent,
|
|
2151
3058
|
filteredNavHistory.length === 0 && { flexGrow: 1 },
|
|
2152
|
-
]} keyboardShouldPersistTaps="handled"/>)}
|
|
2153
|
-
|
|
3059
|
+
]} keyboardShouldPersistTaps="handled"/>) : webViewSubTab === 'console' ? (<react_native_1.View style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }}>
|
|
3060
|
+
{webViewLogs.length > 0 ? (<react_native_1.FlatList data={webViewLogs} keyExtractor={(item) => String(item.id)} style={{ flex: 1 }} ListHeaderComponent={<react_native_1.View style={{ paddingHorizontal: 16, paddingTop: 12, paddingBottom: 8, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
3061
|
+
<react_native_1.Text style={styles_1.default.resultCount}>
|
|
3062
|
+
Console Logs ({webViewLogs.length})
|
|
3063
|
+
</react_native_1.Text>
|
|
3064
|
+
<TouchableScale_1.default onPress={() => (0, webViewLogger_1.clearWebViewData)()} style={{ padding: 6, borderRadius: 6, backgroundColor: AppColors_1.AppColors.primaryLight, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary }}>
|
|
3065
|
+
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={14}/>
|
|
3066
|
+
</TouchableScale_1.default>
|
|
3067
|
+
</react_native_1.View>} renderItem={({ item }) => {
|
|
3068
|
+
const logColor = item.type === 'error' ? AppColors_1.AppColors.errorColor :
|
|
3069
|
+
item.type === 'warn' ? AppColors_1.AppColors.warningIconGold :
|
|
3070
|
+
item.type === 'info' ? AppColors_1.AppColors.skyBlue :
|
|
3071
|
+
AppColors_1.AppColors.grayTextWeak;
|
|
3072
|
+
const bgColor = item.type === 'error' ? 'rgba(255, 46, 87, 0.06)' :
|
|
3073
|
+
item.type === 'warn' ? 'rgba(191, 162, 82, 0.08)' :
|
|
3074
|
+
AppColors_1.AppColors.primaryLight;
|
|
3075
|
+
const d = new Date(item.timestamp);
|
|
3076
|
+
const timeStr = `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`;
|
|
3077
|
+
return (<react_native_1.View style={{
|
|
3078
|
+
marginHorizontal: 12,
|
|
3079
|
+
marginVertical: 3,
|
|
3080
|
+
borderRadius: 8,
|
|
3081
|
+
borderWidth: 1,
|
|
3082
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
3083
|
+
borderLeftWidth: 3,
|
|
3084
|
+
borderLeftColor: logColor,
|
|
3085
|
+
backgroundColor: bgColor,
|
|
3086
|
+
padding: 10,
|
|
3087
|
+
flexDirection: 'row',
|
|
3088
|
+
gap: 8,
|
|
3089
|
+
alignItems: 'flex-start',
|
|
3090
|
+
}}>
|
|
3091
|
+
<react_native_1.View style={{ paddingTop: 1 }}>
|
|
3092
|
+
<NetworkIcons_1.TerminalIcon color={logColor} size={11}/>
|
|
3093
|
+
</react_native_1.View>
|
|
3094
|
+
<react_native_1.View style={{ flex: 1, gap: 3 }}>
|
|
3095
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
3096
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 10, color: logColor, textTransform: 'uppercase', letterSpacing: 0.5 }}>
|
|
3097
|
+
{item.type}
|
|
3098
|
+
</react_native_1.Text>
|
|
3099
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
3100
|
+
{timeStr}
|
|
3101
|
+
</react_native_1.Text>
|
|
3102
|
+
</react_native_1.View>
|
|
3103
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 12, color: AppColors_1.AppColors.primaryBlack, lineHeight: 16 }}>
|
|
3104
|
+
{item.message}
|
|
3105
|
+
</react_native_1.Text>
|
|
3106
|
+
</react_native_1.View>
|
|
3107
|
+
</react_native_1.View>);
|
|
3108
|
+
}} initialNumToRender={20} maxToRenderPerBatch={20} windowSize={7} contentContainerStyle={[styles_1.default.listContent, webViewLogs.length === 0 && { flexGrow: 1 }]}/>) : (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
3109
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
3110
|
+
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
3111
|
+
</react_native_1.View>
|
|
3112
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>No Console Logs</react_native_1.Text>
|
|
3113
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
3114
|
+
Console logs from the WebView will appear here.
|
|
3115
|
+
</react_native_1.Text>
|
|
3116
|
+
</react_native_1.View>)}
|
|
3117
|
+
</react_native_1.View>) : (<react_native_1.View style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }}>
|
|
3118
|
+
{webViewHtml ? (OriginalWebView ? (<OriginalWebView source={{ html: webViewHtml, baseUrl: webViewHtmlUrl }} injectedJavaScript={previewInspectScript} onMessage={(event) => {
|
|
3119
|
+
try {
|
|
3120
|
+
const data = JSON.parse(event.nativeEvent.data);
|
|
3121
|
+
if (data.type === 'preview-inspect') {
|
|
3122
|
+
setInspectedElement({
|
|
3123
|
+
tagName: data.tagName,
|
|
3124
|
+
id: data.id,
|
|
3125
|
+
className: data.className,
|
|
3126
|
+
searchStr: data.searchStr,
|
|
3127
|
+
});
|
|
3128
|
+
setWebViewSubTab('html');
|
|
3129
|
+
setHtmlSubTab('html');
|
|
3130
|
+
}
|
|
3131
|
+
}
|
|
3132
|
+
catch (err) { }
|
|
3133
|
+
}} style={{ flex: 1 }}/>) : (<react_native_1.View style={{ flex: 1, justifyContent: 'center', alignItems: 'center', padding: 20 }}>
|
|
3134
|
+
<react_native_1.Text style={{ color: AppColors_1.AppColors.grayText, textAlign: 'center', fontFamily: AppFonts_1.AppFonts.interMedium }}>
|
|
3135
|
+
react-native-webview is not installed in the target project. Install it to enable Preview mode.
|
|
3136
|
+
</react_native_1.Text>
|
|
3137
|
+
</react_native_1.View>)) : (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
3138
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
3139
|
+
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
3140
|
+
</react_native_1.View>
|
|
3141
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
3142
|
+
No Preview Available
|
|
3143
|
+
</react_native_1.Text>
|
|
3144
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
3145
|
+
Load a page in the WebView to see its visual preview.
|
|
3146
|
+
</react_native_1.Text>
|
|
3147
|
+
</react_native_1.View>)}
|
|
3148
|
+
</react_native_1.View>)}
|
|
3149
|
+
</react_native_1.View>)) : activeTab === 'redux' ? (renderReduxTab()) : (<react_native_1.View style={{ flex: 1 }}>
|
|
2154
3150
|
{/* Non-scrollable details header */}
|
|
2155
3151
|
<react_native_1.View style={{ paddingHorizontal: 6, paddingTop: 4 }}>
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
3152
|
+
<react_native_1.View style={styles_1.default.detailInfoBar}>
|
|
3153
|
+
{(() => {
|
|
3154
|
+
let hostStr = '';
|
|
3155
|
+
let pathStr = detailDisplayUrl;
|
|
3156
|
+
let queryStr = '';
|
|
3157
|
+
try {
|
|
3158
|
+
// Simple parsing fallback for React Native environments
|
|
3159
|
+
const qIndex = detailDisplayUrl.indexOf('?');
|
|
3160
|
+
let cleanUrlForParsing = detailDisplayUrl;
|
|
3161
|
+
if (qIndex !== -1) {
|
|
3162
|
+
pathStr = detailDisplayUrl.substring(0, qIndex);
|
|
3163
|
+
queryStr = detailDisplayUrl.substring(qIndex);
|
|
3164
|
+
cleanUrlForParsing = pathStr;
|
|
3165
|
+
}
|
|
3166
|
+
const schemeIndex = cleanUrlForParsing.indexOf('://');
|
|
3167
|
+
if (schemeIndex !== -1) {
|
|
3168
|
+
const withoutScheme = cleanUrlForParsing.substring(schemeIndex + 3);
|
|
3169
|
+
const firstSlash = withoutScheme.indexOf('/');
|
|
3170
|
+
if (firstSlash !== -1) {
|
|
3171
|
+
hostStr = withoutScheme.substring(0, firstSlash);
|
|
3172
|
+
pathStr = withoutScheme.substring(firstSlash);
|
|
3173
|
+
}
|
|
3174
|
+
else {
|
|
3175
|
+
hostStr = withoutScheme;
|
|
3176
|
+
pathStr = '/';
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
catch (e) { }
|
|
3181
|
+
return (<>
|
|
3182
|
+
<react_native_1.View style={styles_1.default.detailInfoTop}>
|
|
3183
|
+
<react_native_1.View style={{
|
|
2175
3184
|
flexDirection: 'row',
|
|
2176
3185
|
alignItems: 'center',
|
|
2177
|
-
gap:
|
|
3186
|
+
gap: 8,
|
|
2178
3187
|
}}>
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
3188
|
+
<react_native_1.View style={[
|
|
3189
|
+
styles_1.default.methodBadge,
|
|
3190
|
+
{
|
|
3191
|
+
backgroundColor: `${constants_1.METHOD_COLORS[selected.method] ??
|
|
3192
|
+
constants_1.METHOD_COLORS.ALL}15`,
|
|
3193
|
+
},
|
|
3194
|
+
]}>
|
|
3195
|
+
<react_native_1.Text style={[
|
|
3196
|
+
styles_1.default.methodBadgeText,
|
|
3197
|
+
{
|
|
3198
|
+
color: constants_1.METHOD_COLORS[selected.method] ??
|
|
3199
|
+
constants_1.METHOD_COLORS.ALL,
|
|
3200
|
+
},
|
|
3201
|
+
]}>
|
|
3202
|
+
{selected.method}
|
|
3203
|
+
</react_native_1.Text>
|
|
3204
|
+
</react_native_1.View>
|
|
3205
|
+
|
|
3206
|
+
{selected.status != null && (<react_native_1.View style={[
|
|
3207
|
+
styles_1.default.chip,
|
|
3208
|
+
{
|
|
3209
|
+
backgroundColor: selected.status === 0
|
|
3210
|
+
? `${AppColors_1.AppColors.errorColor}15`
|
|
3211
|
+
: `${(0, helpers_1.getStatusColor)(selected.status)}15`,
|
|
3212
|
+
borderColor: selected.status === 0
|
|
3213
|
+
? `${AppColors_1.AppColors.errorColor}40`
|
|
3214
|
+
: `${(0, helpers_1.getStatusColor)(selected.status)}40`,
|
|
3215
|
+
},
|
|
3216
|
+
]}>
|
|
3217
|
+
{selected.status === 0 ? (<NetworkIcons_1.FailIcon size={8} color={AppColors_1.AppColors.errorColor}/>) : (<react_native_svg_1.default width={6} height={6} viewBox="0 0 10 10" fill="none">
|
|
3218
|
+
<react_native_svg_1.Circle cx="5" cy="5" r="5" fill={(0, helpers_1.getStatusColor)(selected.status)}/>
|
|
3219
|
+
</react_native_svg_1.default>)}
|
|
3220
|
+
<react_native_1.Text style={[
|
|
3221
|
+
styles_1.default.chipText,
|
|
3222
|
+
{
|
|
3223
|
+
color: selected.status === 0
|
|
3224
|
+
? AppColors_1.AppColors.errorColor
|
|
3225
|
+
: (0, helpers_1.getStatusColor)(selected.status),
|
|
3226
|
+
},
|
|
3227
|
+
]}>
|
|
3228
|
+
{selected.status === 0
|
|
3229
|
+
? 'Failed'
|
|
3230
|
+
: String(selected.status)}
|
|
2202
3231
|
</react_native_1.Text>
|
|
2203
|
-
</react_native_1.View>
|
|
2204
|
-
</react_1.default.Fragment>);
|
|
2205
|
-
})}
|
|
2206
|
-
</react_native_1.ScrollView>
|
|
2207
|
-
</react_native_1.View>);
|
|
2208
|
-
})()}
|
|
3232
|
+
</react_native_1.View>)}
|
|
2209
3233
|
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
styles_1.default.methodBadgeText,
|
|
2226
|
-
{
|
|
2227
|
-
color: constants_1.METHOD_COLORS[selected.method] ??
|
|
2228
|
-
constants_1.METHOD_COLORS.ALL,
|
|
2229
|
-
},
|
|
2230
|
-
]}>
|
|
2231
|
-
{selected.method}
|
|
2232
|
-
</react_native_1.Text>
|
|
2233
|
-
</react_native_1.View>
|
|
3234
|
+
{selected.duration != null && (<react_native_1.View style={[styles_1.default.chip, { backgroundColor: 'rgba(104,75,155,0.08)', borderColor: 'rgba(104,75,155,0.18)' }]}>
|
|
3235
|
+
<react_native_1.Text style={[styles_1.default.chipText, { color: AppColors_1.AppColors.purple }]}>
|
|
3236
|
+
{selected.duration}ms
|
|
3237
|
+
</react_native_1.Text>
|
|
3238
|
+
</react_native_1.View>)}
|
|
3239
|
+
</react_native_1.View>
|
|
3240
|
+
<react_native_1.View style={styles_1.default.detailInfoRight}>
|
|
3241
|
+
<TouchableScale_1.default style={styles_1.default.iconSquareBtn} onPress={() => react_native_1.Linking.openURL(detailDisplayUrl)} hitSlop={12}>
|
|
3242
|
+
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
3243
|
+
</TouchableScale_1.default>
|
|
3244
|
+
<CopyButton_1.default value={(0, helpers_1.getFetchCommand)(selected)} label="fetch()" iconType="fetch"/>
|
|
3245
|
+
<CopyButton_1.default value={(0, helpers_1.getCurlCommand)(selected)} label="cURL" iconType="terminal"/>
|
|
3246
|
+
<CopyButton_1.default value={detailDisplayUrl} label="URL"/>
|
|
3247
|
+
</react_native_1.View>
|
|
3248
|
+
</react_native_1.View>
|
|
2234
3249
|
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
? AppColors_1.AppColors.errorColor
|
|
2254
|
-
: (0, helpers_1.getStatusColor)(selected.status),
|
|
2255
|
-
},
|
|
2256
|
-
]}>
|
|
2257
|
-
{selected.status === 0
|
|
2258
|
-
? 'Failed'
|
|
2259
|
-
: String(selected.status)}
|
|
3250
|
+
<react_native_1.Pressable style={{
|
|
3251
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
3252
|
+
borderRadius: 10,
|
|
3253
|
+
borderWidth: 1,
|
|
3254
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
3255
|
+
padding: 10,
|
|
3256
|
+
marginTop: 6,
|
|
3257
|
+
}} onPress={() => react_native_1.Linking.openURL(detailDisplayUrl)}>
|
|
3258
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', marginBottom: 2 }}>
|
|
3259
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interMedium, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak, flex: 1 }} numberOfLines={1}>
|
|
3260
|
+
{hostStr || 'API Endpoint'}
|
|
3261
|
+
</react_native_1.Text>
|
|
3262
|
+
{queryStr ? (<react_native_1.View style={{ backgroundColor: 'rgba(104,75,155,0.08)', paddingHorizontal: 5, paddingVertical: 1, borderRadius: 4 }}>
|
|
3263
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 8.5, color: AppColors_1.AppColors.purple }}>Query Params</react_native_1.Text>
|
|
3264
|
+
</react_native_1.View>) : null}
|
|
3265
|
+
</react_native_1.View>
|
|
3266
|
+
<react_native_1.Text selectable={true} style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 12, color: AppColors_1.AppColors.primaryBlack, marginTop: 2 }} numberOfLines={2}>
|
|
3267
|
+
{pathStr}
|
|
2260
3268
|
</react_native_1.Text>
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
<CopyButton_1.default value={(0, helpers_1.getFetchCommand)(selected)} label="fetch()" iconType="fetch"/>
|
|
2268
|
-
<CopyButton_1.default value={(0, helpers_1.getCurlCommand)(selected)} label="cURL" iconType="terminal"/>
|
|
2269
|
-
<CopyButton_1.default value={detailDisplayUrl} label="URL"/>
|
|
2270
|
-
</react_native_1.View>
|
|
2271
|
-
</react_native_1.View>
|
|
2272
|
-
|
|
2273
|
-
<react_native_1.Pressable style={styles_1.default.detailUrlContainer} onPress={() => react_native_1.Linking.openURL(detailDisplayUrl)}>
|
|
2274
|
-
<react_native_1.Text selectable={true} style={styles_1.default.detailUrl}>
|
|
2275
|
-
{detailDisplayUrl}
|
|
2276
|
-
</react_native_1.Text>
|
|
2277
|
-
</react_native_1.Pressable>
|
|
3269
|
+
{queryStr ? (<react_native_1.Text selectable={true} style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak, marginTop: 4 }} numberOfLines={1}>
|
|
3270
|
+
{queryStr}
|
|
3271
|
+
</react_native_1.Text>) : null}
|
|
3272
|
+
</react_native_1.Pressable>
|
|
3273
|
+
</>);
|
|
3274
|
+
})()}
|
|
2278
3275
|
</react_native_1.View>
|
|
2279
3276
|
</react_native_1.View>
|
|
2280
3277
|
|
|
@@ -2303,16 +3300,30 @@ const NetworkInspector = () => {
|
|
|
2303
3300
|
return 'Request';
|
|
2304
3301
|
return 'Response';
|
|
2305
3302
|
};
|
|
3303
|
+
const getIcon = () => {
|
|
3304
|
+
const iconColor = isActive ? '#FFFFFF' : AppColors_1.AppColors.grayText;
|
|
3305
|
+
if (tab === 'metadata')
|
|
3306
|
+
return <NetworkIcons_1.StatusIcon color={iconColor}/>;
|
|
3307
|
+
if (tab === 'headers')
|
|
3308
|
+
return <NetworkIcons_1.HeadersIcon color={iconColor}/>;
|
|
3309
|
+
if (tab === 'request')
|
|
3310
|
+
return <NetworkIcons_1.RequestIcon color={iconColor}/>;
|
|
3311
|
+
return <NetworkIcons_1.ResponseIcon color={iconColor}/>;
|
|
3312
|
+
};
|
|
2306
3313
|
return (<react_native_1.TouchableOpacity key={tab} onPress={() => setApiDetailActiveTab(tab)} style={{
|
|
2307
3314
|
flex: 1,
|
|
2308
3315
|
paddingVertical: 6,
|
|
3316
|
+
flexDirection: 'row',
|
|
2309
3317
|
alignItems: 'center',
|
|
3318
|
+
justifyContent: 'center',
|
|
2310
3319
|
borderRadius: 8,
|
|
2311
3320
|
backgroundColor: isActive ? AppColors_1.AppColors.purple : 'transparent',
|
|
3321
|
+
gap: 4,
|
|
2312
3322
|
}}>
|
|
3323
|
+
{getIcon()}
|
|
2313
3324
|
<react_native_1.Text style={{
|
|
2314
3325
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2315
|
-
fontSize:
|
|
3326
|
+
fontSize: 10,
|
|
2316
3327
|
color: isActive ? '#FFFFFF' : AppColors_1.AppColors.grayText,
|
|
2317
3328
|
}}>
|
|
2318
3329
|
{getLabel()}
|
|
@@ -2324,7 +3335,8 @@ const NetworkInspector = () => {
|
|
|
2324
3335
|
{/* Scrollable Tab Content */}
|
|
2325
3336
|
<react_native_1.ScrollView style={styles_1.default.detailScroll} contentContainerStyle={{ paddingHorizontal: 6, paddingBottom: 24 }} showsVerticalScrollIndicator={true}>
|
|
2326
3337
|
{apiDetailActiveTab === 'metadata' && (<>
|
|
2327
|
-
<MetaAccordion_1.default status={selected.status} statusColor={(0, helpers_1.getStatusColor)(selected.status)} duration={selected.duration} size={(0, helpers_1.getSize)(selected.response)} triggeredAt={(0, helpers_1.formatDateTime)(selected.startTime)}
|
|
3338
|
+
<MetaAccordion_1.default status={selected.status} statusColor={(0, helpers_1.getStatusColor)(selected.status)} duration={selected.duration} size={(0, helpers_1.getSize)(selected.response)} triggeredAt={(0, helpers_1.formatDateTime)(selected.startTime)} method={selected.method} contentType={selected.responseHeaders?.['content-type'] ||
|
|
3339
|
+
selected.responseHeaders?.['Content-Type']} url={selected.url}/>
|
|
2328
3340
|
|
|
2329
3341
|
{(() => {
|
|
2330
3342
|
const routeInfo = logRouteMapRef.current.get(selected.id);
|
|
@@ -2408,6 +3420,10 @@ const NetworkInspector = () => {
|
|
|
2408
3420
|
Loading logs...
|
|
2409
3421
|
</react_native_1.Text>
|
|
2410
3422
|
</react_native_1.View>)}
|
|
3423
|
+
|
|
3424
|
+
{settingsPage !== null && (<react_native_1.View style={[react_native_1.StyleSheet.absoluteFill, { backgroundColor: AppColors_1.AppColors.grayBackground, zIndex: 99999 }]}>
|
|
3425
|
+
{renderSettings()}
|
|
3426
|
+
</react_native_1.View>)}
|
|
2411
3427
|
</react_native_1.View>
|
|
2412
3428
|
</react_native_1.View>
|
|
2413
3429
|
</ErrorBoundary_1.default>)}
|