react-native-inapp-inspector 1.0.9 → 1.0.11
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 +17 -0
- package/dist/commonjs/components/ReduxTreeView.js +630 -0
- package/dist/commonjs/components/TouchableScale.js +15 -1
- package/dist/commonjs/components/TreeNode.js +3 -3
- package/dist/commonjs/customHooks/reduxLogger.d.ts +12 -0
- package/dist/commonjs/customHooks/reduxLogger.js +71 -2
- package/dist/commonjs/index.js +1568 -505
- 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 +17 -0
- package/dist/esm/components/ReduxTreeView.js +592 -0
- package/dist/esm/components/TouchableScale.js +16 -2
- package/dist/esm/components/TreeNode.js +3 -3
- package/dist/esm/customHooks/reduxLogger.d.ts +12 -0
- package/dist/esm/customHooks/reduxLogger.js +64 -1
- package/dist/esm/index.js +1571 -508
- 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,22 @@ 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 [
|
|
161
|
+
const [reduxActiveSubTab, setReduxActiveSubTab] = (0, react_1.useState)('timeline');
|
|
162
|
+
const [apiDetailActiveTab, setApiDetailActiveTab] = (0, react_1.useState)('response');
|
|
163
|
+
(0, react_1.useEffect)(() => {
|
|
164
|
+
if (enabled && visible) {
|
|
165
|
+
react_native_1.LogBox.ignoreAllLogs(true);
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
react_native_1.LogBox.ignoreAllLogs(false);
|
|
169
|
+
}
|
|
170
|
+
return () => {
|
|
171
|
+
react_native_1.LogBox.ignoreAllLogs(false);
|
|
172
|
+
};
|
|
173
|
+
}, [enabled, visible]);
|
|
102
174
|
(0, react_1.useEffect)(() => {
|
|
103
175
|
if (selected) {
|
|
104
|
-
setApiDetailActiveTab('
|
|
176
|
+
setApiDetailActiveTab('response');
|
|
105
177
|
setDetailSearch('');
|
|
106
178
|
}
|
|
107
179
|
}, [selected]);
|
|
@@ -122,9 +194,43 @@ const NetworkInspector = () => {
|
|
|
122
194
|
const [analyticsEvents, setAnalyticsEvents] = (0, react_1.useState)([]);
|
|
123
195
|
// ─── Logs state ────────────────────────────────────────────────────────────
|
|
124
196
|
const [consoleLogs, setConsoleLogs] = (0, react_1.useState)([]);
|
|
197
|
+
const [lastReadLogsCount, setLastReadLogsCount] = (0, react_1.useState)(0);
|
|
198
|
+
const [lastReadApisCount, setLastReadApisCount] = (0, react_1.useState)(0);
|
|
199
|
+
(0, react_1.useEffect)(() => {
|
|
200
|
+
if (visible) {
|
|
201
|
+
if (activeTab === 'apis') {
|
|
202
|
+
setLastReadApisCount(logs.length);
|
|
203
|
+
}
|
|
204
|
+
if (activeTab === 'logs') {
|
|
205
|
+
setLastReadLogsCount(consoleLogs.length);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}, [visible]);
|
|
209
|
+
(0, react_1.useEffect)(() => {
|
|
210
|
+
if (activeTab === 'apis') {
|
|
211
|
+
setLastReadApisCount(logs.length);
|
|
212
|
+
}
|
|
213
|
+
}, [activeTab, logs.length]);
|
|
214
|
+
(0, react_1.useEffect)(() => {
|
|
215
|
+
if (activeTab === 'logs') {
|
|
216
|
+
setLastReadLogsCount(consoleLogs.length);
|
|
217
|
+
}
|
|
218
|
+
}, [activeTab, consoleLogs.length]);
|
|
219
|
+
const [maxConsoleLogs, setMaxConsoleLogs] = (0, react_1.useState)(200);
|
|
220
|
+
const [showConsoleLevels, setShowConsoleLevels] = (0, react_1.useState)({
|
|
221
|
+
info: true,
|
|
222
|
+
warn: true,
|
|
223
|
+
error: true,
|
|
224
|
+
});
|
|
125
225
|
const visibleConsoleLogs = (0, react_1.useMemo)(() => {
|
|
126
|
-
|
|
226
|
+
const filtered = consoleLogs.filter(log => {
|
|
127
227
|
const type = log.type;
|
|
228
|
+
if (type === 'info' && !showConsoleLevels.info)
|
|
229
|
+
return false;
|
|
230
|
+
if (type === 'warn' && !showConsoleLevels.warn)
|
|
231
|
+
return false;
|
|
232
|
+
if (type === 'error' && !showConsoleLevels.error)
|
|
233
|
+
return false;
|
|
128
234
|
const message = log.message || '';
|
|
129
235
|
const allPrefixes = [
|
|
130
236
|
...((logFilters_1.IGNORED_LOG_PREFIXES && logFilters_1.IGNORED_LOG_PREFIXES.info) || []),
|
|
@@ -138,13 +244,79 @@ const NetworkInspector = () => {
|
|
|
138
244
|
message.toLowerCase().trim().includes(prefix.toLowerCase().trim()));
|
|
139
245
|
return !isIgnored;
|
|
140
246
|
});
|
|
141
|
-
|
|
247
|
+
return filtered.slice(0, maxConsoleLogs);
|
|
248
|
+
}, [consoleLogs, showConsoleLevels, maxConsoleLogs]);
|
|
142
249
|
const [logSearch, setLogSearch] = (0, react_1.useState)('');
|
|
143
250
|
const [logFilters, setLogFilters] = (0, react_1.useState)(new Set(['user-log']));
|
|
144
251
|
// ─── WebView state ─────────────────────────────────────────────────────────
|
|
145
252
|
const [webViewLogs, setWebViewLogs] = (0, react_1.useState)([]);
|
|
146
253
|
const [webViewNavHistory, setWebViewNavHistory] = (0, react_1.useState)([]);
|
|
147
254
|
const [webViewSubTab, setWebViewSubTab] = (0, react_1.useState)('html');
|
|
255
|
+
const [inspectedElement, setInspectedElement] = (0, react_1.useState)(null);
|
|
256
|
+
// ─── Settings state ──────────────────────────────────────────────────────────
|
|
257
|
+
const [settingsPage, setSettingsPage] = (0, react_1.useState)(null);
|
|
258
|
+
const [tabVisibility, setTabVisibility] = (0, react_1.useState)({
|
|
259
|
+
insights: true,
|
|
260
|
+
apis: true,
|
|
261
|
+
logs: true,
|
|
262
|
+
analytics: true,
|
|
263
|
+
webview: true,
|
|
264
|
+
redux: true,
|
|
265
|
+
});
|
|
266
|
+
const [maxNetworkLogs, setMaxNetworkLogs] = (0, react_1.useState)(100);
|
|
267
|
+
const [webViewCaptureCssJs, setWebViewCaptureCssJs] = (0, react_1.useState)(true);
|
|
268
|
+
const [reduxAutoRefresh, setReduxAutoRefreshState] = (0, react_1.useState)(true);
|
|
269
|
+
const [reduxExpandDepth, setReduxExpandDepth] = (0, react_1.useState)(1);
|
|
270
|
+
const [slowRequestThreshold, setSlowRequestThreshold] = (0, react_1.useState)(1000);
|
|
271
|
+
const [insightsShowConsoleAlerts, setInsightsShowConsoleAlerts] = (0, react_1.useState)(true);
|
|
272
|
+
(0, react_1.useEffect)(() => {
|
|
273
|
+
(0, reduxLogger_1.setReduxAutoRefresh)(reduxAutoRefresh);
|
|
274
|
+
}, [reduxAutoRefresh]);
|
|
275
|
+
const toggleTabVisibility = (key) => {
|
|
276
|
+
if (key === 'apis')
|
|
277
|
+
return;
|
|
278
|
+
setTabVisibility(prev => {
|
|
279
|
+
const nextVal = !prev[key];
|
|
280
|
+
const newVisibility = { ...prev, [key]: nextVal };
|
|
281
|
+
if (!nextVal && activeTab === key) {
|
|
282
|
+
setActiveTab('apis');
|
|
283
|
+
}
|
|
284
|
+
return newVisibility;
|
|
285
|
+
});
|
|
286
|
+
};
|
|
287
|
+
const navigateFromDashboard = (key) => {
|
|
288
|
+
setTabVisibility(prev => ({ ...prev, [key]: true }));
|
|
289
|
+
setActiveTab(key);
|
|
290
|
+
};
|
|
291
|
+
const getSearchTermForTab = () => {
|
|
292
|
+
if (!inspectedElement)
|
|
293
|
+
return '';
|
|
294
|
+
const { tagName, id, className, searchStr } = inspectedElement;
|
|
295
|
+
if (htmlSubTab === 'html') {
|
|
296
|
+
return searchStr;
|
|
297
|
+
}
|
|
298
|
+
if (htmlSubTab === 'css') {
|
|
299
|
+
if (className) {
|
|
300
|
+
const firstClass = className.trim().split(/\s+/)[0];
|
|
301
|
+
if (firstClass)
|
|
302
|
+
return `.${firstClass}`;
|
|
303
|
+
}
|
|
304
|
+
if (id)
|
|
305
|
+
return `#${id}`;
|
|
306
|
+
return tagName;
|
|
307
|
+
}
|
|
308
|
+
if (htmlSubTab === 'javascript') {
|
|
309
|
+
if (id)
|
|
310
|
+
return id;
|
|
311
|
+
if (className) {
|
|
312
|
+
const firstClass = className.trim().split(/\s+/)[0];
|
|
313
|
+
if (firstClass)
|
|
314
|
+
return firstClass;
|
|
315
|
+
}
|
|
316
|
+
return tagName;
|
|
317
|
+
}
|
|
318
|
+
return '';
|
|
319
|
+
};
|
|
148
320
|
const [webViewSearch, setWebViewSearch] = (0, react_1.useState)('');
|
|
149
321
|
const [webViewHtml, setWebViewHtml] = (0, react_1.useState)('');
|
|
150
322
|
const [webViewCss, setWebViewCss] = (0, react_1.useState)('');
|
|
@@ -183,6 +355,8 @@ const NetworkInspector = () => {
|
|
|
183
355
|
const [newLogIds, setNewLogIds] = (0, react_1.useState)(new Set());
|
|
184
356
|
const pulseAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
185
357
|
const badgeAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
358
|
+
const activePulseAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0.4)).current;
|
|
359
|
+
const unreadPulseAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
186
360
|
(0, react_1.useEffect)(() => {
|
|
187
361
|
const loop = react_native_1.Animated.loop(react_native_1.Animated.sequence([
|
|
188
362
|
react_native_1.Animated.timing(pulseAnim, {
|
|
@@ -199,6 +373,38 @@ const NetworkInspector = () => {
|
|
|
199
373
|
loop.start();
|
|
200
374
|
return () => loop.stop();
|
|
201
375
|
}, [pulseAnim]);
|
|
376
|
+
(0, react_1.useEffect)(() => {
|
|
377
|
+
const loop = react_native_1.Animated.loop(react_native_1.Animated.sequence([
|
|
378
|
+
react_native_1.Animated.timing(activePulseAnim, {
|
|
379
|
+
toValue: 1,
|
|
380
|
+
duration: 1200,
|
|
381
|
+
useNativeDriver: true,
|
|
382
|
+
}),
|
|
383
|
+
react_native_1.Animated.timing(activePulseAnim, {
|
|
384
|
+
toValue: 0.4,
|
|
385
|
+
duration: 1200,
|
|
386
|
+
useNativeDriver: true,
|
|
387
|
+
}),
|
|
388
|
+
]));
|
|
389
|
+
loop.start();
|
|
390
|
+
return () => loop.stop();
|
|
391
|
+
}, [activePulseAnim]);
|
|
392
|
+
(0, react_1.useEffect)(() => {
|
|
393
|
+
const loop = react_native_1.Animated.loop(react_native_1.Animated.sequence([
|
|
394
|
+
react_native_1.Animated.timing(unreadPulseAnim, {
|
|
395
|
+
toValue: 1.3,
|
|
396
|
+
duration: 800,
|
|
397
|
+
useNativeDriver: true,
|
|
398
|
+
}),
|
|
399
|
+
react_native_1.Animated.timing(unreadPulseAnim, {
|
|
400
|
+
toValue: 0.8,
|
|
401
|
+
duration: 800,
|
|
402
|
+
useNativeDriver: true,
|
|
403
|
+
}),
|
|
404
|
+
]));
|
|
405
|
+
loop.start();
|
|
406
|
+
return () => loop.stop();
|
|
407
|
+
}, [unreadPulseAnim]);
|
|
202
408
|
(0, react_1.useEffect)(() => {
|
|
203
409
|
if ((logs.length > 0 || analyticsEvents.length > 0) && newLogIds.size > 0) {
|
|
204
410
|
badgeAnim.setValue(0.8);
|
|
@@ -357,8 +563,8 @@ const NetworkInspector = () => {
|
|
|
357
563
|
if (sortOrder === 'oldest') {
|
|
358
564
|
result = [...result].reverse();
|
|
359
565
|
}
|
|
360
|
-
return result;
|
|
361
|
-
}, [logs, search, statusFilters, methodFilters, sortOrder]);
|
|
566
|
+
return result.slice(0, maxNetworkLogs);
|
|
567
|
+
}, [logs, search, statusFilters, methodFilters, sortOrder, maxNetworkLogs]);
|
|
362
568
|
const availableMethods = (0, react_1.useMemo)(() => {
|
|
363
569
|
const methods = new Set();
|
|
364
570
|
logs.forEach(log => {
|
|
@@ -755,6 +961,574 @@ const NetworkInspector = () => {
|
|
|
755
961
|
toggleSectionFilter,
|
|
756
962
|
toggleSectionCollapse,
|
|
757
963
|
]);
|
|
964
|
+
const renderSettings = () => {
|
|
965
|
+
if (settingsPage === 'main') {
|
|
966
|
+
const settingsTabs = [
|
|
967
|
+
{ key: 'insights', label: 'Insights', icon: 'insights' },
|
|
968
|
+
{ key: 'apis', label: 'APIs', icon: 'apis' },
|
|
969
|
+
{ key: 'logs', label: 'Logs', icon: 'logs' },
|
|
970
|
+
{ key: 'analytics', label: 'Analytics', icon: 'analytics' },
|
|
971
|
+
{ key: 'webview', label: 'WebView', icon: 'webview' },
|
|
972
|
+
{ key: 'redux', label: 'Redux', icon: 'redux' },
|
|
973
|
+
];
|
|
974
|
+
return (<react_native_1.View style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }}>
|
|
975
|
+
{/* Settings Header with back button */}
|
|
976
|
+
<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}>
|
|
977
|
+
<react_native_1.View style={[styles_1.default.header, { paddingHorizontal: 16, gap: 12 }]}>
|
|
978
|
+
<TouchableScale_1.default onPress={() => {
|
|
979
|
+
setSettingsPage(null);
|
|
980
|
+
setActiveTab('apis');
|
|
981
|
+
}} hitSlop={12} style={{
|
|
982
|
+
padding: 8,
|
|
983
|
+
borderRadius: 10,
|
|
984
|
+
backgroundColor: 'rgba(255, 255, 255, 0.15)',
|
|
985
|
+
borderWidth: 1,
|
|
986
|
+
borderColor: 'rgba(255, 255, 255, 0.08)',
|
|
987
|
+
}}>
|
|
988
|
+
<NetworkIcons_1.WhiteBackNavigation color="#FFFFFF" size={16}/>
|
|
989
|
+
</TouchableScale_1.default>
|
|
990
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
991
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 17, color: '#FFFFFF' }}>Settings</react_native_1.Text>
|
|
992
|
+
<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>
|
|
993
|
+
</react_native_1.View>
|
|
994
|
+
<react_native_1.View style={{
|
|
995
|
+
backgroundColor: 'rgba(255, 255, 255, 0.15)',
|
|
996
|
+
paddingHorizontal: 8,
|
|
997
|
+
paddingVertical: 4,
|
|
998
|
+
borderRadius: 8,
|
|
999
|
+
borderWidth: 1,
|
|
1000
|
+
borderColor: 'rgba(255, 255, 255, 0.1)'
|
|
1001
|
+
}}>
|
|
1002
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 10.5, color: '#FFFFFF' }}>v1.0.11</react_native_1.Text>
|
|
1003
|
+
</react_native_1.View>
|
|
1004
|
+
</react_native_1.View>
|
|
1005
|
+
</react_native_linear_gradient_1.default>
|
|
1006
|
+
|
|
1007
|
+
<react_native_1.ScrollView style={{ flex: 1 }} contentContainerStyle={{ padding: 16, gap: 12 }}>
|
|
1008
|
+
|
|
1009
|
+
{/* Tab list */}
|
|
1010
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, overflow: 'hidden' }}>
|
|
1011
|
+
{/* Table Header */}
|
|
1012
|
+
<react_native_1.View style={{
|
|
1013
|
+
flexDirection: 'row',
|
|
1014
|
+
alignItems: 'center',
|
|
1015
|
+
paddingVertical: 8,
|
|
1016
|
+
paddingHorizontal: 14,
|
|
1017
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
1018
|
+
borderBottomWidth: 1,
|
|
1019
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1020
|
+
gap: 12,
|
|
1021
|
+
}}>
|
|
1022
|
+
<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>
|
|
1023
|
+
<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>
|
|
1024
|
+
</react_native_1.View>
|
|
1025
|
+
|
|
1026
|
+
{settingsTabs.map((tab, idx) => {
|
|
1027
|
+
const isVisible = tab.key === 'apis' || tabVisibility[tab.key];
|
|
1028
|
+
const isLast = idx === settingsTabs.length - 1;
|
|
1029
|
+
const isLocked = tab.key === 'apis';
|
|
1030
|
+
return (<react_native_1.View key={tab.key} style={{
|
|
1031
|
+
flexDirection: 'row',
|
|
1032
|
+
alignItems: 'center',
|
|
1033
|
+
paddingVertical: 10,
|
|
1034
|
+
paddingHorizontal: 14,
|
|
1035
|
+
borderBottomWidth: isLast ? 0 : 1,
|
|
1036
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1037
|
+
gap: 12,
|
|
1038
|
+
}}>
|
|
1039
|
+
{/* Icon + Label — fills remaining space */}
|
|
1040
|
+
<react_native_1.View style={{ flex: 1, flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1041
|
+
{/* Small icon tile */}
|
|
1042
|
+
<react_native_1.View style={{
|
|
1043
|
+
width: 20, height: 20, borderRadius: 6,
|
|
1044
|
+
backgroundColor: isLocked ? AppColors_1.AppColors.grayBorderSecondary : AppColors_1.AppColors.purpleShade50,
|
|
1045
|
+
borderWidth: 1,
|
|
1046
|
+
borderColor: isLocked ? AppColors_1.AppColors.dividerColor : 'rgba(104,75,155,0.2)',
|
|
1047
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1048
|
+
}}>
|
|
1049
|
+
{tab.icon === 'insights' && <NetworkIcons_1.InsightsIcon color={isLocked ? AppColors_1.AppColors.grayTextWeak : AppColors_1.AppColors.purple} size={11}/>}
|
|
1050
|
+
{tab.icon === 'apis' && <NetworkIcons_1.SignalIcon color={isLocked ? AppColors_1.AppColors.grayTextWeak : AppColors_1.AppColors.purple} size={11}/>}
|
|
1051
|
+
{tab.icon === 'logs' && <NetworkIcons_1.TerminalIcon color={isLocked ? AppColors_1.AppColors.grayTextWeak : AppColors_1.AppColors.purple} size={11}/>}
|
|
1052
|
+
{tab.icon === 'analytics' && <NetworkIcons_1.AnalyticsIcon color={isLocked ? AppColors_1.AppColors.grayTextWeak : AppColors_1.AppColors.purple} size={11}/>}
|
|
1053
|
+
{tab.icon === 'webview' && <NetworkIcons_1.GlobeIcon color={isLocked ? AppColors_1.AppColors.grayTextWeak : AppColors_1.AppColors.purple} size={11}/>}
|
|
1054
|
+
{tab.icon === 'redux' && <NetworkIcons_1.TerminalIcon color={isLocked ? AppColors_1.AppColors.grayTextWeak : AppColors_1.AppColors.purple} size={11}/>}
|
|
1055
|
+
</react_native_1.View>
|
|
1056
|
+
{/* Label + Required badge */}
|
|
1057
|
+
<react_native_1.Text style={{
|
|
1058
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1059
|
+
fontSize: 13,
|
|
1060
|
+
color: isLocked ? AppColors_1.AppColors.grayText : AppColors_1.AppColors.primaryBlack,
|
|
1061
|
+
}}>
|
|
1062
|
+
{tab.label}
|
|
1063
|
+
</react_native_1.Text>
|
|
1064
|
+
{isLocked && (<react_native_1.View style={{
|
|
1065
|
+
flexDirection: 'row',
|
|
1066
|
+
alignItems: 'center',
|
|
1067
|
+
backgroundColor: 'rgba(104,75,155,0.08)',
|
|
1068
|
+
borderRadius: 20,
|
|
1069
|
+
paddingHorizontal: 6,
|
|
1070
|
+
paddingVertical: 2,
|
|
1071
|
+
borderWidth: 1,
|
|
1072
|
+
borderColor: 'rgba(104,75,155,0.18)',
|
|
1073
|
+
gap: 3,
|
|
1074
|
+
}}>
|
|
1075
|
+
<react_native_1.View style={{ width: 4, height: 4, borderRadius: 2, backgroundColor: AppColors_1.AppColors.purple, opacity: 0.7 }}/>
|
|
1076
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 8.5, color: AppColors_1.AppColors.purple, letterSpacing: 0.4 }}>
|
|
1077
|
+
DEFAULT
|
|
1078
|
+
</react_native_1.Text>
|
|
1079
|
+
</react_native_1.View>)}
|
|
1080
|
+
|
|
1081
|
+
{/* Settings gear icon next to label */}
|
|
1082
|
+
<TouchableScale_1.default onPress={() => setSettingsPage(tab.key)} hitSlop={8} style={{
|
|
1083
|
+
marginLeft: 4,
|
|
1084
|
+
padding: 4,
|
|
1085
|
+
borderRadius: 6,
|
|
1086
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1087
|
+
borderWidth: 1,
|
|
1088
|
+
borderColor: 'rgba(104,75,155,0.15)',
|
|
1089
|
+
alignItems: 'center',
|
|
1090
|
+
justifyContent: 'center',
|
|
1091
|
+
}}>
|
|
1092
|
+
<NetworkIcons_1.SettingsIcon color={AppColors_1.AppColors.purple} size={10}/>
|
|
1093
|
+
</TouchableScale_1.default>
|
|
1094
|
+
</react_native_1.View>
|
|
1095
|
+
|
|
1096
|
+
{/* Visibility Switch in VISIBILITY column */}
|
|
1097
|
+
<react_native_1.View style={{ width: 90, alignItems: 'flex-end', justifyContent: 'center' }}>
|
|
1098
|
+
<TouchableScale_1.default disabled={isLocked} onPress={() => toggleTabVisibility(tab.key)} style={{
|
|
1099
|
+
width: 38,
|
|
1100
|
+
height: 22,
|
|
1101
|
+
borderRadius: 11,
|
|
1102
|
+
backgroundColor: isVisible ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayBorderSecondary,
|
|
1103
|
+
padding: 2,
|
|
1104
|
+
justifyContent: 'center',
|
|
1105
|
+
alignItems: isVisible ? 'flex-end' : 'flex-start',
|
|
1106
|
+
}}>
|
|
1107
|
+
<react_native_1.View style={{
|
|
1108
|
+
width: 18,
|
|
1109
|
+
height: 18,
|
|
1110
|
+
borderRadius: 9,
|
|
1111
|
+
backgroundColor: '#FFFFFF',
|
|
1112
|
+
shadowColor: '#000',
|
|
1113
|
+
shadowOpacity: 0.15,
|
|
1114
|
+
shadowRadius: 1.5,
|
|
1115
|
+
shadowOffset: { width: 0, height: 1 },
|
|
1116
|
+
}}/>
|
|
1117
|
+
</TouchableScale_1.default>
|
|
1118
|
+
</react_native_1.View>
|
|
1119
|
+
</react_native_1.View>);
|
|
1120
|
+
})}
|
|
1121
|
+
</react_native_1.View>
|
|
1122
|
+
|
|
1123
|
+
{/* Preferences Section */}
|
|
1124
|
+
<react_native_1.View style={{ marginTop: 8 }}>
|
|
1125
|
+
<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>
|
|
1126
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, overflow: 'hidden' }}>
|
|
1127
|
+
<react_native_1.View style={{
|
|
1128
|
+
flexDirection: 'row',
|
|
1129
|
+
alignItems: 'center',
|
|
1130
|
+
paddingVertical: 12,
|
|
1131
|
+
paddingHorizontal: 14,
|
|
1132
|
+
gap: 12,
|
|
1133
|
+
}}>
|
|
1134
|
+
{/* Icon + Label */}
|
|
1135
|
+
<react_native_1.View style={{ flex: 1, flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1136
|
+
<react_native_1.View style={{
|
|
1137
|
+
width: 20, height: 20, borderRadius: 6,
|
|
1138
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1139
|
+
borderWidth: 1,
|
|
1140
|
+
borderColor: 'rgba(104,75,155,0.2)',
|
|
1141
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1142
|
+
}}>
|
|
1143
|
+
{isDark ? (<NetworkIcons_1.SunIcon color={AppColors_1.AppColors.purple} size={11}/>) : (<NetworkIcons_1.MoonIcon color={AppColors_1.AppColors.purple} size={11}/>)}
|
|
1144
|
+
</react_native_1.View>
|
|
1145
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
1146
|
+
<react_native_1.Text style={{
|
|
1147
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1148
|
+
fontSize: 13,
|
|
1149
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
1150
|
+
}}>
|
|
1151
|
+
Dark Theme
|
|
1152
|
+
</react_native_1.Text>
|
|
1153
|
+
</react_native_1.View>
|
|
1154
|
+
</react_native_1.View>
|
|
1155
|
+
|
|
1156
|
+
{/* Toggle Switch */}
|
|
1157
|
+
<TouchableScale_1.default onPress={() => {
|
|
1158
|
+
const newTheme = !isDark;
|
|
1159
|
+
setIsDark(newTheme);
|
|
1160
|
+
(0, styles_1.toggleGlobalTheme)(newTheme);
|
|
1161
|
+
}} style={{
|
|
1162
|
+
width: 38,
|
|
1163
|
+
height: 22,
|
|
1164
|
+
borderRadius: 11,
|
|
1165
|
+
backgroundColor: isDark ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayBorderSecondary,
|
|
1166
|
+
padding: 2,
|
|
1167
|
+
justifyContent: 'center',
|
|
1168
|
+
alignItems: isDark ? 'flex-end' : 'flex-start',
|
|
1169
|
+
}}>
|
|
1170
|
+
<react_native_1.View style={{
|
|
1171
|
+
width: 18,
|
|
1172
|
+
height: 18,
|
|
1173
|
+
borderRadius: 9,
|
|
1174
|
+
backgroundColor: '#FFFFFF',
|
|
1175
|
+
shadowColor: '#000',
|
|
1176
|
+
shadowOpacity: 0.15,
|
|
1177
|
+
shadowRadius: 1.5,
|
|
1178
|
+
shadowOffset: { width: 0, height: 1 },
|
|
1179
|
+
}}/>
|
|
1180
|
+
</TouchableScale_1.default>
|
|
1181
|
+
</react_native_1.View>
|
|
1182
|
+
</react_native_1.View>
|
|
1183
|
+
</react_native_1.View>
|
|
1184
|
+
</react_native_1.ScrollView>
|
|
1185
|
+
</react_native_1.View>);
|
|
1186
|
+
}
|
|
1187
|
+
const goBackToMain = () => setSettingsPage('main');
|
|
1188
|
+
const renderSubHeader = (title, icon, rightInfo) => (<react_native_1.View style={{
|
|
1189
|
+
flexDirection: 'row',
|
|
1190
|
+
alignItems: 'center',
|
|
1191
|
+
gap: 12,
|
|
1192
|
+
paddingBottom: 16,
|
|
1193
|
+
borderBottomWidth: 1,
|
|
1194
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1195
|
+
marginBottom: 16,
|
|
1196
|
+
}}>
|
|
1197
|
+
<TouchableScale_1.default onPress={goBackToMain} style={{
|
|
1198
|
+
width: 36,
|
|
1199
|
+
height: 36,
|
|
1200
|
+
borderRadius: 10,
|
|
1201
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1202
|
+
borderWidth: 1,
|
|
1203
|
+
borderColor: 'rgba(104,75,155,0.2)',
|
|
1204
|
+
alignItems: 'center',
|
|
1205
|
+
justifyContent: 'center',
|
|
1206
|
+
}}>
|
|
1207
|
+
<NetworkIcons_1.WhiteBackNavigation color={AppColors_1.AppColors.purple} size={16}/>
|
|
1208
|
+
</TouchableScale_1.default>
|
|
1209
|
+
{icon && (<react_native_1.View style={{
|
|
1210
|
+
width: 36, height: 36, borderRadius: 10,
|
|
1211
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1212
|
+
borderWidth: 1, borderColor: 'rgba(104,75,155,0.2)',
|
|
1213
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1214
|
+
}}>
|
|
1215
|
+
{icon}
|
|
1216
|
+
</react_native_1.View>)}
|
|
1217
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 18, color: AppColors_1.AppColors.primaryBlack, flex: 1 }}>
|
|
1218
|
+
{title}
|
|
1219
|
+
</react_native_1.Text>
|
|
1220
|
+
{rightInfo ? (<react_native_1.View style={{
|
|
1221
|
+
backgroundColor: 'rgba(104,75,155,0.08)',
|
|
1222
|
+
paddingHorizontal: 10,
|
|
1223
|
+
paddingVertical: 5,
|
|
1224
|
+
borderRadius: 8,
|
|
1225
|
+
borderWidth: 1,
|
|
1226
|
+
borderColor: 'rgba(104,75,155,0.15)',
|
|
1227
|
+
}}>
|
|
1228
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.purple }}>
|
|
1229
|
+
{rightInfo}
|
|
1230
|
+
</react_native_1.Text>
|
|
1231
|
+
</react_native_1.View>) : null}
|
|
1232
|
+
</react_native_1.View>);
|
|
1233
|
+
// Helper: settings row with icon + label + optional description
|
|
1234
|
+
const renderSettingRow = (opts) => (<react_native_1.View style={{
|
|
1235
|
+
paddingVertical: 12,
|
|
1236
|
+
borderBottomWidth: opts.isLast ? 0 : 1,
|
|
1237
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1238
|
+
}}>
|
|
1239
|
+
<TouchableScale_1.default disabled={!opts.onPress} onPress={opts.onPress} style={{
|
|
1240
|
+
flexDirection: 'row',
|
|
1241
|
+
alignItems: 'center',
|
|
1242
|
+
gap: 12,
|
|
1243
|
+
}}>
|
|
1244
|
+
<react_native_1.View style={{
|
|
1245
|
+
width: 36, height: 36, borderRadius: 10,
|
|
1246
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1247
|
+
borderWidth: 1, borderColor: 'rgba(104,75,155,0.18)',
|
|
1248
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1249
|
+
}}>
|
|
1250
|
+
{opts.icon}
|
|
1251
|
+
</react_native_1.View>
|
|
1252
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
1253
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 14, color: AppColors_1.AppColors.primaryBlack }}>
|
|
1254
|
+
{opts.label}
|
|
1255
|
+
</react_native_1.Text>
|
|
1256
|
+
{opts.description ? (<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 11, color: AppColors_1.AppColors.grayText, marginTop: 1 }}>
|
|
1257
|
+
{opts.description}
|
|
1258
|
+
</react_native_1.Text>) : null}
|
|
1259
|
+
</react_native_1.View>
|
|
1260
|
+
{opts.right || null}
|
|
1261
|
+
</TouchableScale_1.default>
|
|
1262
|
+
{opts.picker && (<react_native_1.View style={{
|
|
1263
|
+
flexDirection: 'row',
|
|
1264
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
1265
|
+
borderRadius: 8,
|
|
1266
|
+
padding: 2.5,
|
|
1267
|
+
marginTop: 10,
|
|
1268
|
+
borderWidth: 1,
|
|
1269
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1270
|
+
}}>
|
|
1271
|
+
{opts.picker.options.map(opt => {
|
|
1272
|
+
const isActive = opts.picker.selectedValue === opt;
|
|
1273
|
+
return (<TouchableScale_1.default key={String(opt)} onPress={() => opts.picker.onSelect(opt)} style={{
|
|
1274
|
+
flex: 1,
|
|
1275
|
+
paddingVertical: 6,
|
|
1276
|
+
alignItems: 'center',
|
|
1277
|
+
borderRadius: 6,
|
|
1278
|
+
backgroundColor: isActive ? AppColors_1.AppColors.purple : 'transparent',
|
|
1279
|
+
}}>
|
|
1280
|
+
<react_native_1.Text style={{
|
|
1281
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1282
|
+
fontSize: 11,
|
|
1283
|
+
color: isActive ? '#FFFFFF' : AppColors_1.AppColors.grayText,
|
|
1284
|
+
}}>
|
|
1285
|
+
{typeof opt === 'number' && opt >= 500 && settingsPage === 'insights' ? `${opt}ms` : opt}
|
|
1286
|
+
</react_native_1.Text>
|
|
1287
|
+
</TouchableScale_1.default>);
|
|
1288
|
+
})}
|
|
1289
|
+
</react_native_1.View>)}
|
|
1290
|
+
</react_native_1.View>);
|
|
1291
|
+
if (settingsPage === 'apis') {
|
|
1292
|
+
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1293
|
+
{renderSubHeader('APIs Settings', <NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={16}/>, `Total: ${logs.length}`)}
|
|
1294
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, padding: 16, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, gap: 4 }}>
|
|
1295
|
+
{renderSettingRow({
|
|
1296
|
+
icon: <NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1297
|
+
label: 'Max Request Logs',
|
|
1298
|
+
description: 'How many network requests to keep in memory',
|
|
1299
|
+
picker: {
|
|
1300
|
+
options: [50, 100, 200, 500],
|
|
1301
|
+
selectedValue: maxNetworkLogs,
|
|
1302
|
+
onSelect: setMaxNetworkLogs,
|
|
1303
|
+
},
|
|
1304
|
+
isLast: true,
|
|
1305
|
+
})}
|
|
1306
|
+
</react_native_1.View>
|
|
1307
|
+
|
|
1308
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, padding: 16, marginTop: 12 }}>
|
|
1309
|
+
{renderSettingRow({
|
|
1310
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1311
|
+
label: 'Clear Network Logs',
|
|
1312
|
+
description: `${logs.length} requests stored`,
|
|
1313
|
+
isLast: true,
|
|
1314
|
+
onPress: () => {
|
|
1315
|
+
(0, networkLogger_1.clearNetworkLogs)();
|
|
1316
|
+
setSelected(null);
|
|
1317
|
+
react_native_1.Alert.alert('Success', 'Network logs cleared.');
|
|
1318
|
+
},
|
|
1319
|
+
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)' }}>
|
|
1320
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.errorColor }}>Clear</react_native_1.Text>
|
|
1321
|
+
</react_native_1.View>),
|
|
1322
|
+
})}
|
|
1323
|
+
</react_native_1.View>
|
|
1324
|
+
</react_native_1.ScrollView>);
|
|
1325
|
+
}
|
|
1326
|
+
if (settingsPage === 'logs') {
|
|
1327
|
+
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1328
|
+
{renderSubHeader('Logs Settings', <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>, `Total: ${consoleLogs.length}`)}
|
|
1329
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, padding: 16, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, gap: 4 }}>
|
|
1330
|
+
{renderSettingRow({
|
|
1331
|
+
icon: <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1332
|
+
label: 'Max Console Logs',
|
|
1333
|
+
description: 'How many console messages to retain',
|
|
1334
|
+
picker: {
|
|
1335
|
+
options: [100, 200, 500, 1000],
|
|
1336
|
+
selectedValue: maxConsoleLogs,
|
|
1337
|
+
onSelect: setMaxConsoleLogs,
|
|
1338
|
+
},
|
|
1339
|
+
})}
|
|
1340
|
+
<react_native_1.View style={{ height: 1, backgroundColor: AppColors_1.AppColors.dividerColor }}/>
|
|
1341
|
+
<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>
|
|
1342
|
+
{['info', 'warn', 'error'].map((level, li) => {
|
|
1343
|
+
const isLvlActive = showConsoleLevels[level];
|
|
1344
|
+
const levelColor = level === 'error' ? AppColors_1.AppColors.errorColor : level === 'warn' ? AppColors_1.AppColors.warningIconGold : AppColors_1.AppColors.skyBlue;
|
|
1345
|
+
return renderSettingRow({
|
|
1346
|
+
icon: <react_native_1.View style={{ width: 10, height: 10, borderRadius: 5, backgroundColor: levelColor }}/>,
|
|
1347
|
+
label: `Show ${level.charAt(0).toUpperCase() + level.slice(1)} logs`,
|
|
1348
|
+
description: level === 'info' ? 'Informational messages' : level === 'warn' ? 'Warning messages' : 'Error messages',
|
|
1349
|
+
isLast: level === 'error',
|
|
1350
|
+
onPress: () => setShowConsoleLevels(prev => ({ ...prev, [level]: !prev[level] })),
|
|
1351
|
+
right: (<react_native_1.View style={{
|
|
1352
|
+
width: 22, height: 22, borderRadius: 6,
|
|
1353
|
+
borderWidth: 2,
|
|
1354
|
+
borderColor: isLvlActive ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayTextWeak,
|
|
1355
|
+
backgroundColor: isLvlActive ? 'rgba(104, 75, 155, 0.1)' : 'transparent',
|
|
1356
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1357
|
+
}}>
|
|
1358
|
+
{isLvlActive && <NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>}
|
|
1359
|
+
</react_native_1.View>),
|
|
1360
|
+
});
|
|
1361
|
+
})}
|
|
1362
|
+
</react_native_1.View>
|
|
1363
|
+
|
|
1364
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, padding: 16, marginTop: 12 }}>
|
|
1365
|
+
{renderSettingRow({
|
|
1366
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1367
|
+
label: 'Clear Console Logs',
|
|
1368
|
+
description: `${consoleLogs.length} logs stored`,
|
|
1369
|
+
isLast: true,
|
|
1370
|
+
onPress: () => {
|
|
1371
|
+
(0, consoleLogger_1.clearConsoleLogs)();
|
|
1372
|
+
react_native_1.Alert.alert('Success', 'Console logs cleared.');
|
|
1373
|
+
},
|
|
1374
|
+
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)' }}>
|
|
1375
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.errorColor }}>Clear</react_native_1.Text>
|
|
1376
|
+
</react_native_1.View>),
|
|
1377
|
+
})}
|
|
1378
|
+
</react_native_1.View>
|
|
1379
|
+
</react_native_1.ScrollView>);
|
|
1380
|
+
}
|
|
1381
|
+
if (settingsPage === 'analytics') {
|
|
1382
|
+
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1383
|
+
{renderSubHeader('Analytics Settings', <NetworkIcons_1.AnalyticsIcon color={AppColors_1.AppColors.purple} size={16}/>, `Events: ${analyticsEvents.length}`)}
|
|
1384
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, padding: 16, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, gap: 4 }}>
|
|
1385
|
+
{renderSettingRow({
|
|
1386
|
+
icon: <NetworkIcons_1.AnalyticsIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1387
|
+
label: 'Events Captured',
|
|
1388
|
+
description: `${analyticsEvents.length} analytics events stored`,
|
|
1389
|
+
isLast: true,
|
|
1390
|
+
})}
|
|
1391
|
+
</react_native_1.View>
|
|
1392
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, padding: 16, marginTop: 12 }}>
|
|
1393
|
+
{renderSettingRow({
|
|
1394
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1395
|
+
label: 'Clear Analytics History',
|
|
1396
|
+
description: 'Remove all captured events',
|
|
1397
|
+
isLast: true,
|
|
1398
|
+
onPress: () => {
|
|
1399
|
+
(0, analyticsLogger_1.clearAnalyticsEvents)();
|
|
1400
|
+
setSelectedEvent(null);
|
|
1401
|
+
react_native_1.Alert.alert('Success', 'Analytics events cleared.');
|
|
1402
|
+
},
|
|
1403
|
+
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)' }}>
|
|
1404
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.errorColor }}>Clear</react_native_1.Text>
|
|
1405
|
+
</react_native_1.View>),
|
|
1406
|
+
})}
|
|
1407
|
+
</react_native_1.View>
|
|
1408
|
+
</react_native_1.ScrollView>);
|
|
1409
|
+
}
|
|
1410
|
+
if (settingsPage === 'webview') {
|
|
1411
|
+
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1412
|
+
{renderSubHeader('WebView Settings', <NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={16}/>, `History: ${webViewNavHistory.length}`)}
|
|
1413
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, padding: 16, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, gap: 4 }}>
|
|
1414
|
+
{renderSettingRow({
|
|
1415
|
+
icon: <NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1416
|
+
label: 'Capture CSS & JavaScript',
|
|
1417
|
+
description: 'Extract stylesheet and script source from pages',
|
|
1418
|
+
onPress: () => setWebViewCaptureCssJs(prev => !prev),
|
|
1419
|
+
right: (<react_native_1.View style={{
|
|
1420
|
+
width: 22, height: 22, borderRadius: 6,
|
|
1421
|
+
borderWidth: 2,
|
|
1422
|
+
borderColor: webViewCaptureCssJs ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayTextWeak,
|
|
1423
|
+
backgroundColor: webViewCaptureCssJs ? 'rgba(104, 75, 155, 0.1)' : 'transparent',
|
|
1424
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1425
|
+
}}>
|
|
1426
|
+
{webViewCaptureCssJs && <NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>}
|
|
1427
|
+
</react_native_1.View>),
|
|
1428
|
+
isLast: true,
|
|
1429
|
+
})}
|
|
1430
|
+
</react_native_1.View>
|
|
1431
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, padding: 16, marginTop: 12 }}>
|
|
1432
|
+
{renderSettingRow({
|
|
1433
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1434
|
+
label: 'Clear WebView Data',
|
|
1435
|
+
description: 'Remove all captured source & navigation history',
|
|
1436
|
+
isLast: true,
|
|
1437
|
+
onPress: () => {
|
|
1438
|
+
(0, webViewLogger_1.clearWebViewData)();
|
|
1439
|
+
react_native_1.Alert.alert('Success', 'WebView source history cleared.');
|
|
1440
|
+
},
|
|
1441
|
+
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)' }}>
|
|
1442
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.errorColor }}>Clear</react_native_1.Text>
|
|
1443
|
+
</react_native_1.View>),
|
|
1444
|
+
})}
|
|
1445
|
+
</react_native_1.View>
|
|
1446
|
+
</react_native_1.ScrollView>);
|
|
1447
|
+
}
|
|
1448
|
+
if (settingsPage === 'redux') {
|
|
1449
|
+
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1450
|
+
{renderSubHeader('Redux Settings', <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>, `Reducers: ${Object.keys(reduxState || {}).length}`)}
|
|
1451
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, padding: 16, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, gap: 4 }}>
|
|
1452
|
+
{renderSettingRow({
|
|
1453
|
+
icon: <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1454
|
+
label: 'Auto-refresh Store',
|
|
1455
|
+
description: 'Automatically capture Redux store state updates',
|
|
1456
|
+
onPress: () => setReduxAutoRefreshState(prev => !prev),
|
|
1457
|
+
right: (<react_native_1.View style={{
|
|
1458
|
+
width: 22, height: 22, borderRadius: 6,
|
|
1459
|
+
borderWidth: 2,
|
|
1460
|
+
borderColor: reduxAutoRefresh ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayTextWeak,
|
|
1461
|
+
backgroundColor: reduxAutoRefresh ? 'rgba(104, 75, 155, 0.1)' : 'transparent',
|
|
1462
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1463
|
+
}}>
|
|
1464
|
+
{reduxAutoRefresh && <NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>}
|
|
1465
|
+
</react_native_1.View>),
|
|
1466
|
+
})}
|
|
1467
|
+
<react_native_1.View style={{ height: 1, backgroundColor: AppColors_1.AppColors.dividerColor }}/>
|
|
1468
|
+
{renderSettingRow({
|
|
1469
|
+
icon: <NetworkIcons_1.InsightsIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1470
|
+
label: 'Default JSON Expand Depth',
|
|
1471
|
+
description: 'Initial depth of Redux state tree to auto-expand',
|
|
1472
|
+
picker: {
|
|
1473
|
+
options: [1, 2, 3, 5],
|
|
1474
|
+
selectedValue: reduxExpandDepth,
|
|
1475
|
+
onSelect: setReduxExpandDepth,
|
|
1476
|
+
},
|
|
1477
|
+
isLast: true,
|
|
1478
|
+
})}
|
|
1479
|
+
</react_native_1.View>
|
|
1480
|
+
|
|
1481
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, padding: 16, marginTop: 12 }}>
|
|
1482
|
+
{renderSettingRow({
|
|
1483
|
+
icon: <NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={16}/>,
|
|
1484
|
+
label: 'Clear Redux State',
|
|
1485
|
+
description: reduxState ? 'Reset state snapshot in inspector' : 'No store snapshot stored',
|
|
1486
|
+
isLast: true,
|
|
1487
|
+
onPress: () => {
|
|
1488
|
+
setReduxState(null);
|
|
1489
|
+
react_native_1.Alert.alert('Success', 'Redux state snapshot cleared.');
|
|
1490
|
+
},
|
|
1491
|
+
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)' }}>
|
|
1492
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.errorColor }}>Clear</react_native_1.Text>
|
|
1493
|
+
</react_native_1.View>),
|
|
1494
|
+
})}
|
|
1495
|
+
</react_native_1.View>
|
|
1496
|
+
</react_native_1.ScrollView>);
|
|
1497
|
+
}
|
|
1498
|
+
// Default return page is Insights settings
|
|
1499
|
+
return (<react_native_1.ScrollView style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }} contentContainerStyle={{ padding: 16 }}>
|
|
1500
|
+
{renderSubHeader('Insights Settings', <NetworkIcons_1.InsightsIcon color={AppColors_1.AppColors.purple} size={16}/>)}
|
|
1501
|
+
<react_native_1.View style={{ backgroundColor: AppColors_1.AppColors.primaryLight, padding: 16, borderRadius: 12, borderWidth: 1, borderColor: AppColors_1.AppColors.grayBorderSecondary, gap: 4 }}>
|
|
1502
|
+
{renderSettingRow({
|
|
1503
|
+
icon: <NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1504
|
+
label: 'Slow Latency Warning',
|
|
1505
|
+
description: 'Alert threshold for slow API request duration',
|
|
1506
|
+
picker: {
|
|
1507
|
+
options: [500, 1000, 2000],
|
|
1508
|
+
selectedValue: slowRequestThreshold,
|
|
1509
|
+
onSelect: setSlowRequestThreshold,
|
|
1510
|
+
},
|
|
1511
|
+
})}
|
|
1512
|
+
<react_native_1.View style={{ height: 1, backgroundColor: AppColors_1.AppColors.dividerColor }}/>
|
|
1513
|
+
{renderSettingRow({
|
|
1514
|
+
icon: <NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={16}/>,
|
|
1515
|
+
label: 'Show Console Alerts',
|
|
1516
|
+
description: 'Flags critical warnings or crash events on dashboard',
|
|
1517
|
+
isLast: true,
|
|
1518
|
+
onPress: () => setInsightsShowConsoleAlerts(prev => !prev),
|
|
1519
|
+
right: (<react_native_1.View style={{
|
|
1520
|
+
width: 22, height: 22, borderRadius: 6,
|
|
1521
|
+
borderWidth: 2,
|
|
1522
|
+
borderColor: insightsShowConsoleAlerts ? AppColors_1.AppColors.purple : AppColors_1.AppColors.grayTextWeak,
|
|
1523
|
+
backgroundColor: insightsShowConsoleAlerts ? 'rgba(104, 75, 155, 0.1)' : 'transparent',
|
|
1524
|
+
alignItems: 'center', justifyContent: 'center',
|
|
1525
|
+
}}>
|
|
1526
|
+
{insightsShowConsoleAlerts && <NetworkIcons_1.CheckIcon size={12} color={AppColors_1.AppColors.purple}/>}
|
|
1527
|
+
</react_native_1.View>),
|
|
1528
|
+
})}
|
|
1529
|
+
</react_native_1.View>
|
|
1530
|
+
</react_native_1.ScrollView>);
|
|
1531
|
+
};
|
|
758
1532
|
const renderInsightsDashboard = () => {
|
|
759
1533
|
const apiTotal = logs.length;
|
|
760
1534
|
const apiErrors = logs.filter(l => (l.status != null && l.status >= 400) || l.status === 0 || l.status == null).length;
|
|
@@ -774,168 +1548,168 @@ const NetworkInspector = () => {
|
|
|
774
1548
|
const webviewTotal = webViewNavHistory.length;
|
|
775
1549
|
return (<react_native_1.View style={styles_1.default.dashboardContainer}>
|
|
776
1550
|
{/* 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>
|
|
1551
|
+
{tabVisibility.apis && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('apis')}>
|
|
1552
|
+
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1553
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1554
|
+
<NetworkIcons_1.SignalIcon color={AppColors_1.AppColors.purple} size={18}/>
|
|
1555
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>APIs & Network</react_native_1.Text>
|
|
1556
|
+
</react_native_1.View>
|
|
1557
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
801
1558
|
</react_native_1.View>
|
|
802
|
-
<react_native_1.View style={styles_1.default.
|
|
803
|
-
<react_native_1.
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
1559
|
+
<react_native_1.View style={styles_1.default.dashboardModuleGrid}>
|
|
1560
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1561
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{apiTotal}</react_native_1.Text>
|
|
1562
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Requests</react_native_1.Text>
|
|
1563
|
+
</react_native_1.View>
|
|
1564
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1565
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, apiSuccessRate < 90 && { color: AppColors_1.AppColors.warningIconGold }]}>
|
|
1566
|
+
{apiSuccessRate}%
|
|
1567
|
+
</react_native_1.Text>
|
|
1568
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Success Rate</react_native_1.Text>
|
|
1569
|
+
</react_native_1.View>
|
|
1570
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1571
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, apiErrors > 0 && { color: AppColors_1.AppColors.errorColor }]}>
|
|
1572
|
+
{apiErrors}
|
|
1573
|
+
</react_native_1.Text>
|
|
1574
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Errors</react_native_1.Text>
|
|
1575
|
+
</react_native_1.View>
|
|
1576
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1577
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>
|
|
1578
|
+
{avgTime != null ? `${avgTime}ms` : '—'}
|
|
1579
|
+
</react_native_1.Text>
|
|
1580
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Avg Latency</react_native_1.Text>
|
|
1581
|
+
</react_native_1.View>
|
|
807
1582
|
</react_native_1.View>
|
|
808
|
-
</
|
|
809
|
-
</TouchableScale_1.default>
|
|
1583
|
+
</TouchableScale_1.default>)}
|
|
810
1584
|
|
|
811
1585
|
{/* Module 2: Logs */}
|
|
812
|
-
<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('logs')}>
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
1586
|
+
{tabVisibility.logs && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('logs')}>
|
|
1587
|
+
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1588
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1589
|
+
<NetworkIcons_1.TerminalIcon color="#0D9488" size={18}/>
|
|
1590
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>Console Logs</react_native_1.Text>
|
|
1591
|
+
</react_native_1.View>
|
|
1592
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
817
1593
|
</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>
|
|
1594
|
+
<react_native_1.View style={styles_1.default.dashboardModuleGrid}>
|
|
1595
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1596
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{logTotal}</react_native_1.Text>
|
|
1597
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Total Logs</react_native_1.Text>
|
|
1598
|
+
</react_native_1.View>
|
|
1599
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1600
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#0D9488' }]}>{logInfos}</react_native_1.Text>
|
|
1601
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Info</react_native_1.Text>
|
|
1602
|
+
</react_native_1.View>
|
|
1603
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1604
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, logWarns > 0 && { color: AppColors_1.AppColors.warningIconGold }]}>
|
|
1605
|
+
{logWarns}
|
|
1606
|
+
</react_native_1.Text>
|
|
1607
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Warnings</react_native_1.Text>
|
|
1608
|
+
</react_native_1.View>
|
|
1609
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1610
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, logErrors > 0 && { color: AppColors_1.AppColors.errorColor }]}>
|
|
1611
|
+
{logErrors}
|
|
1612
|
+
</react_native_1.Text>
|
|
1613
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Errors</react_native_1.Text>
|
|
1614
|
+
</react_native_1.View>
|
|
840
1615
|
</react_native_1.View>
|
|
841
|
-
</
|
|
842
|
-
</TouchableScale_1.default>
|
|
1616
|
+
</TouchableScale_1.default>)}
|
|
843
1617
|
|
|
844
1618
|
{/* 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>
|
|
1619
|
+
{tabVisibility.analytics && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('analytics')}>
|
|
1620
|
+
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1621
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1622
|
+
<NetworkIcons_1.AnalyticsIcon color="#EA580C" size={18}/>
|
|
1623
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>Analytics Events</react_native_1.Text>
|
|
1624
|
+
</react_native_1.View>
|
|
1625
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
865
1626
|
</react_native_1.View>
|
|
866
|
-
<react_native_1.View style={styles_1.default.
|
|
867
|
-
<react_native_1.
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
1627
|
+
<react_native_1.View style={styles_1.default.dashboardModuleGrid}>
|
|
1628
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1629
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{analyticsTotal}</react_native_1.Text>
|
|
1630
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Total Events</react_native_1.Text>
|
|
1631
|
+
</react_native_1.View>
|
|
1632
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1633
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#EA580C' }]}>{uniqueEvents}</react_native_1.Text>
|
|
1634
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Unique Names</react_native_1.Text>
|
|
1635
|
+
</react_native_1.View>
|
|
1636
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1637
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{screenViews}</react_native_1.Text>
|
|
1638
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Screen Views</react_native_1.Text>
|
|
1639
|
+
</react_native_1.View>
|
|
1640
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1641
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>
|
|
1642
|
+
{analyticsTotal > 0 ? Math.round(analyticsTotal / Math.max(1, logs.length / 5)) : 0}
|
|
1643
|
+
</react_native_1.Text>
|
|
1644
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Events Ratio</react_native_1.Text>
|
|
1645
|
+
</react_native_1.View>
|
|
871
1646
|
</react_native_1.View>
|
|
872
|
-
</
|
|
873
|
-
</TouchableScale_1.default>
|
|
1647
|
+
</TouchableScale_1.default>)}
|
|
874
1648
|
|
|
875
1649
|
{/* 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>
|
|
1650
|
+
{tabVisibility.webview && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('webview')}>
|
|
1651
|
+
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1652
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1653
|
+
<NetworkIcons_1.GlobeIcon color="#2563EB" size={18}/>
|
|
1654
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>WebView Captures</react_native_1.Text>
|
|
1655
|
+
</react_native_1.View>
|
|
1656
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
892
1657
|
</react_native_1.View>
|
|
893
|
-
<react_native_1.View style={styles_1.default.
|
|
894
|
-
<react_native_1.
|
|
895
|
-
{
|
|
896
|
-
|
|
897
|
-
|
|
1658
|
+
<react_native_1.View style={styles_1.default.dashboardModuleGrid}>
|
|
1659
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1660
|
+
<react_native_1.Text style={styles_1.default.dashboardGridVal}>{webviewTotal}</react_native_1.Text>
|
|
1661
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>History Size</react_native_1.Text>
|
|
1662
|
+
</react_native_1.View>
|
|
1663
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1664
|
+
<react_native_1.Text style={[styles_1.default.dashboardGridVal, { color: '#16A34A' }]}>Active</react_native_1.Text>
|
|
1665
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Status</react_native_1.Text>
|
|
1666
|
+
</react_native_1.View>
|
|
1667
|
+
<react_native_1.View style={styles_1.default.dashboardGridItem}>
|
|
1668
|
+
<react_native_1.Text numberOfLines={1} style={styles_1.default.dashboardGridVal}>
|
|
1669
|
+
{webviewTotal > 0 ? `${webViewNavHistory[0]?.title?.substring(0, 10) ?? ''}...` : '—'}
|
|
1670
|
+
</react_native_1.Text>
|
|
1671
|
+
<react_native_1.Text style={styles_1.default.dashboardGridLbl}>Last URL</react_native_1.Text>
|
|
1672
|
+
</react_native_1.View>
|
|
898
1673
|
</react_native_1.View>
|
|
899
|
-
</
|
|
900
|
-
</TouchableScale_1.default>
|
|
1674
|
+
</TouchableScale_1.default>)}
|
|
901
1675
|
|
|
902
1676
|
{/* Module 5: Redux Store */}
|
|
903
|
-
<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('redux')}>
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
1677
|
+
{tabVisibility.redux && (<TouchableScale_1.default style={styles_1.default.dashboardModuleCard} onPress={() => setActiveTab('redux')}>
|
|
1678
|
+
<react_native_1.View style={styles_1.default.dashboardModuleHeader}>
|
|
1679
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
1680
|
+
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={18}/>
|
|
1681
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleTitle}>Redux Store State</react_native_1.Text>
|
|
1682
|
+
</react_native_1.View>
|
|
1683
|
+
<react_native_1.Text style={styles_1.default.dashboardModuleGoText}>View Details →</react_native_1.Text>
|
|
908
1684
|
</react_native_1.View>
|
|
909
|
-
<react_native_1.
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
1685
|
+
{reduxState ? (<react_native_1.View style={{ paddingHorizontal: 12, paddingBottom: 12, gap: 6 }}>
|
|
1686
|
+
<react_native_1.View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 4 }}>
|
|
1687
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak, letterSpacing: 0.5 }}>
|
|
1688
|
+
REDUCER NAME
|
|
1689
|
+
</react_native_1.Text>
|
|
1690
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak, letterSpacing: 0.5 }}>
|
|
1691
|
+
SIZE / FIELDS
|
|
1692
|
+
</react_native_1.Text>
|
|
1693
|
+
</react_native_1.View>
|
|
1694
|
+
{Object.keys(reduxState).map(key => {
|
|
1695
|
+
const val = reduxState[key];
|
|
1696
|
+
const fieldsCount = typeof val === 'object' && val !== null ? Object.keys(val).length : 0;
|
|
1697
|
+
const sizeStr = (0, helpers_1.getSize)(val);
|
|
1698
|
+
return (<react_native_1.View key={key} style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', paddingVertical: 2 }}>
|
|
1699
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interMedium, fontSize: 12, color: AppColors_1.AppColors.grayTextStrong }}>
|
|
1700
|
+
{key}
|
|
1701
|
+
</react_native_1.Text>
|
|
1702
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 11, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
1703
|
+
{sizeStr} ({fieldsCount} fields)
|
|
1704
|
+
</react_native_1.Text>
|
|
1705
|
+
</react_native_1.View>);
|
|
1706
|
+
})}
|
|
1707
|
+
</react_native_1.View>) : (<react_native_1.View style={{ padding: 12, alignItems: 'center' }}>
|
|
1708
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 12, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
1709
|
+
No connected Redux store.
|
|
918
1710
|
</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>
|
|
1711
|
+
</react_native_1.View>)}
|
|
1712
|
+
</TouchableScale_1.default>)}
|
|
939
1713
|
</react_native_1.View>);
|
|
940
1714
|
};
|
|
941
1715
|
const renderReduxTab = () => {
|
|
@@ -957,43 +1731,104 @@ const NetworkInspector = () => {
|
|
|
957
1731
|
<react_native_1.Text style={styles_1.default.emptySub}>Connected store state is empty.</react_native_1.Text>
|
|
958
1732
|
</react_native_1.View>);
|
|
959
1733
|
}
|
|
1734
|
+
// Build hierarchical tree: Store -> Reducers -> Action -> Data
|
|
1735
|
+
const lastActionMap = (0, reduxLogger_1.getLastActionForReducer)();
|
|
1736
|
+
const actionHistory = (0, reduxLogger_1.getActionHistory)();
|
|
960
1737
|
return (<react_native_1.ScrollView style={styles_1.default.detailScroll} contentContainerStyle={{ paddingBottom: 24 }}>
|
|
1738
|
+
{/* Top Summary Card */}
|
|
961
1739
|
<react_native_1.View style={{
|
|
1740
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1741
|
+
borderRadius: 12,
|
|
1742
|
+
borderWidth: 1,
|
|
1743
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1744
|
+
padding: 14,
|
|
1745
|
+
marginHorizontal: 16,
|
|
1746
|
+
marginTop: 12,
|
|
1747
|
+
marginBottom: 12,
|
|
962
1748
|
flexDirection: 'row',
|
|
963
1749
|
alignItems: 'center',
|
|
964
|
-
|
|
965
|
-
paddingHorizontal: 16,
|
|
966
|
-
paddingVertical: 12,
|
|
967
|
-
borderBottomWidth: 1,
|
|
968
|
-
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
969
|
-
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1750
|
+
gap: 12,
|
|
970
1751
|
}}>
|
|
971
|
-
<react_native_1.
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1752
|
+
<react_native_1.View style={{
|
|
1753
|
+
width: 44,
|
|
1754
|
+
height: 44,
|
|
1755
|
+
borderRadius: 10,
|
|
1756
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
1757
|
+
alignItems: 'center',
|
|
1758
|
+
justifyContent: 'center',
|
|
977
1759
|
}}>
|
|
978
|
-
|
|
979
|
-
</react_native_1.
|
|
1760
|
+
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={20}/>
|
|
1761
|
+
</react_native_1.View>
|
|
1762
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
1763
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 13, color: AppColors_1.AppColors.primaryBlack }}>
|
|
1764
|
+
Redux Store Snapshot
|
|
1765
|
+
</react_native_1.Text>
|
|
1766
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 11, color: AppColors_1.AppColors.grayText, marginTop: 2 }}>
|
|
1767
|
+
Total size: {(0, helpers_1.getSize)(reduxState)} • {reducerKeys.length} Reducers
|
|
1768
|
+
</react_native_1.Text>
|
|
1769
|
+
</react_native_1.View>
|
|
980
1770
|
<CopyButton_1.default value={() => reduxState} label="Overall Store"/>
|
|
981
1771
|
</react_native_1.View>
|
|
982
1772
|
|
|
1773
|
+
{/* Tab View Selection Segments */}
|
|
1774
|
+
<react_native_1.View style={{
|
|
1775
|
+
flexDirection: 'row',
|
|
1776
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
1777
|
+
borderRadius: 10,
|
|
1778
|
+
padding: 3,
|
|
1779
|
+
marginHorizontal: 16,
|
|
1780
|
+
marginBottom: 12,
|
|
1781
|
+
borderWidth: 1,
|
|
1782
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
1783
|
+
}}>
|
|
1784
|
+
<react_native_1.TouchableOpacity onPress={() => setReduxActiveSubTab('timeline')} style={{
|
|
1785
|
+
flex: 1,
|
|
1786
|
+
paddingVertical: 6,
|
|
1787
|
+
alignItems: 'center',
|
|
1788
|
+
justifyContent: 'center',
|
|
1789
|
+
borderRadius: 8,
|
|
1790
|
+
backgroundColor: reduxActiveSubTab === 'timeline' ? AppColors_1.AppColors.purple : 'transparent',
|
|
1791
|
+
}}>
|
|
1792
|
+
<react_native_1.Text style={{
|
|
1793
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1794
|
+
fontSize: 11,
|
|
1795
|
+
color: reduxActiveSubTab === 'timeline' ? '#FFFFFF' : AppColors_1.AppColors.grayText,
|
|
1796
|
+
}}>
|
|
1797
|
+
⚡ Action Timeline
|
|
1798
|
+
</react_native_1.Text>
|
|
1799
|
+
</react_native_1.TouchableOpacity>
|
|
1800
|
+
<react_native_1.TouchableOpacity onPress={() => setReduxActiveSubTab('tree')} style={{
|
|
1801
|
+
flex: 1,
|
|
1802
|
+
paddingVertical: 6,
|
|
1803
|
+
alignItems: 'center',
|
|
1804
|
+
justifyContent: 'center',
|
|
1805
|
+
borderRadius: 8,
|
|
1806
|
+
backgroundColor: reduxActiveSubTab === 'tree' ? AppColors_1.AppColors.purple : 'transparent',
|
|
1807
|
+
}}>
|
|
1808
|
+
<react_native_1.Text style={{
|
|
1809
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
1810
|
+
fontSize: 11,
|
|
1811
|
+
color: reduxActiveSubTab === 'tree' ? '#FFFFFF' : AppColors_1.AppColors.grayText,
|
|
1812
|
+
}}>
|
|
1813
|
+
🏪 Store Tree
|
|
1814
|
+
</react_native_1.Text>
|
|
1815
|
+
</react_native_1.TouchableOpacity>
|
|
1816
|
+
</react_native_1.View>
|
|
1817
|
+
|
|
1818
|
+
{/* Search Bar */}
|
|
983
1819
|
<react_native_1.View style={{
|
|
984
1820
|
flexDirection: 'row',
|
|
985
1821
|
alignItems: 'center',
|
|
986
1822
|
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
987
1823
|
borderRadius: 8,
|
|
988
1824
|
marginHorizontal: 16,
|
|
989
|
-
|
|
990
|
-
marginBottom: 8,
|
|
1825
|
+
marginBottom: 12,
|
|
991
1826
|
paddingHorizontal: 10,
|
|
992
1827
|
borderWidth: 1,
|
|
993
1828
|
borderColor: AppColors_1.AppColors.dividerColor,
|
|
994
1829
|
height: 36,
|
|
995
1830
|
}}>
|
|
996
|
-
<react_native_1.TextInput placeholder="Search Redux keys or values..." placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={reduxSearch} onChangeText={setReduxSearch} style={{
|
|
1831
|
+
<react_native_1.TextInput placeholder={reduxActiveSubTab === 'timeline' ? "Search actions or payloads..." : "Search Redux keys or values..."} placeholderTextColor={AppColors_1.AppColors.grayTextWeak} value={reduxSearch} onChangeText={setReduxSearch} style={{
|
|
997
1832
|
flex: 1,
|
|
998
1833
|
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
999
1834
|
fontSize: 12,
|
|
@@ -1005,66 +1840,24 @@ const NetworkInspector = () => {
|
|
|
1005
1840
|
</react_native_1.Pressable>)}
|
|
1006
1841
|
</react_native_1.View>
|
|
1007
1842
|
|
|
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
|
-
})}
|
|
1843
|
+
{/* Main Content Card */}
|
|
1844
|
+
<react_native_1.View style={{
|
|
1845
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1846
|
+
borderRadius: 12,
|
|
1847
|
+
borderWidth: 1,
|
|
1848
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
1849
|
+
marginHorizontal: 16,
|
|
1850
|
+
padding: 12,
|
|
1851
|
+
}}>
|
|
1852
|
+
{reduxActiveSubTab === 'timeline' ? (<ReduxTreeView_1.ReduxActionTimeline history={actionHistory} onClear={reduxLogger_1.clearActionHistory} search={reduxSearch}/>) : (<ReduxTreeView_1.ReduxTreeView state={reduxState} lastActionMap={lastActionMap} search={reduxSearch}/>)}
|
|
1853
|
+
</react_native_1.View>
|
|
1061
1854
|
</react_native_1.ScrollView>);
|
|
1062
1855
|
};
|
|
1063
1856
|
return (<>
|
|
1064
1857
|
{hasNavigationContext && (<NavigationTracker onStateChange={setNavState}/>)}
|
|
1065
1858
|
<TouchableScale_1.default style={styles_1.default.fabWrapper} onPress={() => setVisible(true)} hitSlop={10}>
|
|
1066
1859
|
<react_native_1.Animated.View style={[styles_1.default.fabPulseRing, { transform: [{ scale: pulseAnim }] }]}/>
|
|
1067
|
-
<NetworkIcons_1.BrandCircleIcon size={
|
|
1860
|
+
<NetworkIcons_1.BrandCircleIcon size={62}/>
|
|
1068
1861
|
{(logs.length > 0 || analyticsEvents.length > 0) && (<react_native_1.Animated.View style={[
|
|
1069
1862
|
styles_1.default.fabBadge,
|
|
1070
1863
|
hasErrors ? styles_1.default.fabBadgeError : styles_1.default.fabBadgeNormal,
|
|
@@ -1109,7 +1902,33 @@ const NetworkInspector = () => {
|
|
|
1109
1902
|
<NetworkIcons_1.WhiteBackNavigation />
|
|
1110
1903
|
</TouchableScale_1.default>
|
|
1111
1904
|
|
|
1112
|
-
{selected == null && selectedEvent == null ? (<react_native_1.
|
|
1905
|
+
{selected == null && selectedEvent == null ? (<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 14, flex: 1 }}>
|
|
1906
|
+
<react_native_1.View style={{
|
|
1907
|
+
width: 42,
|
|
1908
|
+
height: 42,
|
|
1909
|
+
borderRadius: 10,
|
|
1910
|
+
backgroundColor: 'rgba(255,255,255,0.13)',
|
|
1911
|
+
borderWidth: 1.5,
|
|
1912
|
+
borderColor: 'rgba(255,255,255,0.25)',
|
|
1913
|
+
alignItems: 'center',
|
|
1914
|
+
justifyContent: 'center',
|
|
1915
|
+
shadowColor: '#000',
|
|
1916
|
+
shadowOpacity: 0.15,
|
|
1917
|
+
shadowRadius: 4,
|
|
1918
|
+
shadowOffset: { width: 0, height: 2 },
|
|
1919
|
+
}}>
|
|
1920
|
+
<NetworkIcons_1.BrandSquareIcon size={36}/>
|
|
1921
|
+
</react_native_1.View>
|
|
1922
|
+
<react_native_1.View style={{ gap: 3 }}>
|
|
1923
|
+
<react_native_1.Text style={[styles_1.default.headerTitle, { fontSize: 17, letterSpacing: 0.2 }]}>RN InApp Inspector</react_native_1.Text>
|
|
1924
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 5 }}>
|
|
1925
|
+
<react_native_1.Animated.View style={{ width: 6, height: 6, borderRadius: 3, backgroundColor: '#4ADE80', opacity: activePulseAnim }}/>
|
|
1926
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interMedium, fontSize: 10, color: 'rgba(255,255,255,0.78)', letterSpacing: 0.3 }}>
|
|
1927
|
+
Active • {react_native_1.Platform.OS === 'ios' ? 'iOS' : 'Android'} (v1.0.11)
|
|
1928
|
+
</react_native_1.Text>
|
|
1929
|
+
</react_native_1.View>
|
|
1930
|
+
</react_native_1.View>
|
|
1931
|
+
</react_native_1.View>) : null}
|
|
1113
1932
|
</react_native_1.View>
|
|
1114
1933
|
|
|
1115
1934
|
<react_native_1.View style={styles_1.default.headerCenter}>
|
|
@@ -1185,15 +2004,11 @@ const NetworkInspector = () => {
|
|
|
1185
2004
|
</react_native_1.View>
|
|
1186
2005
|
|
|
1187
2006
|
<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>
|
|
2007
|
+
{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)' }]}>
|
|
2008
|
+
<NetworkIcons_1.SettingsIcon color="#FFFFFF" size={16}/>
|
|
2009
|
+
</TouchableScale_1.default>)}
|
|
1195
2010
|
|
|
1196
|
-
<TouchableScale_1.default onPress={closeModal} hitSlop={15} style={styles_1.default.
|
|
2011
|
+
<TouchableScale_1.default onPress={closeModal} hitSlop={15} style={styles_1.default.closeButtonSquare}>
|
|
1197
2012
|
<NetworkIcons_1.CloseWhite size={16}/>
|
|
1198
2013
|
</TouchableScale_1.default>
|
|
1199
2014
|
</react_native_1.View>
|
|
@@ -1201,7 +2016,7 @@ const NetworkInspector = () => {
|
|
|
1201
2016
|
</react_native_linear_gradient_1.default>
|
|
1202
2017
|
|
|
1203
2018
|
{/* ─── Horizontal Scrollable Tab Bar inside Content ─── */}
|
|
1204
|
-
{selected == null && selectedEvent == null ? (<react_native_1.View style={styles_1.default.tabBarContainer}>
|
|
2019
|
+
{selected == null && selectedEvent == null && settingsPage === null ? (<react_native_1.View style={styles_1.default.tabBarContainer}>
|
|
1205
2020
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{ paddingRight: 16 }}>
|
|
1206
2021
|
{[
|
|
1207
2022
|
{ key: 'insights', label: 'Insights', count: 0, icon: 'insights' },
|
|
@@ -1210,10 +2025,12 @@ const NetworkInspector = () => {
|
|
|
1210
2025
|
{ key: 'analytics', label: 'Analytics', count: analyticsEvents.length, icon: 'analytics' },
|
|
1211
2026
|
{ key: 'webview', label: 'WebView', count: webViewNavHistory.length, icon: 'webview' },
|
|
1212
2027
|
{ key: 'redux', label: 'Redux', count: 0, icon: 'redux' },
|
|
1213
|
-
].map(tab => {
|
|
2028
|
+
].filter(tab => tabVisibility[tab.key]).map(tab => {
|
|
1214
2029
|
const isActive = activeTab === tab.key;
|
|
1215
2030
|
const iconColor = isActive ? '#FFFFFF' : AppColors_1.AppColors.grayText;
|
|
1216
2031
|
const countLabel = tab.count > 9 ? '9+' : String(tab.count);
|
|
2032
|
+
const hasUnreadApis = activeTab !== 'apis' && logs.length > lastReadApisCount;
|
|
2033
|
+
const hasUnreadLogs = activeTab !== 'logs' && consoleLogs.length > lastReadLogsCount;
|
|
1217
2034
|
return (<TouchableScale_1.default key={tab.key} onPress={() => {
|
|
1218
2035
|
requestAnimationFrame(() => {
|
|
1219
2036
|
setActiveTab(tab.key);
|
|
@@ -1235,6 +2052,15 @@ const NetworkInspector = () => {
|
|
|
1235
2052
|
]}>
|
|
1236
2053
|
{tab.label} {tab.count > 0 ? `(${countLabel})` : ''}
|
|
1237
2054
|
</react_native_1.Text>
|
|
2055
|
+
{((tab.key === 'apis' && hasUnreadApis) || (tab.key === 'logs' && hasUnreadLogs)) && (<react_native_1.Animated.View style={{
|
|
2056
|
+
width: 6,
|
|
2057
|
+
height: 6,
|
|
2058
|
+
borderRadius: 3,
|
|
2059
|
+
backgroundColor: AppColors_1.AppColors.errorColor,
|
|
2060
|
+
marginLeft: 4,
|
|
2061
|
+
alignSelf: 'center',
|
|
2062
|
+
transform: [{ scale: unreadPulseAnim }],
|
|
2063
|
+
}}/>)}
|
|
1238
2064
|
</react_native_1.View>
|
|
1239
2065
|
</TouchableScale_1.default>);
|
|
1240
2066
|
})}
|
|
@@ -1857,156 +2683,250 @@ const NetworkInspector = () => {
|
|
|
1857
2683
|
styles_1.default.listContent,
|
|
1858
2684
|
filteredConsoleLogs.length === 0 && { flexGrow: 1 },
|
|
1859
2685
|
]} keyboardShouldPersistTaps="handled"/>
|
|
1860
|
-
</react_native_1.View>) : activeTab === 'webview' ? (<react_native_1.View style={
|
|
2686
|
+
</react_native_1.View>) : activeTab === 'webview' ? (webViewNavHistory.length === 0 ? (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
2687
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
2688
|
+
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
2689
|
+
</react_native_1.View>
|
|
2690
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>No WebView Activity</react_native_1.Text>
|
|
2691
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
2692
|
+
Load a webpage within a connected WebView component to inspect pages, page source, and console logs.
|
|
2693
|
+
</react_native_1.Text>
|
|
2694
|
+
</react_native_1.View>) : (<react_native_1.View style={{ flex: 1 }}>
|
|
2695
|
+
{/* ─── Current Page Address Bar (Now on top) ─── */}
|
|
2696
|
+
{(() => {
|
|
2697
|
+
const currentUrl = webViewNavHistory[0]?.url;
|
|
2698
|
+
if (!currentUrl)
|
|
2699
|
+
return null;
|
|
2700
|
+
return (<react_native_1.View style={{
|
|
2701
|
+
paddingHorizontal: 12,
|
|
2702
|
+
paddingTop: 6,
|
|
2703
|
+
paddingBottom: 6,
|
|
2704
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
2705
|
+
borderBottomWidth: 1,
|
|
2706
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
2707
|
+
}}>
|
|
2708
|
+
<react_native_1.View style={{
|
|
2709
|
+
flexDirection: 'row',
|
|
2710
|
+
alignItems: 'center',
|
|
2711
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
2712
|
+
borderRadius: 8,
|
|
2713
|
+
borderWidth: 1.5,
|
|
2714
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
2715
|
+
paddingHorizontal: 10,
|
|
2716
|
+
paddingVertical: 5,
|
|
2717
|
+
gap: 8,
|
|
2718
|
+
}}>
|
|
2719
|
+
{/* Left: Lock and HTTPS label */}
|
|
2720
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
|
|
2721
|
+
<react_native_1.Text style={{ fontSize: 11 }}>🔒</react_native_1.Text>
|
|
2722
|
+
<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>
|
|
2723
|
+
</react_native_1.View>
|
|
2724
|
+
<react_native_1.View style={{ width: 1.5, height: 12, backgroundColor: AppColors_1.AppColors.grayBorderSecondary }}/>
|
|
2725
|
+
|
|
2726
|
+
{/* Middle: URL text (Address style) */}
|
|
2727
|
+
<react_native_1.View style={{ flex: 1 }}>
|
|
2728
|
+
<HighlightText_1.default text={currentUrl} search={webViewSearch} numberOfLines={1} ellipsizeMode="tail" style={{
|
|
2729
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2730
|
+
fontSize: 11.5,
|
|
2731
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
2732
|
+
}} highlightStyle={styles_1.default.highlight} detectLinks={false}/>
|
|
2733
|
+
</react_native_1.View>
|
|
2734
|
+
|
|
2735
|
+
{/* Right: Copy Button */}
|
|
2736
|
+
<CopyButton_1.default value={currentUrl} label="URL"/>
|
|
2737
|
+
|
|
2738
|
+
{/* Right: Globe Icon button to open browser */}
|
|
2739
|
+
<TouchableScale_1.default onPress={() => react_native_1.Linking.openURL(currentUrl)} hitSlop={8} style={{
|
|
2740
|
+
width: 26,
|
|
2741
|
+
height: 26,
|
|
2742
|
+
borderRadius: 13,
|
|
2743
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
2744
|
+
borderWidth: 1,
|
|
2745
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
2746
|
+
alignItems: 'center',
|
|
2747
|
+
justifyContent: 'center',
|
|
2748
|
+
}}>
|
|
2749
|
+
<NetworkIcons_1.GlobeIcon size={11} color={AppColors_1.AppColors.purple}/>
|
|
2750
|
+
</TouchableScale_1.default>
|
|
2751
|
+
</react_native_1.View>
|
|
2752
|
+
</react_native_1.View>);
|
|
2753
|
+
})()}
|
|
2754
|
+
|
|
2755
|
+
{/* ─── WebView Sub-Tabs (Now below Address Bar) ─── */}
|
|
1861
2756
|
<react_native_1.View style={{
|
|
1862
|
-
backgroundColor:
|
|
2757
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
1863
2758
|
borderBottomWidth: 1,
|
|
1864
2759
|
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
1865
|
-
|
|
2760
|
+
paddingVertical: 6,
|
|
1866
2761
|
}}>
|
|
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,
|
|
2762
|
+
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={false} contentContainerStyle={{
|
|
2763
|
+
paddingHorizontal: 12,
|
|
1875
2764
|
flexDirection: 'row',
|
|
1876
|
-
|
|
1877
|
-
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
2765
|
+
gap: 8,
|
|
1878
2766
|
}}>
|
|
2767
|
+
{/* Sub-tab 1: Preview */}
|
|
1879
2768
|
<react_native_1.Pressable style={[
|
|
1880
2769
|
{
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
borderRadius:
|
|
2770
|
+
paddingVertical: 6,
|
|
2771
|
+
paddingHorizontal: 14,
|
|
2772
|
+
borderRadius: 8,
|
|
1884
2773
|
alignItems: 'center',
|
|
2774
|
+
flexDirection: 'row',
|
|
2775
|
+
gap: 6,
|
|
2776
|
+
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
2777
|
+
borderWidth: 1,
|
|
2778
|
+
borderColor: 'transparent',
|
|
1885
2779
|
},
|
|
1886
|
-
webViewSubTab === '
|
|
1887
|
-
backgroundColor: AppColors_1.AppColors.
|
|
1888
|
-
|
|
1889
|
-
shadowOpacity: 0.1,
|
|
1890
|
-
shadowRadius: 3,
|
|
1891
|
-
shadowOffset: { width: 0, height: 1 },
|
|
1892
|
-
elevation: 2,
|
|
2780
|
+
webViewSubTab === 'preview' && {
|
|
2781
|
+
backgroundColor: AppColors_1.AppColors.purple,
|
|
2782
|
+
borderColor: AppColors_1.AppColors.purple,
|
|
1893
2783
|
},
|
|
1894
|
-
]} onPress={() => setWebViewSubTab('
|
|
1895
|
-
<
|
|
2784
|
+
]} onPress={() => setWebViewSubTab('preview')}>
|
|
2785
|
+
<NetworkIcons_1.EyeIcon color={webViewSubTab === 'preview' ? '#FFFFFF' : AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
2786
|
+
<react_native_1.Text style={{
|
|
2787
|
+
fontFamily: webViewSubTab === 'preview' ? AppFonts_1.AppFonts.interBold : AppFonts_1.AppFonts.interMedium,
|
|
2788
|
+
fontSize: 12,
|
|
2789
|
+
color: webViewSubTab === 'preview' ? '#FFFFFF' : AppColors_1.AppColors.grayTextStrong,
|
|
2790
|
+
}}>
|
|
2791
|
+
Preview
|
|
2792
|
+
</react_native_1.Text>
|
|
2793
|
+
</react_native_1.Pressable>
|
|
2794
|
+
|
|
2795
|
+
{/* Sub-tab 2: Page Source */}
|
|
2796
|
+
<react_native_1.Pressable style={[
|
|
1896
2797
|
{
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
2798
|
+
paddingVertical: 6,
|
|
2799
|
+
paddingHorizontal: 14,
|
|
2800
|
+
borderRadius: 8,
|
|
2801
|
+
alignItems: 'center',
|
|
2802
|
+
flexDirection: 'row',
|
|
2803
|
+
gap: 6,
|
|
2804
|
+
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
2805
|
+
borderWidth: 1,
|
|
2806
|
+
borderColor: 'transparent',
|
|
1900
2807
|
},
|
|
1901
2808
|
webViewSubTab === 'html' && {
|
|
1902
|
-
|
|
1903
|
-
|
|
2809
|
+
backgroundColor: AppColors_1.AppColors.purple,
|
|
2810
|
+
borderColor: AppColors_1.AppColors.purple,
|
|
1904
2811
|
},
|
|
1905
|
-
]}>
|
|
1906
|
-
|
|
2812
|
+
]} onPress={() => setWebViewSubTab('html')}>
|
|
2813
|
+
<NetworkIcons_1.HtmlIcon color={webViewSubTab === 'html' ? '#FFFFFF' : AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
2814
|
+
<react_native_1.Text style={{
|
|
2815
|
+
fontFamily: webViewSubTab === 'html' ? AppFonts_1.AppFonts.interBold : AppFonts_1.AppFonts.interMedium,
|
|
2816
|
+
fontSize: 12,
|
|
2817
|
+
color: webViewSubTab === 'html' ? '#FFFFFF' : AppColors_1.AppColors.grayTextStrong,
|
|
2818
|
+
}}>
|
|
2819
|
+
Page Source
|
|
1907
2820
|
</react_native_1.Text>
|
|
1908
2821
|
</react_native_1.Pressable>
|
|
2822
|
+
|
|
2823
|
+
{/* Sub-tab 3: History */}
|
|
1909
2824
|
<react_native_1.Pressable style={[
|
|
1910
2825
|
{
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
borderRadius:
|
|
2826
|
+
paddingVertical: 6,
|
|
2827
|
+
paddingHorizontal: 14,
|
|
2828
|
+
borderRadius: 8,
|
|
1914
2829
|
alignItems: 'center',
|
|
2830
|
+
flexDirection: 'row',
|
|
2831
|
+
gap: 6,
|
|
2832
|
+
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
2833
|
+
borderWidth: 1,
|
|
2834
|
+
borderColor: 'transparent',
|
|
1915
2835
|
},
|
|
1916
2836
|
webViewSubTab === 'navigation' && {
|
|
1917
|
-
backgroundColor: AppColors_1.AppColors.
|
|
1918
|
-
|
|
1919
|
-
shadowOpacity: 0.1,
|
|
1920
|
-
shadowRadius: 3,
|
|
1921
|
-
shadowOffset: { width: 0, height: 1 },
|
|
1922
|
-
elevation: 2,
|
|
2837
|
+
backgroundColor: AppColors_1.AppColors.purple,
|
|
2838
|
+
borderColor: AppColors_1.AppColors.purple,
|
|
1923
2839
|
},
|
|
1924
2840
|
]} onPress={() => setWebViewSubTab('navigation')}>
|
|
1925
|
-
<
|
|
2841
|
+
<NetworkIcons_1.ClockIcon color={webViewSubTab === 'navigation' ? '#FFFFFF' : AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
2842
|
+
<react_native_1.Text style={{
|
|
2843
|
+
fontFamily: webViewSubTab === 'navigation' ? AppFonts_1.AppFonts.interBold : AppFonts_1.AppFonts.interMedium,
|
|
2844
|
+
fontSize: 12,
|
|
2845
|
+
color: webViewSubTab === 'navigation' ? '#FFFFFF' : AppColors_1.AppColors.grayTextStrong,
|
|
2846
|
+
}}>
|
|
2847
|
+
History ({webViewNavHistory.length})
|
|
2848
|
+
</react_native_1.Text>
|
|
2849
|
+
</react_native_1.Pressable>
|
|
2850
|
+
|
|
2851
|
+
{/* Sub-tab 4: Console */}
|
|
2852
|
+
<react_native_1.Pressable style={[
|
|
1926
2853
|
{
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
2854
|
+
paddingVertical: 6,
|
|
2855
|
+
paddingHorizontal: 14,
|
|
2856
|
+
borderRadius: 8,
|
|
2857
|
+
alignItems: 'center',
|
|
2858
|
+
flexDirection: 'row',
|
|
2859
|
+
gap: 6,
|
|
2860
|
+
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
|
2861
|
+
borderWidth: 1,
|
|
2862
|
+
borderColor: 'transparent',
|
|
1930
2863
|
},
|
|
1931
|
-
webViewSubTab === '
|
|
1932
|
-
|
|
1933
|
-
|
|
2864
|
+
webViewSubTab === 'console' && {
|
|
2865
|
+
backgroundColor: AppColors_1.AppColors.purple,
|
|
2866
|
+
borderColor: AppColors_1.AppColors.purple,
|
|
1934
2867
|
},
|
|
1935
|
-
]}>
|
|
1936
|
-
|
|
2868
|
+
]} onPress={() => setWebViewSubTab('console')}>
|
|
2869
|
+
<NetworkIcons_1.TerminalIcon color={webViewSubTab === 'console' ? '#FFFFFF' : AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
2870
|
+
<react_native_1.Text style={{
|
|
2871
|
+
fontFamily: webViewSubTab === 'console' ? AppFonts_1.AppFonts.interBold : AppFonts_1.AppFonts.interMedium,
|
|
2872
|
+
fontSize: 12,
|
|
2873
|
+
color: webViewSubTab === 'console' ? '#FFFFFF' : AppColors_1.AppColors.grayTextStrong,
|
|
2874
|
+
}}>
|
|
2875
|
+
Console ({webViewLogs.length})
|
|
1937
2876
|
</react_native_1.Text>
|
|
1938
2877
|
</react_native_1.Pressable>
|
|
1939
|
-
</react_native_1.
|
|
2878
|
+
</react_native_1.ScrollView>
|
|
1940
2879
|
</react_native_1.View>
|
|
1941
2880
|
|
|
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
2881
|
{webViewSubTab === 'html' ? (<react_native_1.View style={{ flex: 1 }}>
|
|
2002
2882
|
{webViewHtml || webViewCss || webViewJs ? (<react_native_1.View style={{ flex: 1 }}>
|
|
2883
|
+
{/* Clear Inspect Banner */}
|
|
2884
|
+
{inspectedElement && (<react_native_1.View style={{
|
|
2885
|
+
flexDirection: 'row',
|
|
2886
|
+
alignItems: 'center',
|
|
2887
|
+
justifyContent: 'space-between',
|
|
2888
|
+
backgroundColor: AppColors_1.AppColors.purpleShade50,
|
|
2889
|
+
paddingHorizontal: 12,
|
|
2890
|
+
paddingVertical: 6,
|
|
2891
|
+
borderBottomWidth: 1,
|
|
2892
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
2893
|
+
}}>
|
|
2894
|
+
<react_native_1.Text style={{
|
|
2895
|
+
fontFamily: AppFonts_1.AppFonts.interMedium,
|
|
2896
|
+
fontSize: 11.5,
|
|
2897
|
+
color: AppColors_1.AppColors.purple,
|
|
2898
|
+
flex: 1,
|
|
2899
|
+
}}>
|
|
2900
|
+
Inspecting element:{' '}
|
|
2901
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold }}>
|
|
2902
|
+
<{inspectedElement.tagName}
|
|
2903
|
+
{inspectedElement.id ? ` id="${inspectedElement.id}"` : ''}
|
|
2904
|
+
{inspectedElement.className ? ` class="${inspectedElement.className.trim().split(/\s+/)[0]}"` : ''}
|
|
2905
|
+
>
|
|
2906
|
+
</react_native_1.Text>
|
|
2907
|
+
</react_native_1.Text>
|
|
2908
|
+
<react_native_1.Pressable onPress={() => setInspectedElement(null)} style={{
|
|
2909
|
+
paddingHorizontal: 8,
|
|
2910
|
+
paddingVertical: 4,
|
|
2911
|
+
}}>
|
|
2912
|
+
<react_native_1.Text style={{
|
|
2913
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2914
|
+
fontSize: 11,
|
|
2915
|
+
color: AppColors_1.AppColors.purple,
|
|
2916
|
+
}}>
|
|
2917
|
+
Clear Inspect
|
|
2918
|
+
</react_native_1.Text>
|
|
2919
|
+
</react_native_1.Pressable>
|
|
2920
|
+
</react_native_1.View>)}
|
|
2921
|
+
|
|
2003
2922
|
{/* Inner sub-tabs inside HTML source view */}
|
|
2004
2923
|
<react_native_1.View style={{
|
|
2005
2924
|
flexDirection: 'row',
|
|
2006
2925
|
borderBottomWidth: 1,
|
|
2007
|
-
borderBottomColor:
|
|
2008
|
-
backgroundColor:
|
|
2009
|
-
paddingHorizontal:
|
|
2926
|
+
borderBottomColor: AppColors_1.AppColors.dividerColor,
|
|
2927
|
+
backgroundColor: AppColors_1.AppColors.primaryLight,
|
|
2928
|
+
paddingHorizontal: 12,
|
|
2929
|
+
gap: 12,
|
|
2010
2930
|
}}>
|
|
2011
2931
|
{['html', 'css', 'javascript'].map(tab => {
|
|
2012
2932
|
const active = htmlSubTab === tab;
|
|
@@ -2014,23 +2934,34 @@ const NetworkInspector = () => {
|
|
|
2014
2934
|
? 'HTML'
|
|
2015
2935
|
: tab === 'css'
|
|
2016
2936
|
? 'CSS'
|
|
2017
|
-
: '
|
|
2937
|
+
: 'JavaScript';
|
|
2938
|
+
const activeColor = tab === 'html'
|
|
2939
|
+
? '#EA580C' // Orange
|
|
2940
|
+
: tab === 'css'
|
|
2941
|
+
? '#2563EB' // Blue
|
|
2942
|
+
: '#D97706'; // Dark Yellow/Amber
|
|
2018
2943
|
return (<react_native_1.Pressable key={tab} onPress={() => setHtmlSubTab(tab)} style={{
|
|
2019
|
-
paddingVertical:
|
|
2020
|
-
|
|
2944
|
+
paddingVertical: 8,
|
|
2945
|
+
paddingHorizontal: 4,
|
|
2021
2946
|
borderBottomWidth: 2,
|
|
2022
2947
|
borderBottomColor: active
|
|
2023
|
-
?
|
|
2948
|
+
? activeColor
|
|
2024
2949
|
: 'transparent',
|
|
2950
|
+
flexDirection: 'row',
|
|
2951
|
+
alignItems: 'center',
|
|
2952
|
+
gap: 4,
|
|
2025
2953
|
}}>
|
|
2954
|
+
{tab === 'html' && (<NetworkIcons_1.HtmlIcon color={active ? activeColor : AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
2955
|
+
{tab === 'css' && (<NetworkIcons_1.CssIcon color={active ? activeColor : AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
2956
|
+
{tab === 'javascript' && (<NetworkIcons_1.JsIcon color={active ? activeColor : AppColors_1.AppColors.grayTextWeak} size={14}/>)}
|
|
2026
2957
|
<react_native_1.Text style={{
|
|
2027
2958
|
fontFamily: active
|
|
2028
2959
|
? AppFonts_1.AppFonts.interBold
|
|
2029
2960
|
: AppFonts_1.AppFonts.interMedium,
|
|
2030
|
-
fontSize:
|
|
2961
|
+
fontSize: 13,
|
|
2031
2962
|
color: active
|
|
2032
|
-
?
|
|
2033
|
-
:
|
|
2963
|
+
? activeColor
|
|
2964
|
+
: AppColors_1.AppColors.grayTextWeak,
|
|
2034
2965
|
}}>
|
|
2035
2966
|
{label}
|
|
2036
2967
|
</react_native_1.Text>
|
|
@@ -2040,21 +2971,21 @@ const NetworkInspector = () => {
|
|
|
2040
2971
|
<react_native_1.View style={{ flex: 1, padding: 12 }}>
|
|
2041
2972
|
{!isHtmlTabReady ? (<react_native_1.View style={{ flex: 1, justifyContent: 'center', alignItems: 'center', minHeight: 200 }}>
|
|
2042
2973
|
<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={{
|
|
2974
|
+
</react_native_1.View>) : htmlSubTab === 'html' ? (webViewHtml ? (<CodeSnippet_1.default code={webViewHtml} language="html" search={getSearchTermForTab()}/>) : (<react_native_1.Text style={{
|
|
2044
2975
|
fontFamily: 'monospace',
|
|
2045
2976
|
fontSize: 11,
|
|
2046
2977
|
color: '#94A3B8',
|
|
2047
2978
|
padding: 12,
|
|
2048
2979
|
}}>
|
|
2049
2980
|
No HTML content captured.
|
|
2050
|
-
</react_native_1.Text>)) : htmlSubTab === 'css' ? (webViewCss ? (<CodeSnippet_1.default code={webViewCss} language="css"/>) : (<react_native_1.Text style={{
|
|
2981
|
+
</react_native_1.Text>)) : htmlSubTab === 'css' ? (webViewCss ? (<CodeSnippet_1.default code={webViewCss} language="css" search={getSearchTermForTab()}/>) : (<react_native_1.Text style={{
|
|
2051
2982
|
fontFamily: 'monospace',
|
|
2052
2983
|
fontSize: 11,
|
|
2053
2984
|
color: '#94A3B8',
|
|
2054
2985
|
padding: 12,
|
|
2055
2986
|
}}>
|
|
2056
2987
|
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={{
|
|
2988
|
+
</react_native_1.Text>)) : webViewJs ? (<CodeSnippet_1.default code={webViewJs} language="javascript" search={getSearchTermForTab()}/>) : (<react_native_1.Text style={{
|
|
2058
2989
|
fontFamily: 'monospace',
|
|
2059
2990
|
fontSize: 11,
|
|
2060
2991
|
color: '#94A3B8',
|
|
@@ -2075,7 +3006,7 @@ const NetworkInspector = () => {
|
|
|
2075
3006
|
or Javascript source.
|
|
2076
3007
|
</react_native_1.Text>
|
|
2077
3008
|
</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={{
|
|
3009
|
+
</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
3010
|
paddingHorizontal: 16,
|
|
2080
3011
|
paddingTop: 12,
|
|
2081
3012
|
paddingBottom: 8,
|
|
@@ -2090,191 +3021,304 @@ const NetworkInspector = () => {
|
|
|
2090
3021
|
return `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`;
|
|
2091
3022
|
};
|
|
2092
3023
|
return (<react_native_1.View style={{
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
3024
|
+
marginHorizontal: 16,
|
|
3025
|
+
marginVertical: 6,
|
|
3026
|
+
borderRadius: 12,
|
|
3027
|
+
borderWidth: 1,
|
|
3028
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
3029
|
+
backgroundColor: isLatest ? AppColors_1.AppColors.purpleShade50 : AppColors_1.AppColors.primaryLight,
|
|
3030
|
+
padding: 14,
|
|
2098
3031
|
flexDirection: 'row',
|
|
2099
3032
|
alignItems: 'center',
|
|
2100
3033
|
justifyContent: 'space-between',
|
|
2101
3034
|
gap: 12,
|
|
3035
|
+
shadowColor: '#000000',
|
|
3036
|
+
shadowOffset: { width: 0, height: 2 },
|
|
3037
|
+
shadowOpacity: isDark ? 0.2 : 0.04,
|
|
3038
|
+
shadowRadius: 4,
|
|
3039
|
+
elevation: 2,
|
|
2102
3040
|
}}>
|
|
2103
|
-
<react_native_1.View style={{ flex: 1, gap:
|
|
3041
|
+
<react_native_1.View style={{ flex: 1, gap: 8 }}>
|
|
3042
|
+
{/* Top row: Title and Badge */}
|
|
2104
3043
|
<react_native_1.View style={{
|
|
2105
3044
|
flexDirection: 'row',
|
|
2106
3045
|
alignItems: 'center',
|
|
2107
|
-
gap:
|
|
3046
|
+
gap: 8,
|
|
2108
3047
|
flexWrap: 'wrap',
|
|
2109
3048
|
}}>
|
|
2110
3049
|
<react_native_1.Text numberOfLines={1} ellipsizeMode="tail" style={{
|
|
2111
3050
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2112
|
-
fontSize:
|
|
2113
|
-
color:
|
|
3051
|
+
fontSize: 14,
|
|
3052
|
+
color: AppColors_1.AppColors.primaryBlack,
|
|
2114
3053
|
flexShrink: 1,
|
|
2115
3054
|
}}>
|
|
2116
3055
|
{item.title || 'Untitled Page'}
|
|
2117
3056
|
</react_native_1.Text>
|
|
2118
3057
|
{isLatest && (<react_native_1.View style={{
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
3058
|
+
flexDirection: 'row',
|
|
3059
|
+
alignItems: 'center',
|
|
3060
|
+
gap: 4,
|
|
3061
|
+
backgroundColor: AppColors_1.AppColors.greenStatus,
|
|
3062
|
+
paddingHorizontal: 8,
|
|
3063
|
+
paddingVertical: 3,
|
|
3064
|
+
borderRadius: 12,
|
|
2123
3065
|
}}>
|
|
3066
|
+
<react_native_1.View style={{
|
|
3067
|
+
width: 6,
|
|
3068
|
+
height: 6,
|
|
3069
|
+
borderRadius: 3,
|
|
3070
|
+
backgroundColor: AppColors_1.AppColors.greenBaggageText,
|
|
3071
|
+
}}/>
|
|
2124
3072
|
<react_native_1.Text style={{
|
|
2125
3073
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2126
|
-
fontSize: 9,
|
|
2127
|
-
color:
|
|
3074
|
+
fontSize: 9.5,
|
|
3075
|
+
color: AppColors_1.AppColors.greenBaggageText,
|
|
2128
3076
|
}}>
|
|
2129
3077
|
Active
|
|
2130
3078
|
</react_native_1.Text>
|
|
2131
3079
|
</react_native_1.View>)}
|
|
2132
3080
|
</react_native_1.View>
|
|
2133
|
-
|
|
3081
|
+
|
|
3082
|
+
{/* Middle row: URL with Globe Icon */}
|
|
3083
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
3084
|
+
<NetworkIcons_1.GlobeIcon size={12} color={AppColors_1.AppColors.grayTextWeak}/>
|
|
3085
|
+
<HighlightText_1.default text={item.url} search={webViewSearch} numberOfLines={2} ellipsizeMode="tail" style={{
|
|
2134
3086
|
fontFamily: AppFonts_1.AppFonts.interRegular,
|
|
2135
|
-
fontSize:
|
|
2136
|
-
color:
|
|
2137
|
-
|
|
3087
|
+
fontSize: 12,
|
|
3088
|
+
color: AppColors_1.AppColors.grayText,
|
|
3089
|
+
flex: 1,
|
|
2138
3090
|
}} highlightStyle={styles_1.default.highlight} detectLinks={true}/>
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
{
|
|
2145
|
-
|
|
3091
|
+
</react_native_1.View>
|
|
3092
|
+
|
|
3093
|
+
{/* Bottom row: Time */}
|
|
3094
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
3095
|
+
<NetworkIcons_1.ClockIcon size={11} color={AppColors_1.AppColors.grayTextWeak}/>
|
|
3096
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 11, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
3097
|
+
{formatNavTime(item.timestamp)}
|
|
3098
|
+
</react_native_1.Text>
|
|
3099
|
+
</react_native_1.View>
|
|
2146
3100
|
</react_native_1.View>
|
|
2147
|
-
<CopyButton_1.default value={item.url} label="
|
|
3101
|
+
<CopyButton_1.default value={item.url} label="URL"/>
|
|
2148
3102
|
</react_native_1.View>);
|
|
2149
|
-
}} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState_1.default isSearch={
|
|
3103
|
+
}} initialNumToRender={15} maxToRenderPerBatch={15} windowSize={7} removeClippedSubviews={true} ListEmptyComponent={<EmptyState_1.default isSearch={webViewSearch.length > 0}/>} contentContainerStyle={[
|
|
2150
3104
|
styles_1.default.listContent,
|
|
2151
3105
|
filteredNavHistory.length === 0 && { flexGrow: 1 },
|
|
2152
|
-
]} keyboardShouldPersistTaps="handled"/>)}
|
|
2153
|
-
|
|
3106
|
+
]} keyboardShouldPersistTaps="handled"/>) : webViewSubTab === 'console' ? (<react_native_1.View style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }}>
|
|
3107
|
+
{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' }}>
|
|
3108
|
+
<react_native_1.Text style={styles_1.default.resultCount}>
|
|
3109
|
+
Console Logs ({webViewLogs.length})
|
|
3110
|
+
</react_native_1.Text>
|
|
3111
|
+
<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 }}>
|
|
3112
|
+
<NetworkIcons_1.TrashIcon color={AppColors_1.AppColors.errorColor} size={14}/>
|
|
3113
|
+
</TouchableScale_1.default>
|
|
3114
|
+
</react_native_1.View>} renderItem={({ item }) => {
|
|
3115
|
+
const logColor = item.type === 'error' ? AppColors_1.AppColors.errorColor :
|
|
3116
|
+
item.type === 'warn' ? AppColors_1.AppColors.warningIconGold :
|
|
3117
|
+
item.type === 'info' ? AppColors_1.AppColors.skyBlue :
|
|
3118
|
+
AppColors_1.AppColors.grayTextWeak;
|
|
3119
|
+
const bgColor = item.type === 'error' ? 'rgba(255, 46, 87, 0.06)' :
|
|
3120
|
+
item.type === 'warn' ? 'rgba(191, 162, 82, 0.08)' :
|
|
3121
|
+
AppColors_1.AppColors.primaryLight;
|
|
3122
|
+
const d = new Date(item.timestamp);
|
|
3123
|
+
const timeStr = `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}:${String(d.getSeconds()).padStart(2, '0')}`;
|
|
3124
|
+
return (<react_native_1.View style={{
|
|
3125
|
+
marginHorizontal: 12,
|
|
3126
|
+
marginVertical: 3,
|
|
3127
|
+
borderRadius: 8,
|
|
3128
|
+
borderWidth: 1,
|
|
3129
|
+
borderColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
3130
|
+
borderLeftWidth: 3,
|
|
3131
|
+
borderLeftColor: logColor,
|
|
3132
|
+
backgroundColor: bgColor,
|
|
3133
|
+
padding: 10,
|
|
3134
|
+
flexDirection: 'row',
|
|
3135
|
+
gap: 8,
|
|
3136
|
+
alignItems: 'flex-start',
|
|
3137
|
+
}}>
|
|
3138
|
+
<react_native_1.View style={{ paddingTop: 1 }}>
|
|
3139
|
+
<NetworkIcons_1.TerminalIcon color={logColor} size={11}/>
|
|
3140
|
+
</react_native_1.View>
|
|
3141
|
+
<react_native_1.View style={{ flex: 1, gap: 3 }}>
|
|
3142
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
3143
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 10, color: logColor, textTransform: 'uppercase', letterSpacing: 0.5 }}>
|
|
3144
|
+
{item.type}
|
|
3145
|
+
</react_native_1.Text>
|
|
3146
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
3147
|
+
{timeStr}
|
|
3148
|
+
</react_native_1.Text>
|
|
3149
|
+
</react_native_1.View>
|
|
3150
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 12, color: AppColors_1.AppColors.primaryBlack, lineHeight: 16 }}>
|
|
3151
|
+
{item.message}
|
|
3152
|
+
</react_native_1.Text>
|
|
3153
|
+
</react_native_1.View>
|
|
3154
|
+
</react_native_1.View>);
|
|
3155
|
+
}} 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}>
|
|
3156
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
3157
|
+
<NetworkIcons_1.TerminalIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
3158
|
+
</react_native_1.View>
|
|
3159
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>No Console Logs</react_native_1.Text>
|
|
3160
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
3161
|
+
Console logs from the WebView will appear here.
|
|
3162
|
+
</react_native_1.Text>
|
|
3163
|
+
</react_native_1.View>)}
|
|
3164
|
+
</react_native_1.View>) : (<react_native_1.View style={{ flex: 1, backgroundColor: AppColors_1.AppColors.grayBackground }}>
|
|
3165
|
+
{webViewHtml ? (OriginalWebView ? (<OriginalWebView source={{ html: webViewHtml, baseUrl: webViewHtmlUrl }} injectedJavaScript={previewInspectScript} onMessage={(event) => {
|
|
3166
|
+
try {
|
|
3167
|
+
const data = JSON.parse(event.nativeEvent.data);
|
|
3168
|
+
if (data.type === 'preview-inspect') {
|
|
3169
|
+
setInspectedElement({
|
|
3170
|
+
tagName: data.tagName,
|
|
3171
|
+
id: data.id,
|
|
3172
|
+
className: data.className,
|
|
3173
|
+
searchStr: data.searchStr,
|
|
3174
|
+
});
|
|
3175
|
+
setWebViewSubTab('html');
|
|
3176
|
+
setHtmlSubTab('html');
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3179
|
+
catch (err) { }
|
|
3180
|
+
}} style={{ flex: 1 }}/>) : (<react_native_1.View style={{ flex: 1, justifyContent: 'center', alignItems: 'center', padding: 20 }}>
|
|
3181
|
+
<react_native_1.Text style={{ color: AppColors_1.AppColors.grayText, textAlign: 'center', fontFamily: AppFonts_1.AppFonts.interMedium }}>
|
|
3182
|
+
react-native-webview is not installed in the target project. Install it to enable Preview mode.
|
|
3183
|
+
</react_native_1.Text>
|
|
3184
|
+
</react_native_1.View>)) : (<react_native_1.View style={styles_1.default.emptyContainer}>
|
|
3185
|
+
<react_native_1.View style={styles_1.default.emptyIconWrap}>
|
|
3186
|
+
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.purple} size={32}/>
|
|
3187
|
+
</react_native_1.View>
|
|
3188
|
+
<react_native_1.Text style={styles_1.default.emptyTitle}>
|
|
3189
|
+
No Preview Available
|
|
3190
|
+
</react_native_1.Text>
|
|
3191
|
+
<react_native_1.Text style={styles_1.default.emptySub}>
|
|
3192
|
+
Load a page in the WebView to see its visual preview.
|
|
3193
|
+
</react_native_1.Text>
|
|
3194
|
+
</react_native_1.View>)}
|
|
3195
|
+
</react_native_1.View>)}
|
|
3196
|
+
</react_native_1.View>)) : activeTab === 'redux' ? (renderReduxTab()) : (<react_native_1.View style={{ flex: 1 }}>
|
|
2154
3197
|
{/* Non-scrollable details header */}
|
|
2155
3198
|
<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
|
-
|
|
3199
|
+
<react_native_1.View style={styles_1.default.detailInfoBar}>
|
|
3200
|
+
{(() => {
|
|
3201
|
+
let hostStr = '';
|
|
3202
|
+
let pathStr = detailDisplayUrl;
|
|
3203
|
+
let queryStr = '';
|
|
3204
|
+
try {
|
|
3205
|
+
// Simple parsing fallback for React Native environments
|
|
3206
|
+
const qIndex = detailDisplayUrl.indexOf('?');
|
|
3207
|
+
let cleanUrlForParsing = detailDisplayUrl;
|
|
3208
|
+
if (qIndex !== -1) {
|
|
3209
|
+
pathStr = detailDisplayUrl.substring(0, qIndex);
|
|
3210
|
+
queryStr = detailDisplayUrl.substring(qIndex);
|
|
3211
|
+
cleanUrlForParsing = pathStr;
|
|
3212
|
+
}
|
|
3213
|
+
const schemeIndex = cleanUrlForParsing.indexOf('://');
|
|
3214
|
+
if (schemeIndex !== -1) {
|
|
3215
|
+
const withoutScheme = cleanUrlForParsing.substring(schemeIndex + 3);
|
|
3216
|
+
const firstSlash = withoutScheme.indexOf('/');
|
|
3217
|
+
if (firstSlash !== -1) {
|
|
3218
|
+
hostStr = withoutScheme.substring(0, firstSlash);
|
|
3219
|
+
pathStr = withoutScheme.substring(firstSlash);
|
|
3220
|
+
}
|
|
3221
|
+
else {
|
|
3222
|
+
hostStr = withoutScheme;
|
|
3223
|
+
pathStr = '/';
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
}
|
|
3227
|
+
catch (e) { }
|
|
3228
|
+
return (<>
|
|
3229
|
+
<react_native_1.View style={styles_1.default.detailInfoTop}>
|
|
3230
|
+
<react_native_1.View style={{
|
|
2175
3231
|
flexDirection: 'row',
|
|
2176
3232
|
alignItems: 'center',
|
|
2177
|
-
gap:
|
|
3233
|
+
gap: 8,
|
|
2178
3234
|
}}>
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
3235
|
+
<react_native_1.View style={[
|
|
3236
|
+
styles_1.default.methodBadge,
|
|
3237
|
+
{
|
|
3238
|
+
backgroundColor: `${constants_1.METHOD_COLORS[selected.method] ??
|
|
3239
|
+
constants_1.METHOD_COLORS.ALL}15`,
|
|
3240
|
+
},
|
|
3241
|
+
]}>
|
|
3242
|
+
<react_native_1.Text style={[
|
|
3243
|
+
styles_1.default.methodBadgeText,
|
|
3244
|
+
{
|
|
3245
|
+
color: constants_1.METHOD_COLORS[selected.method] ??
|
|
3246
|
+
constants_1.METHOD_COLORS.ALL,
|
|
3247
|
+
},
|
|
3248
|
+
]}>
|
|
3249
|
+
{selected.method}
|
|
3250
|
+
</react_native_1.Text>
|
|
3251
|
+
</react_native_1.View>
|
|
3252
|
+
|
|
3253
|
+
{selected.status != null && (<react_native_1.View style={[
|
|
3254
|
+
styles_1.default.chip,
|
|
3255
|
+
{
|
|
3256
|
+
backgroundColor: selected.status === 0
|
|
3257
|
+
? `${AppColors_1.AppColors.errorColor}15`
|
|
3258
|
+
: `${(0, helpers_1.getStatusColor)(selected.status)}15`,
|
|
3259
|
+
borderColor: selected.status === 0
|
|
3260
|
+
? `${AppColors_1.AppColors.errorColor}40`
|
|
3261
|
+
: `${(0, helpers_1.getStatusColor)(selected.status)}40`,
|
|
3262
|
+
},
|
|
3263
|
+
]}>
|
|
3264
|
+
{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">
|
|
3265
|
+
<react_native_svg_1.Circle cx="5" cy="5" r="5" fill={(0, helpers_1.getStatusColor)(selected.status)}/>
|
|
3266
|
+
</react_native_svg_1.default>)}
|
|
3267
|
+
<react_native_1.Text style={[
|
|
3268
|
+
styles_1.default.chipText,
|
|
3269
|
+
{
|
|
3270
|
+
color: selected.status === 0
|
|
3271
|
+
? AppColors_1.AppColors.errorColor
|
|
3272
|
+
: (0, helpers_1.getStatusColor)(selected.status),
|
|
3273
|
+
},
|
|
3274
|
+
]}>
|
|
3275
|
+
{selected.status === 0
|
|
3276
|
+
? 'Failed'
|
|
3277
|
+
: String(selected.status)}
|
|
2202
3278
|
</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
|
-
})()}
|
|
3279
|
+
</react_native_1.View>)}
|
|
2209
3280
|
|
|
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>
|
|
3281
|
+
{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)' }]}>
|
|
3282
|
+
<react_native_1.Text style={[styles_1.default.chipText, { color: AppColors_1.AppColors.purple }]}>
|
|
3283
|
+
{selected.duration}ms
|
|
3284
|
+
</react_native_1.Text>
|
|
3285
|
+
</react_native_1.View>)}
|
|
3286
|
+
</react_native_1.View>
|
|
3287
|
+
<react_native_1.View style={styles_1.default.detailInfoRight}>
|
|
3288
|
+
<TouchableScale_1.default style={styles_1.default.iconSquareBtn} onPress={() => react_native_1.Linking.openURL(detailDisplayUrl)} hitSlop={12}>
|
|
3289
|
+
<NetworkIcons_1.GlobeIcon color={AppColors_1.AppColors.grayTextWeak} size={14}/>
|
|
3290
|
+
</TouchableScale_1.default>
|
|
3291
|
+
<CopyButton_1.default value={(0, helpers_1.getFetchCommand)(selected)} label="fetch()" iconType="fetch"/>
|
|
3292
|
+
<CopyButton_1.default value={(0, helpers_1.getCurlCommand)(selected)} label="cURL" iconType="terminal"/>
|
|
3293
|
+
<CopyButton_1.default value={detailDisplayUrl} label="URL"/>
|
|
3294
|
+
</react_native_1.View>
|
|
3295
|
+
</react_native_1.View>
|
|
2234
3296
|
|
|
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)}
|
|
3297
|
+
<react_native_1.Pressable style={{
|
|
3298
|
+
backgroundColor: AppColors_1.AppColors.grayBackground,
|
|
3299
|
+
borderRadius: 10,
|
|
3300
|
+
borderWidth: 1,
|
|
3301
|
+
borderColor: AppColors_1.AppColors.dividerColor,
|
|
3302
|
+
padding: 10,
|
|
3303
|
+
marginTop: 6,
|
|
3304
|
+
}} onPress={() => react_native_1.Linking.openURL(detailDisplayUrl)}>
|
|
3305
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', marginBottom: 2 }}>
|
|
3306
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interMedium, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak, flex: 1 }} numberOfLines={1}>
|
|
3307
|
+
{hostStr || 'API Endpoint'}
|
|
3308
|
+
</react_native_1.Text>
|
|
3309
|
+
{queryStr ? (<react_native_1.View style={{ backgroundColor: 'rgba(104,75,155,0.08)', paddingHorizontal: 5, paddingVertical: 1, borderRadius: 4 }}>
|
|
3310
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 8.5, color: AppColors_1.AppColors.purple }}>Query Params</react_native_1.Text>
|
|
3311
|
+
</react_native_1.View>) : null}
|
|
3312
|
+
</react_native_1.View>
|
|
3313
|
+
<react_native_1.Text selectable={true} style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 12, color: AppColors_1.AppColors.primaryBlack, marginTop: 2 }} numberOfLines={2}>
|
|
3314
|
+
{pathStr}
|
|
2260
3315
|
</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>
|
|
3316
|
+
{queryStr ? (<react_native_1.Text selectable={true} style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 10, color: AppColors_1.AppColors.grayTextWeak, marginTop: 4 }} numberOfLines={1}>
|
|
3317
|
+
{queryStr}
|
|
3318
|
+
</react_native_1.Text>) : null}
|
|
3319
|
+
</react_native_1.Pressable>
|
|
3320
|
+
</>);
|
|
3321
|
+
})()}
|
|
2278
3322
|
</react_native_1.View>
|
|
2279
3323
|
</react_native_1.View>
|
|
2280
3324
|
|
|
@@ -2303,16 +3347,30 @@ const NetworkInspector = () => {
|
|
|
2303
3347
|
return 'Request';
|
|
2304
3348
|
return 'Response';
|
|
2305
3349
|
};
|
|
3350
|
+
const getIcon = () => {
|
|
3351
|
+
const iconColor = isActive ? '#FFFFFF' : AppColors_1.AppColors.grayText;
|
|
3352
|
+
if (tab === 'metadata')
|
|
3353
|
+
return <NetworkIcons_1.StatusIcon color={iconColor}/>;
|
|
3354
|
+
if (tab === 'headers')
|
|
3355
|
+
return <NetworkIcons_1.HeadersIcon color={iconColor}/>;
|
|
3356
|
+
if (tab === 'request')
|
|
3357
|
+
return <NetworkIcons_1.RequestIcon color={iconColor}/>;
|
|
3358
|
+
return <NetworkIcons_1.ResponseIcon color={iconColor}/>;
|
|
3359
|
+
};
|
|
2306
3360
|
return (<react_native_1.TouchableOpacity key={tab} onPress={() => setApiDetailActiveTab(tab)} style={{
|
|
2307
3361
|
flex: 1,
|
|
2308
3362
|
paddingVertical: 6,
|
|
3363
|
+
flexDirection: 'row',
|
|
2309
3364
|
alignItems: 'center',
|
|
3365
|
+
justifyContent: 'center',
|
|
2310
3366
|
borderRadius: 8,
|
|
2311
3367
|
backgroundColor: isActive ? AppColors_1.AppColors.purple : 'transparent',
|
|
3368
|
+
gap: 4,
|
|
2312
3369
|
}}>
|
|
3370
|
+
{getIcon()}
|
|
2313
3371
|
<react_native_1.Text style={{
|
|
2314
3372
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
2315
|
-
fontSize:
|
|
3373
|
+
fontSize: 10,
|
|
2316
3374
|
color: isActive ? '#FFFFFF' : AppColors_1.AppColors.grayText,
|
|
2317
3375
|
}}>
|
|
2318
3376
|
{getLabel()}
|
|
@@ -2324,7 +3382,8 @@ const NetworkInspector = () => {
|
|
|
2324
3382
|
{/* Scrollable Tab Content */}
|
|
2325
3383
|
<react_native_1.ScrollView style={styles_1.default.detailScroll} contentContainerStyle={{ paddingHorizontal: 6, paddingBottom: 24 }} showsVerticalScrollIndicator={true}>
|
|
2326
3384
|
{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)}
|
|
3385
|
+
<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'] ||
|
|
3386
|
+
selected.responseHeaders?.['Content-Type']} url={selected.url}/>
|
|
2328
3387
|
|
|
2329
3388
|
{(() => {
|
|
2330
3389
|
const routeInfo = logRouteMapRef.current.get(selected.id);
|
|
@@ -2408,6 +3467,10 @@ const NetworkInspector = () => {
|
|
|
2408
3467
|
Loading logs...
|
|
2409
3468
|
</react_native_1.Text>
|
|
2410
3469
|
</react_native_1.View>)}
|
|
3470
|
+
|
|
3471
|
+
{settingsPage !== null && (<react_native_1.View style={[react_native_1.StyleSheet.absoluteFill, { backgroundColor: AppColors_1.AppColors.grayBackground, zIndex: 99999 }]}>
|
|
3472
|
+
{renderSettings()}
|
|
3473
|
+
</react_native_1.View>)}
|
|
2411
3474
|
</react_native_1.View>
|
|
2412
3475
|
</react_native_1.View>
|
|
2413
3476
|
</ErrorBoundary_1.default>)}
|