mirror of
https://github.com/mudabbir-ahmad/Media-Aggregation-and-Sorting-System.git
synced 2026-10-08 03:40:20 +00:00
added service health indicators for Google Photos, iCloud, and NAS; implemented health check logic in settings and onboarding screens
This commit is contained in:
1 parent
6f4ec66e2e
commit
9519b32d68
3 files changed
+242
-39
No files matched your search
@@ -0,0 +1,41 @@
|
||||
import React from 'react';
|
||||
import { View, StyleSheet } from 'react-native';
|
||||
|
||||
/**
|
||||
* Circular health indicator dot
|
||||
*
|
||||
* status values:
|
||||
* 'inactive' → grey (not used / not connected)
|
||||
* 'healthy' → green (connected and working)
|
||||
* 'error' → red (connected but errors fetching data)
|
||||
* 'checking' → amber (currently checking)
|
||||
*/
|
||||
const COLORS = {
|
||||
inactive: '#9e9e9e',
|
||||
healthy: '#34a853',
|
||||
error: '#d93025',
|
||||
checking: '#fbbc04',
|
||||
};
|
||||
|
||||
const ServiceHealthIndicator = ({ status = 'inactive', size = 10 }) => (
|
||||
<View
|
||||
style={[
|
||||
styles.dot,
|
||||
{
|
||||
width: size,
|
||||
height: size,
|
||||
borderRadius: size / 2,
|
||||
backgroundColor: COLORS[status] || COLORS.inactive,
|
||||
},
|
||||
]}
|
||||
/>
|
||||
);
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
dot: {
|
||||
marginRight: 8,
|
||||
},
|
||||
});
|
||||
|
||||
export default ServiceHealthIndicator;
|
||||
|
||||
Reference in new issue
Block a user