Skip to content

Commit 3c063eb

Browse files
cmcWebCode40claude
andcommitted
feat: enhance overlay UI with theming, filtering, and export capabilities
Update NetworkLoggerOverlay with light/dark theme toggle, status filter chips (2xx/3xx/4xx/5xx/Errors), log statistics, export modal integration, and production mode warning. Improve NetworkLogItem with themed styles and slow request indicators. Add theme support to FloatingButton and NonFloatingButton components. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 933442b commit 3c063eb

4 files changed

Lines changed: 726 additions & 286 deletions

File tree

src/FloatingButton.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
import React, { useEffect } from 'react';
99
import Icon from './Icon';
1010
import NonFloatingButton from './NonFloatingButton';
11+
import { colors } from './constants/colors';
1112
const { width: screenWidth, height: screenHeight } = Dimensions.get('window');
1213

1314
let Animated: any = null;
@@ -51,6 +52,7 @@ interface FloatingButtonProps {
5152
openModal: () => void;
5253
hideIcon: () => void;
5354
logsLength: number;
55+
errorCount?: number;
5456
draggable?: boolean;
5557
enableDeviceShake?: boolean;
5658
}
@@ -59,6 +61,7 @@ const AnimatedFloatingButton: React.FC<FloatingButtonProps> = ({
5961
hideIcon,
6062
openModal,
6163
logsLength,
64+
errorCount = 0,
6265
enableDeviceShake,
6366
}) => {
6467
const positionX = useSharedValue(screenWidth - BUTTON_SIZE - PADDING);
@@ -130,6 +133,13 @@ const AnimatedFloatingButton: React.FC<FloatingButtonProps> = ({
130133
style={styles.buttonTouchable}
131134
>
132135
<Text style={styles.floatingButtonText}>📊 {logsLength}</Text>
136+
{errorCount > 0 && (
137+
<View style={styles.errorBadge}>
138+
<Text style={styles.errorBadgeText}>
139+
{errorCount > 99 ? '99+' : errorCount}
140+
</Text>
141+
</View>
142+
)}
133143
</TouchableOpacity>
134144
</Animated.View>
135145
</GestureDetector>
@@ -215,6 +225,25 @@ const styles = StyleSheet.create({
215225
fontSize: 14,
216226
fontWeight: 'bold',
217227
},
228+
errorBadge: {
229+
position: 'absolute',
230+
top: -4,
231+
right: -4,
232+
backgroundColor: colors.error,
233+
borderRadius: 10,
234+
minWidth: 20,
235+
height: 20,
236+
justifyContent: 'center',
237+
alignItems: 'center',
238+
paddingHorizontal: 4,
239+
borderWidth: 2,
240+
borderColor: '#fff',
241+
},
242+
errorBadgeText: {
243+
color: '#fff',
244+
fontSize: 10,
245+
fontWeight: 'bold',
246+
},
218247
});
219248

220249
export default FloatingButton;

0 commit comments

Comments
 (0)