Updated 4 checks on scannedDataBox
@@ -1,4 +1,4 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.safeqr.safeqr">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
|
||||||
<uses-permission android:name="android.permission.CAMERA"/>
|
<uses-permission android:name="android.permission.CAMERA"/>
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
|
||||||
@@ -14,11 +14,9 @@
|
|||||||
</intent>
|
</intent>
|
||||||
</queries>
|
</queries>
|
||||||
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:allowBackup="true" android:theme="@style/AppTheme">
|
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:allowBackup="true" android:theme="@style/AppTheme">
|
||||||
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
|
<meta-data android:name="expo.modules.updates.ENABLED" android:value="false"/>
|
||||||
<meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="51.0.0"/>
|
|
||||||
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
|
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
|
||||||
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
|
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
|
||||||
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@piggyinu/safeqr"/>
|
|
||||||
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true" android:screenOrientation="portrait">
|
<activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:exported="true" android:screenOrientation="portrait">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 120 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 49 KiB |
@@ -5,7 +5,6 @@
|
|||||||
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
|
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
|
||||||
<item name="colorPrimary">@color/colorPrimary</item>
|
<item name="colorPrimary">@color/colorPrimary</item>
|
||||||
<item name="android:statusBarColor">#ffffff</item>
|
<item name="android:statusBarColor">#ffffff</item>
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
|
||||||
</style>
|
</style>
|
||||||
<style name="ResetEditText" parent="@android:style/Widget.EditText">
|
<style name="ResetEditText" parent="@android:style/Widget.EditText">
|
||||||
<item name="android:padding">0dp</item>
|
<item name="android:padding">0dp</item>
|
||||||
|
|||||||
@@ -58,5 +58,4 @@ EX_DEV_CLIENT_NETWORK_INSPECTOR=true
|
|||||||
# Use legacy packaging to compress native libraries in the resulting APK.
|
# Use legacy packaging to compress native libraries in the resulting APK.
|
||||||
expo.useLegacyPackaging=false
|
expo.useLegacyPackaging=false
|
||||||
|
|
||||||
expo.jsEngine=jsc
|
|
||||||
VisionCamera_enableCodeScanner=true
|
VisionCamera_enableCodeScanner=true
|
||||||
@@ -8,11 +8,6 @@ import { startActivityAsync, ActivityAction } from 'expo-intent-launcher';
|
|||||||
import * as Linking from 'expo-linking';
|
import * as Linking from 'expo-linking';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const { width: screenWidth, height: screenHeight } = Dimensions.get('window');
|
const { width: screenWidth, height: screenHeight } = Dimensions.get('window');
|
||||||
|
|
||||||
interface ScannedDataBoxProps {
|
interface ScannedDataBoxProps {
|
||||||
@@ -29,6 +24,8 @@ const ScannedDataBox: React.FC<ScannedDataBoxProps> = ({ qrCodeId, clearScanData
|
|||||||
const [webViewUrl, setWebViewUrl] = useState('');
|
const [webViewUrl, setWebViewUrl] = useState('');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchQRDetails = async () => {
|
const fetchQRDetails = async () => {
|
||||||
try {
|
try {
|
||||||
@@ -53,77 +50,81 @@ const ScannedDataBox: React.FC<ScannedDataBoxProps> = ({ qrCodeId, clearScanData
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const data = qrDetails.data || {};
|
const data = qrDetails.data || {};
|
||||||
const details = qrDetails.details || {};
|
const details = qrDetails.details || {};
|
||||||
const type = data.info?.type || 'Undefined';
|
const type = data.info?.type || 'Undefined';
|
||||||
|
const description = data.info?.description || 'Undefined';
|
||||||
|
|
||||||
const contents = data.contents || 'Undefined';
|
const contents = data.contents || 'Undefined';
|
||||||
const result = data.result || 'Unknown';
|
const result = data.result || 'Unknown';
|
||||||
const ssid = details.ssid || 'Undefined';
|
const ssid = details.ssid || 'Undefined';
|
||||||
const encryption = details.encryption || 'NO';
|
const encryption = details.encryption || 'NO';
|
||||||
const hidden = details.hidden ? 'Hidden' : 'Visible';
|
const hidden = details.hidden ? 'Hidden' : 'Visible';
|
||||||
|
|
||||||
|
const isShorteningService = details.shorteningService === 'Yes';
|
||||||
|
|
||||||
|
|
||||||
// Function to get security text and icon based on the URL description
|
// Function to get security text and icon based on the URL description
|
||||||
const getSecurityStatus = () => {
|
const getSecurityStatus = () => {
|
||||||
if (data.info?.description === "Secure Uniform Resource Locator") {
|
if (data.info?.description === "Secure Uniform Resource Locator") {
|
||||||
return {
|
return {
|
||||||
text: 'Secure Connection',
|
text: 'Secure Connection',
|
||||||
icon: <Ionicons name="shield-checkmark" size={screenWidth * 0.045} color="#44c167" />
|
icon: <Ionicons name="shield-checkmark" size={screenWidth * 0.045} color="#44c167" />
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
text: 'Not Secure',
|
text: 'Not Secure',
|
||||||
icon: <SimpleLineIcons name="shield" size={screenWidth * 0.045} color="#ff0000" />
|
icon: <SimpleLineIcons name="shield" size={screenWidth * 0.045} color="#ff0000" />
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const { text: securityText, icon: securityIcon } = getSecurityStatus();
|
const { text: securityText, icon: securityIcon } = getSecurityStatus();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Function to get result text and color based on the security status
|
// Function to get result text and color based on the security status
|
||||||
const getResultStatus = () => {
|
const getResultStatus = () => {
|
||||||
if (result === 'UNSAFE') {
|
if (result === 'UNSAFE') {
|
||||||
return { text: 'UNSAFE', color: '#ff0000' }; // Red
|
return { text: 'UNSAFE', color: '#ff0000' }; // Red
|
||||||
} else if (result === 'SAFE') {
|
} else if (result === 'SAFE') {
|
||||||
return { text: 'SAFE', color: '#44c167' }; // Green
|
return { text: 'SAFE', color: '#44c167' }; // Green
|
||||||
} else if (result === 'WARNING') {
|
} else if (result === 'WARNING') {
|
||||||
return { text: 'WARNING', color: '#ffa500' }; // Orange
|
return { text: 'WARNING', color: '#ffa500' }; // Orange
|
||||||
} else if (result === '') {
|
} else if (result === '') {
|
||||||
return { text: 'UNKNOWN', color: '#000000' }; // Black for unknown
|
return { text: 'UNKNOWN', color: '#000000' }; // Black for unknown
|
||||||
} else {
|
} else {
|
||||||
return { text: 'UNKNOWN', color: '#000000' }; // Default to Black for unknown
|
return { text: 'UNKNOWN', color: '#000000' }; // Default to Black for unknown
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const { text: resultText, color: resultColor } = getResultStatus();
|
const { text: resultText, color: resultColor } = getResultStatus();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Function to determine security header status
|
// Function to determine security header status
|
||||||
const getSecurityHeaderStatus = (headers) => {
|
const getSecurityHeaderStatus = (headers) => {
|
||||||
const filteredHeaders = headers.filter(
|
const filteredHeaders = headers.filter(
|
||||||
(header) => header !== "Not an HTTPS connection" && header !== "No HSTS Header detected"
|
(header) => header !== "Not an HTTPS connection" && header !== "No HSTS Header detected"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (filteredHeaders.length > 0) {
|
if (filteredHeaders.length > 0) {
|
||||||
return { text: 'Security Headers', color: '#44c167', hasHeaders: true }; // Green with headers
|
return { text: 'Security Headers', color: '#44c167', hasHeaders: true }; // Green with headers
|
||||||
} else {
|
} else {
|
||||||
return { text: 'No Security Headers', color: '#ffa500', hasHeaders: false }; // Orange without headers
|
return { text: 'No Security Headers', color: '#ffa500', hasHeaders: false }; // Orange without headers
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const securityHeaderStatus = getSecurityHeaderStatus(details.hstsHeader || []);
|
const securityHeaderStatus = getSecurityHeaderStatus(details.hstsHeader || []);
|
||||||
|
|
||||||
const getRedirectStatus = (redirectCount: number) => {
|
const getRedirectStatus = (redirectCount: number) => {
|
||||||
if (redirectCount === 0) {
|
if (redirectCount === 0) {
|
||||||
return { text: 'No Redirects', color: '#44c167', hasRedirects: false }; // Green with no redirects
|
return { text: 'No Redirects', color: '#44c167', hasRedirects: false }; // Green with no redirects
|
||||||
} else {
|
} else {
|
||||||
return { text: 'Redirects', color: '#ff0000', hasRedirects: true }; // Red with redirects
|
return { text: 'Redirects', color: '#ff0000', hasRedirects: true }; // Red with redirects
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const redirectStatus = getRedirectStatus(details.redirect || 0);
|
const redirectStatus = getRedirectStatus(details.redirect || 0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -136,32 +137,32 @@ const redirectStatus = getRedirectStatus(details.redirect || 0);
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Function to get encryption status and icon
|
// Function to get encryption status and icon
|
||||||
const getEncryptionStatus = (encryption) => {
|
const getEncryptionStatus = (encryption) => {
|
||||||
if (encryption === 'NO') {
|
if (encryption === 'NO') {
|
||||||
return {
|
return {
|
||||||
text: 'No Encryption',
|
text: 'No Encryption',
|
||||||
icon: <Ionicons name="shield" size={screenWidth * 0.045} color="#ff0000" /> // Red
|
icon: <Ionicons name="shield" size={screenWidth * 0.045} color="#ff0000" /> // Red
|
||||||
};
|
};
|
||||||
} else if (encryption === 'WEP') {
|
} else if (encryption === 'WEP') {
|
||||||
return {
|
return {
|
||||||
text: 'WEP Encryption',
|
text: 'WEP Encryption',
|
||||||
icon: <Ionicons name="shield" size={screenWidth * 0.045} color="#ffa500" /> // Orange
|
icon: <Ionicons name="shield" size={screenWidth * 0.045} color="#ffa500" /> // Orange
|
||||||
};
|
};
|
||||||
} else if (encryption === 'WPA' || encryption === 'WPA2') {
|
} else if (encryption === 'WPA' || encryption === 'WPA2') {
|
||||||
return {
|
return {
|
||||||
text: 'WPA Encryption',
|
text: 'WPA Encryption',
|
||||||
icon: <Ionicons name="shield-checkmark" size={screenWidth * 0.045} color="#44c167" /> // Green
|
icon: <Ionicons name="shield-checkmark" size={screenWidth * 0.045} color="#44c167" /> // Green
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
text: 'Unknown Encryption',
|
text: 'Unknown Encryption',
|
||||||
icon: <Ionicons name="shield" size={screenWidth * 0.045} color="#000000" /> // Black for unknown
|
icon: <Ionicons name="shield" size={screenWidth * 0.045} color="#000000" /> // Black for unknown
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const { text: encryptionText, icon: encryptionIcon } = getEncryptionStatus(encryption);
|
const { text: encryptionText, icon: encryptionIcon } = getEncryptionStatus(encryption);
|
||||||
|
|
||||||
|
|
||||||
// Function to open the Wi-Fi configuration in the OS
|
// Function to open the Wi-Fi configuration in the OS
|
||||||
@@ -178,11 +179,11 @@ const { text: encryptionText, icon: encryptionIcon } = getEncryptionStatus(encry
|
|||||||
// Split the contents and extract the phone number and message
|
// Split the contents and extract the phone number and message
|
||||||
const [phone, ...messageParts] = contents.split(':').slice(1);
|
const [phone, ...messageParts] = contents.split(':').slice(1);
|
||||||
const message = messageParts.join(':');
|
const message = messageParts.join(':');
|
||||||
|
|
||||||
// Log the extracted phone number and message
|
// Log the extracted phone number and message
|
||||||
console.log('Phone:', phone);
|
console.log('Phone:', phone);
|
||||||
console.log('Message:', message);
|
console.log('Message:', message);
|
||||||
|
|
||||||
// Construct the SMS URL based on the platform
|
// Construct the SMS URL based on the platform
|
||||||
if (Platform.OS === 'android') {
|
if (Platform.OS === 'android') {
|
||||||
return `sms:${phone}?body=${message}`;
|
return `sms:${phone}?body=${message}`;
|
||||||
@@ -193,8 +194,50 @@ const { text: encryptionText, icon: encryptionIcon } = getEncryptionStatus(encry
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const sslStrippingStatus = {
|
||||||
|
hasSSLStripping: details.sslStripping?.some(status => status === true) ?? false,
|
||||||
|
text: details.sslStripping?.some(status => status === true)
|
||||||
|
? "SSL Stripping Detected"
|
||||||
|
: "No SSL Stripping",
|
||||||
|
color: details.sslStripping?.some(status => status === true) ? "#FF0000" : "#44c167", // Green for No SSL Stripping
|
||||||
|
};
|
||||||
|
|
||||||
|
// Log to check what's happening
|
||||||
|
console.log('SSL Stripping Details:', details.sslStripping);
|
||||||
|
console.log('SSL Stripping Status:', sslStrippingStatus);
|
||||||
|
|
||||||
|
const hasExecutableStatus = {
|
||||||
|
hasExecutable: details.hasExecutable ?? false,
|
||||||
|
text: details.hasExecutable ? "Executable Detected" : "No Executable",
|
||||||
|
color: details.hasExecutable ? "#FF0000" : "#44c167", // Green for No Executable
|
||||||
|
};
|
||||||
|
|
||||||
|
// Log to check what's happening
|
||||||
|
console.log('Executable Details:', details.hasExecutable);
|
||||||
|
console.log('Executable Status:', hasExecutableStatus);
|
||||||
|
|
||||||
|
const trackingStatus = {
|
||||||
|
hasTracking: details.tracking ?? false,
|
||||||
|
text: details.tracking ? "Tracking Detected" : "No Tracking",
|
||||||
|
color: details.tracking ? "#FF0000" : "#44c167", // Green for No Tracking
|
||||||
|
};
|
||||||
|
|
||||||
|
// Log to check what's happening
|
||||||
|
console.log('Tracking Details:', details.tracking);
|
||||||
|
console.log('Tracking Status:', trackingStatus);
|
||||||
|
const redirectCount = details.redirect ?? 0; // Default to 0 if undefined
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
||||||
<View style={styles.dataBox}>
|
<View style={styles.dataBox}>
|
||||||
|
|
||||||
|
|
||||||
<TouchableOpacity style={styles.closeButton} onPress={clearScanData}>
|
<TouchableOpacity style={styles.closeButton} onPress={clearScanData}>
|
||||||
<Ionicons name="close-circle-outline" size={screenWidth * 0.05} color="#ff69b4" />
|
<Ionicons name="close-circle-outline" size={screenWidth * 0.05} color="#ff69b4" />
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
@@ -215,158 +258,210 @@ const { text: encryptionText, icon: encryptionIcon } = getEncryptionStatus(encry
|
|||||||
<View style={styles.dividerVertical} />
|
<View style={styles.dividerVertical} />
|
||||||
<View style={styles.detailsSection}>
|
<View style={styles.detailsSection}>
|
||||||
<Text style={styles.timestampText}>{data.createdAt ? new Date(data.createdAt).toLocaleString() : 'Invalid Date'}</Text>
|
<Text style={styles.timestampText}>{data.createdAt ? new Date(data.createdAt).toLocaleString() : 'Invalid Date'}</Text>
|
||||||
<Text style={styles.typeText}>Description: {type}</Text>
|
<Text style={styles.typeText}>Description: {description}</Text>
|
||||||
|
{/* Conditionally display the shortening service message */}
|
||||||
|
{isShorteningService && (
|
||||||
|
<Text style={styles.shorteningServiceText}>This is a shortening service</Text>
|
||||||
|
)}
|
||||||
|
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* The Main Result in appropriate color */}
|
{/* The Main Result in appropriate color */}
|
||||||
<Text style={[styles.resultText, { color: resultColor }]}>
|
<Text style={[styles.resultText, { color: resultColor }]}>
|
||||||
Result: {resultText}
|
Result: {resultText}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
|
|
||||||
{/* URL Type */}
|
{/* URL Type */}
|
||||||
{type === 'URL' && (
|
{type === 'URL' && (
|
||||||
<>
|
<>
|
||||||
<View style={styles.displayCheck}>
|
<View style={styles.mainContent}>
|
||||||
{securityIcon}
|
{/* Left Container */}
|
||||||
<Text style={styles.DetailsInfo}>{securityText}</Text>
|
<View style={styles.leftContainer}>
|
||||||
</View>
|
<View style={styles.displayCheck}>
|
||||||
|
{securityIcon}
|
||||||
|
<Text style={styles.DetailsInfo}>{securityText}</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
{/* Security Headers Button */}
|
<View style={styles.displayCheck}>
|
||||||
{securityHeaderStatus.hasHeaders ? (
|
<MaterialCommunityIcons name="shield-off" size={screenWidth * 0.045} color={securityHeaderStatus.color} />
|
||||||
<TouchableOpacity style={styles.DetailsInfoButton} onPress={() => setIsModalVisible(true)}>
|
<Text style={styles.DetailsInfo}>{securityHeaderStatus.text}</Text>
|
||||||
<Ionicons name="shield-checkmark" size={screenWidth * 0.045} color={securityHeaderStatus.color} />
|
</View>
|
||||||
<Text style={styles.DetailsInfo}>{securityHeaderStatus.text}</Text>
|
|
||||||
<Ionicons name="chevron-forward" size={screenWidth * 0.045} color="#ff69b4" style={styles.chevronIcon} />
|
{/* Redirects Button */}
|
||||||
|
{redirectCount > 0 ? (
|
||||||
|
<TouchableOpacity style={styles.DetailsInfoButton} onPress={() => setIsRedirectModalVisible(true)}>
|
||||||
|
<Ionicons name="shield" size={screenWidth * 0.045} color={redirectStatus.color} />
|
||||||
|
<Text style={styles.DetailsInfo}>{`Redirects: ${redirectCount}`}</Text>
|
||||||
|
<Ionicons name="chevron-forward" size={screenWidth * 0.045} color="#ff69b4" style={styles.chevronIcon} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
) : (
|
||||||
|
<View style={styles.displayCheck}>
|
||||||
|
<Ionicons name="shield-checkmark" size={screenWidth * 0.045} color={redirectStatus.color} />
|
||||||
|
<Text style={styles.DetailsInfo}>{`Redirects: ${redirectCount}`}</Text>
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{/* Vertical Divider */}
|
||||||
|
<View style={styles.verticalDivider} />
|
||||||
|
|
||||||
|
{/* Right Container */}
|
||||||
|
<View style={styles.rightContainer}>
|
||||||
|
<View style={styles.displayCheck}>
|
||||||
|
<Ionicons name="shield-checkmark" size={screenWidth * 0.045} color={sslStrippingStatus.color} />
|
||||||
|
<Text style={styles.DetailsInfo}>{sslStrippingStatus.text}</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={styles.displayCheck}>
|
||||||
|
<Ionicons name="shield-checkmark" size={screenWidth * 0.045} color={hasExecutableStatus.color} />
|
||||||
|
<Text style={styles.DetailsInfo}>{hasExecutableStatus.text}</Text>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<View style={styles.displayCheck}>
|
||||||
|
<Ionicons name="shield-checkmark" size={screenWidth * 0.045} color={trackingStatus.color} />
|
||||||
|
<Text style={styles.DetailsInfo}>{trackingStatus.text}</Text>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{/* Divider */}
|
||||||
|
<View style={styles.dividerHorizontal} />
|
||||||
|
|
||||||
|
{/* Action Buttons */}
|
||||||
|
<View style={styles.iconContainer}>
|
||||||
|
<TouchableOpacity style={styles.iconButton} onPress={handleCopyToClipboard}>
|
||||||
|
<Ionicons name="clipboard-outline" size={screenWidth * 0.05} color="#2196F3" />
|
||||||
|
<Text style={styles.iconText}>Copy Link</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
|
||||||
|
<TouchableOpacity style={styles.iconButton} onPress={() => handleOpenUrl(contents)}>
|
||||||
|
<Ionicons name="open-outline" size={screenWidth * 0.05} color="#2196F3" />
|
||||||
|
<Text style={styles.iconText}>Open Link</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
|
||||||
|
<TouchableOpacity style={styles.iconButton} onPress={() => {
|
||||||
|
setWebViewUrl(contents);
|
||||||
|
setIsWebViewVisible(true);
|
||||||
|
}}>
|
||||||
|
<MaterialCommunityIcons name="file-lock-outline" size={screenWidth * 0.05} color="#2196F3" />
|
||||||
|
<Text style={styles.iconText}>SecureWebView</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
{/* Redirect Chain Pop UP */}
|
||||||
|
<Modal
|
||||||
|
visible={isRedirectModalVisible}
|
||||||
|
transparent={true}
|
||||||
|
animationType="fade"
|
||||||
|
onRequestClose={() => setIsRedirectModalVisible(false)}
|
||||||
|
>
|
||||||
|
<View style={styles.modalContainer}>
|
||||||
|
<View style={styles.modalContent}>
|
||||||
|
<Text style={styles.modalTitle}>Redirect Chain</Text>
|
||||||
|
<ScrollView style={styles.modalScrollContent}>
|
||||||
|
{details.redirectChain?.map((redirect: string, index: number) => (
|
||||||
|
<ScrollView
|
||||||
|
key={index}
|
||||||
|
horizontal={true}
|
||||||
|
style={styles.horizontalScrollView}
|
||||||
|
contentContainerStyle={styles.horizontalContentContainer}>
|
||||||
|
<Text style={styles.modalText}>{redirect}</Text>
|
||||||
|
</ScrollView>
|
||||||
|
))}
|
||||||
|
</ScrollView>
|
||||||
|
<TouchableOpacity style={styles.closeModalButton} onPress={() => setIsRedirectModalVisible(false)}>
|
||||||
|
<Text style={styles.closeModalButtonText}>Close</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
) : (
|
</View>
|
||||||
<View style={styles.displayCheck}>
|
|
||||||
<MaterialCommunityIcons name="shield-off" size={screenWidth * 0.045} color={securityHeaderStatus.color} />
|
|
||||||
<Text style={styles.DetailsInfo}>{securityHeaderStatus.text}</Text>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Redirects Button */}
|
|
||||||
{redirectStatus.hasRedirects ? (
|
|
||||||
<TouchableOpacity style={styles.DetailsInfoButton} onPress={() => setIsRedirectModalVisible(true)}>
|
|
||||||
<Ionicons name="shield" size={screenWidth * 0.045} color={redirectStatus.color} />
|
|
||||||
<Text style={styles.DetailsInfo}>{redirectStatus.text}</Text>
|
|
||||||
<Ionicons name="chevron-forward" size={screenWidth * 0.045} color="#ff69b4" style={styles.chevronIcon} />
|
|
||||||
</TouchableOpacity>
|
|
||||||
) : (
|
|
||||||
<View style={styles.displayCheck}>
|
|
||||||
<Ionicons name="shield-checkmark" size={screenWidth * 0.045} color={redirectStatus.color} />
|
|
||||||
<Text style={styles.DetailsInfo}>{redirectStatus.text}</Text>
|
|
||||||
</View>
|
</View>
|
||||||
)}
|
</Modal>
|
||||||
|
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
|
|
||||||
{/* Divider */}
|
|
||||||
<View style={styles.dividerHorizontal} />
|
|
||||||
|
|
||||||
{/* Action Buttons */}
|
|
||||||
<View style={styles.iconContainer}>
|
|
||||||
<TouchableOpacity style={styles.iconButton} onPress={handleCopyToClipboard}>
|
|
||||||
<Ionicons name="clipboard-outline" size={screenWidth * 0.05} color="#2196F3" />
|
|
||||||
<Text style={styles.iconText}>Copy Link</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
|
|
||||||
<TouchableOpacity style={styles.iconButton} onPress={() => handleOpenUrl(contents)}>
|
|
||||||
<Ionicons name="open-outline" size={screenWidth * 0.05} color="#2196F3" />
|
|
||||||
<Text style={styles.iconText}>Open Link</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
|
|
||||||
<TouchableOpacity style={styles.iconButton} onPress={() => {
|
|
||||||
setWebViewUrl(contents);
|
|
||||||
setIsWebViewVisible(true);
|
|
||||||
}}>
|
|
||||||
<MaterialCommunityIcons name="file-lock-outline" size={screenWidth * 0.05} color="#2196F3" />
|
|
||||||
<Text style={styles.iconText}>SecureWebView</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{/* WIFI Type */}
|
{/* WIFI Type */}
|
||||||
|
|
||||||
{type === 'WIFI' && (
|
{type === 'WIFI' && (
|
||||||
<>
|
<>
|
||||||
{/* SSID */}
|
{/* SSID */}
|
||||||
<View style={styles.displayCheck}>
|
<View style={styles.displayCheck}>
|
||||||
<Text style={styles.DetailsInfo}>SSID: {ssid}</Text>
|
<Text style={styles.DetailsInfo}>SSID: {ssid}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* Encryption */}
|
{/* Encryption */}
|
||||||
<View style={styles.displayCheck}>
|
<View style={styles.displayCheck}>
|
||||||
{encryptionIcon}
|
{encryptionIcon}
|
||||||
<Text style={styles.DetailsInfo}>{encryptionText}</Text>
|
<Text style={styles.DetailsInfo}>{encryptionText}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* Visibility */}
|
{/* Visibility */}
|
||||||
<View style={styles.displayCheck}>
|
<View style={styles.displayCheck}>
|
||||||
<Ionicons name={hidden === 'Hidden' ? "eye-off-outline" : "eye-outline"} size={screenWidth * 0.045} color={hidden === 'Hidden' ? "#ff0000" : "#44c167"} />
|
<Ionicons name={hidden === 'Hidden' ? "eye-off-outline" : "eye-outline"} size={screenWidth * 0.045} color={hidden === 'Hidden' ? "#ff0000" : "#44c167"} />
|
||||||
<Text style={styles.DetailsInfo}>Visibility: {hidden === 'Hidden' ? 'Hidden' : 'Visible'}</Text>
|
<Text style={styles.DetailsInfo}>Visibility: {hidden === 'Hidden' ? 'Hidden' : 'Visible'}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* Divider */}
|
{/* Divider */}
|
||||||
<View style={styles.dividerHorizontal} />
|
<View style={styles.dividerHorizontal} />
|
||||||
|
|
||||||
{/* Connect to Wi-Fi Button */}
|
{/* Connect to Wi-Fi Button */}
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={[styles.connectButton, { backgroundColor: resultColor }]}
|
style={[styles.connectButton, { backgroundColor: resultColor }]}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
startActivityAsync(ActivityAction.WIFI_SETTINGS)
|
startActivityAsync(ActivityAction.WIFI_SETTINGS)
|
||||||
.catch(err => console.error('Error opening Wi-Fi settings:', err));
|
.catch(err => console.error('Error opening Wi-Fi settings:', err));
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Text style={styles.connectButtonText}>Connect to Wi-Fi</Text>
|
<Text style={styles.connectButtonText}>Connect to Wi-Fi</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{type === 'PHONE' && (
|
{type === 'PHONE' && (
|
||||||
<TouchableOpacity style={styles.iconButton} onPress={() => Linking.openURL(contents)}>
|
<TouchableOpacity style={styles.iconButton} onPress={() => Linking.openURL(contents)}>
|
||||||
<View style={styles.dividerHorizontal} />
|
<View style={styles.dividerHorizontal} />
|
||||||
<Ionicons name="call-outline" size={screenWidth * 0.045} color="#2196F3" />
|
<Ionicons name="call-outline" size={screenWidth * 0.045} color="#2196F3" />
|
||||||
{/* Divider */}
|
{/* Divider */}
|
||||||
|
|
||||||
<Text style={styles.iconText}>Call Number</Text>
|
<Text style={styles.iconText}>Call Number</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{type === 'SMS' && (
|
{type === 'SMS' && (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={styles.iconButton}
|
style={styles.iconButton}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
const smsUrl = constructSMSUrl(contents);
|
const smsUrl = constructSMSUrl(contents);
|
||||||
Linking.openURL(smsUrl).catch(err => console.error('Error sending SMS:', err));
|
Linking.openURL(smsUrl).catch(err => console.error('Error sending SMS:', err));
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{/* Divider */}
|
{/* Divider */}
|
||||||
<View style={styles.dividerHorizontal} />
|
<View style={styles.dividerHorizontal} />
|
||||||
<Ionicons name="chatbubble-outline" size={screenWidth * 0.045} color="#2196F3" />
|
<Ionicons name="chatbubble-outline" size={screenWidth * 0.045} color="#2196F3" />
|
||||||
|
|
||||||
<Text style={styles.iconText}>Send SMS</Text>
|
<Text style={styles.iconText}>Send SMS</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{type === 'EMAIL' && (
|
{type === 'EMAIL' && (
|
||||||
<TouchableOpacity style={styles.iconButton} onPress={() => Linking.openURL(contents)}>
|
<TouchableOpacity style={styles.iconButton} onPress={() => Linking.openURL(contents)}>
|
||||||
{/* Divider */}
|
{/* Divider */}
|
||||||
<View style={styles.dividerHorizontal} />
|
<View style={styles.dividerHorizontal} />
|
||||||
<Ionicons name="mail-outline" size={screenWidth * 0.045} color="#2196F3" />
|
<Ionicons name="mail-outline" size={screenWidth * 0.045} color="#2196F3" />
|
||||||
|
|
||||||
<Text style={styles.iconText}>Send Email</Text>
|
<Text style={styles.iconText}>Send Email</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -393,49 +488,31 @@ const { text: encryptionText, icon: encryptionIcon } = getEncryptionStatus(encry
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
{/*POP UP Security Header and Redirect button*/}
|
{/*POP UP Security Header and Redirect button*/}
|
||||||
{/* Security Headers Modal */}
|
{/* Security Headers Modal */}
|
||||||
<Modal
|
|
||||||
visible={isModalVisible}
|
|
||||||
transparent={true}
|
|
||||||
animationType="fade"
|
|
||||||
onRequestClose={() => setIsModalVisible(false)}
|
|
||||||
>
|
|
||||||
<View style={styles.modalContainer}>
|
|
||||||
<View style={styles.modalContent}>
|
|
||||||
<Text style={styles.modalTitle}>Security Headers</Text>
|
|
||||||
<ScrollView style={styles.modalScrollContent}>
|
|
||||||
{details.hstsHeader?.map((header: string, index: number) => (
|
|
||||||
<Text key={index} style={styles.modalText}>{header}</Text>
|
|
||||||
))}
|
|
||||||
</ScrollView>
|
|
||||||
<TouchableOpacity style={styles.closeModalButton} onPress={() => setIsModalVisible(false)}>
|
|
||||||
<Text style={styles.closeModalButtonText}>Close</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
</Modal>
|
|
||||||
|
|
||||||
{/* Redirect Chain Modal */}
|
|
||||||
<Modal
|
<Modal
|
||||||
visible={isRedirectModalVisible}
|
visible={isModalVisible}
|
||||||
transparent={true}
|
transparent={true}
|
||||||
animationType="fade"
|
animationType="fade"
|
||||||
onRequestClose={() => setIsRedirectModalVisible(false)}
|
onRequestClose={() => setIsModalVisible(false)}
|
||||||
>
|
>
|
||||||
<View style={styles.modalContainer}>
|
<View style={styles.modalContainer}>
|
||||||
<View style={styles.modalContent}>
|
<View style={styles.modalContent}>
|
||||||
<Text style={styles.modalTitle}>Redirect Chain</Text>
|
<Text style={styles.modalTitle}>Security Headers</Text>
|
||||||
{details.redirectChain?.map((redirect: string, index: number) => (
|
<ScrollView style={styles.modalScrollContent}>
|
||||||
<Text key={index} style={styles.modalText}>{redirect}</Text>
|
{details.hstsHeader?.map((header: string, index: number) => (
|
||||||
))}
|
<Text key={index} style={styles.modalText}>{header}</Text>
|
||||||
<TouchableOpacity style={styles.closeModalButton} onPress={() => setIsRedirectModalVisible(false)}>
|
))}
|
||||||
|
</ScrollView>
|
||||||
|
<TouchableOpacity style={styles.closeModalButton} onPress={() => setIsModalVisible(false)}>
|
||||||
<Text style={styles.closeModalButtonText}>Close</Text>
|
<Text style={styles.closeModalButtonText}>Close</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{/* WebView Modal */}
|
{/* WebView Modal */}
|
||||||
<Modal
|
<Modal
|
||||||
visible={isWebViewVisible}
|
visible={isWebViewVisible}
|
||||||
@@ -457,20 +534,27 @@ const { text: encryptionText, icon: encryptionIcon } = getEncryptionStatus(encry
|
|||||||
};
|
};
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
|
// Row styles
|
||||||
row: {
|
row: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Scan icon styles
|
||||||
scan_icon: {
|
scan_icon: {
|
||||||
width: screenWidth * 0.09,
|
width: screenWidth * 0.09,
|
||||||
height: screenWidth * 0.09,
|
height: screenWidth * 0.09,
|
||||||
marginRight: screenWidth * 0.015,
|
marginRight: screenWidth * 0.015,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Payload text styles
|
||||||
payload: {
|
payload: {
|
||||||
fontSize: screenWidth * 0.0375,
|
fontSize: screenWidth * 0.0375,
|
||||||
color: '#000',
|
color: '#000',
|
||||||
flex: 1,
|
flex: 1,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Data box styles
|
||||||
dataBox: {
|
dataBox: {
|
||||||
padding: screenWidth * 0.0375,
|
padding: screenWidth * 0.0375,
|
||||||
backgroundColor: '#ffe6f0',
|
backgroundColor: '#ffe6f0',
|
||||||
@@ -479,77 +563,55 @@ const styles = StyleSheet.create({
|
|||||||
shadowOffset: { width: 0, height: screenHeight * 0.001875 },
|
shadowOffset: { width: 0, height: screenHeight * 0.001875 },
|
||||||
shadowOpacity: 0.15,
|
shadowOpacity: 0.15,
|
||||||
shadowRadius: screenWidth * 0.01875,
|
shadowRadius: screenWidth * 0.01875,
|
||||||
elevation: screenWidth * 0.0135,
|
elevation: screenWidth * 0.016,
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
},
|
},
|
||||||
mainContent: {
|
|
||||||
flexDirection: 'row',
|
// QR section styles
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
padding: screenWidth * 0.0525,
|
|
||||||
},
|
|
||||||
qrSection: {
|
qrSection: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Vertical divider styles
|
||||||
dividerVertical: {
|
dividerVertical: {
|
||||||
width: screenWidth * 0.001875,
|
width: screenWidth * 0.001875,
|
||||||
height: '100%',
|
height: '100%',
|
||||||
backgroundColor: '#ddd',
|
backgroundColor: '#ddd',
|
||||||
marginHorizontal: screenWidth * 0.025,
|
marginHorizontal: screenWidth * 0.025,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Details section styles
|
||||||
detailsSection: {
|
detailsSection: {
|
||||||
flex: 2,
|
flex: 2,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Timestamp text styles
|
||||||
timestampText: {
|
timestampText: {
|
||||||
fontSize: screenWidth * 0.03,
|
fontSize: screenWidth * 0.03,
|
||||||
color: '#000',
|
color: '#000',
|
||||||
marginBottom: screenWidth * 0.01875,
|
marginBottom: screenWidth * 0.01875,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Result text styles
|
||||||
resultText: {
|
resultText: {
|
||||||
fontSize: screenWidth * 0.045,
|
fontSize: screenWidth * 0.045,
|
||||||
marginBottom: screenWidth * 0.01875,
|
marginBottom: screenWidth * 0.01875,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Type text styles
|
||||||
typeText: {
|
typeText: {
|
||||||
fontSize: screenWidth * 0.03,
|
fontSize: screenWidth * 0.03,
|
||||||
color: '#000',
|
color: '#000',
|
||||||
marginBottom: screenWidth * 0.01875,
|
marginBottom: screenWidth * 0.01875,
|
||||||
},
|
},
|
||||||
DetailsInfo: {
|
|
||||||
fontSize: screenWidth * 0.03,
|
// Details Info Button styles
|
||||||
color: '#000',
|
|
||||||
marginLeft: screenWidth * 0.01875,
|
|
||||||
},
|
|
||||||
iconContainer: {
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'space-around',
|
|
||||||
alignItems: 'center',
|
|
||||||
marginTop: screenWidth * 0.01875,
|
|
||||||
},
|
|
||||||
iconButton: {
|
|
||||||
flexDirection: 'column',
|
|
||||||
alignItems: 'center',
|
|
||||||
marginHorizontal: screenWidth * 0.05, // Add margin between buttons
|
|
||||||
},
|
|
||||||
iconText: {
|
|
||||||
color: '#2196F3',
|
|
||||||
marginTop: screenWidth * 0.01,
|
|
||||||
textAlign: 'center',
|
|
||||||
fontSize: screenWidth * 0.03,
|
|
||||||
},
|
|
||||||
|
|
||||||
dividerHorizontal: {
|
|
||||||
width: '100%',
|
|
||||||
height: 1,
|
|
||||||
backgroundColor: '#ddd',
|
|
||||||
marginVertical: screenWidth * 0.025,
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
DetailsInfoButton: {
|
DetailsInfoButton: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between', // Ensure equal spacing between icon and text
|
||||||
paddingVertical: screenWidth * 0.01875,
|
paddingVertical: screenWidth * 0.01875,
|
||||||
paddingHorizontal: screenWidth * 0.028125,
|
paddingHorizontal: screenWidth * 0.028125,
|
||||||
backgroundColor: '#ffe6f0',
|
backgroundColor: '#ffe6f0',
|
||||||
@@ -557,28 +619,47 @@ const styles = StyleSheet.create({
|
|||||||
marginTop: screenWidth * 0.01875,
|
marginTop: screenWidth * 0.01875,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
borderColor: '#ff69b4',
|
borderColor: '#ff69b4',
|
||||||
|
width: '100%', // Make it take full width
|
||||||
},
|
},
|
||||||
|
// Display check styles
|
||||||
|
// Aligning the boxes
|
||||||
displayCheck: {
|
displayCheck: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
|
justifyContent: 'space-between', // Align items evenly
|
||||||
paddingVertical: screenWidth * 0.01875,
|
paddingVertical: screenWidth * 0.01875,
|
||||||
paddingHorizontal: screenWidth * 0.028125,
|
paddingHorizontal: screenWidth * 0.028125,
|
||||||
backgroundColor: '#ffe6f0',
|
backgroundColor: '#ffe6f0',
|
||||||
borderRadius: screenWidth * 0.01875,
|
borderRadius: screenWidth * 0.01875,
|
||||||
marginTop: screenWidth * 0.01875,
|
marginVertical: screenWidth * 0.01875,
|
||||||
|
width: '100%', // Make it take full width
|
||||||
},
|
},
|
||||||
|
// Details info text styles
|
||||||
|
DetailsInfo: {
|
||||||
|
fontSize: screenWidth * 0.026,
|
||||||
|
color: '#000',
|
||||||
|
marginLeft: screenWidth * 0.01875,
|
||||||
|
textAlign: 'left', // Center text horizontally
|
||||||
|
flex: 1, // Ensure the text takes up the remaining space
|
||||||
|
},
|
||||||
|
|
||||||
|
// Close button styles
|
||||||
closeButton: {
|
closeButton: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: screenWidth * 0.01875,
|
top: screenWidth * 0.01875,
|
||||||
right: screenWidth * 0.01875,
|
right: screenWidth * 0.01875,
|
||||||
zIndex: 2,
|
zIndex: 2,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Modal container styles
|
||||||
modalContainer: {
|
modalContainer: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Modal content styles
|
||||||
modalContent: {
|
modalContent: {
|
||||||
width: '80%',
|
width: '80%',
|
||||||
backgroundColor: 'white',
|
backgroundColor: 'white',
|
||||||
@@ -586,20 +667,37 @@ const styles = StyleSheet.create({
|
|||||||
padding: screenWidth * 0.0375,
|
padding: screenWidth * 0.0375,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Modal title styles
|
||||||
modalTitle: {
|
modalTitle: {
|
||||||
fontSize: screenWidth * 0.045,
|
fontSize: screenWidth * 0.045,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
marginBottom: screenWidth * 0.01875,
|
marginBottom: screenWidth * 0.01875,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Modal text styles
|
||||||
modalText: {
|
modalText: {
|
||||||
fontSize: screenWidth * 0.03,
|
fontSize: screenWidth * 0.03,
|
||||||
marginBottom: screenWidth * 0.009375,
|
marginBottom: screenWidth * 0.009375,
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
width: '100%',
|
width: '100%',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Modal scroll content styles
|
||||||
modalScrollContent: {
|
modalScrollContent: {
|
||||||
maxHeight: 200,
|
maxHeight: 200,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
horizontalScrollView: {
|
||||||
|
marginVertical: 5, // Adjust vertical margin as needed
|
||||||
|
},
|
||||||
|
|
||||||
|
horizontalContentContainer: {
|
||||||
|
flexGrow: 1, // Ensure the content container expands to fit its children
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// Close modal button styles
|
||||||
closeModalButton: {
|
closeModalButton: {
|
||||||
marginTop: screenWidth * 0.0375,
|
marginTop: screenWidth * 0.0375,
|
||||||
paddingVertical: screenWidth * 0.01875,
|
paddingVertical: screenWidth * 0.01875,
|
||||||
@@ -607,18 +705,20 @@ const styles = StyleSheet.create({
|
|||||||
backgroundColor: '#ff69b4',
|
backgroundColor: '#ff69b4',
|
||||||
borderRadius: screenWidth * 0.009375,
|
borderRadius: screenWidth * 0.009375,
|
||||||
},
|
},
|
||||||
chevronIcon: {
|
|
||||||
marginLeft: 'auto',
|
// Close modal button text styles
|
||||||
},
|
|
||||||
|
|
||||||
closeModalButtonText: {
|
closeModalButtonText: {
|
||||||
fontSize: screenWidth * 0.03,
|
fontSize: screenWidth * 0.03,
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Loading container styles
|
||||||
loadingContainer: {
|
loadingContainer: {
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Web view container styles
|
||||||
webViewContainer: {
|
webViewContainer: {
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '80%',
|
height: '80%',
|
||||||
@@ -626,6 +726,8 @@ const styles = StyleSheet.create({
|
|||||||
borderRadius: screenWidth * 0.01875,
|
borderRadius: screenWidth * 0.01875,
|
||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Shadow box styles
|
||||||
shadowBox: {
|
shadowBox: {
|
||||||
shadowColor: '#000',
|
shadowColor: '#000',
|
||||||
shadowOffset: { width: 0, height: screenHeight * 0.001875 },
|
shadowOffset: { width: 0, height: screenHeight * 0.001875 },
|
||||||
@@ -633,6 +735,8 @@ const styles = StyleSheet.create({
|
|||||||
shadowRadius: screenWidth * 0.01875,
|
shadowRadius: screenWidth * 0.01875,
|
||||||
elevation: screenWidth * 0.0135,
|
elevation: screenWidth * 0.0135,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Connect button styles
|
||||||
connectButton: {
|
connectButton: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
@@ -643,15 +747,81 @@ const styles = StyleSheet.create({
|
|||||||
borderRadius: screenWidth * 0.01875,
|
borderRadius: screenWidth * 0.01875,
|
||||||
marginTop: screenWidth * 0.025,
|
marginTop: screenWidth * 0.025,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Connect button text styles
|
||||||
connectButtonText: {
|
connectButtonText: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
marginLeft: screenWidth * 0.01875,
|
marginLeft: screenWidth * 0.01875,
|
||||||
fontSize: screenWidth * 0.0375,
|
fontSize: screenWidth * 0.0375,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// Main content styles
|
||||||
|
mainContent: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
padding: screenWidth * 0.0525,
|
||||||
|
},
|
||||||
|
|
||||||
|
// Left container styles
|
||||||
|
leftContainer: {
|
||||||
|
flex: 1,
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
},
|
||||||
|
|
||||||
|
// Right container styles
|
||||||
|
rightContainer: {
|
||||||
|
flex: 1,
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
},
|
||||||
|
shorteningServiceText: {
|
||||||
|
fontSize: screenWidth * 0.03, // Adjust size as needed
|
||||||
|
color: '#ff6347', // Example color (Tomato)
|
||||||
|
marginTop: screenWidth * 0.02, // Adjust spacing as needed
|
||||||
|
},
|
||||||
|
|
||||||
|
// Vertical divider styles
|
||||||
|
verticalDivider: {
|
||||||
|
width: 1,
|
||||||
|
backgroundColor: '#ddd',
|
||||||
|
height: '100%',
|
||||||
|
marginHorizontal: screenWidth * 0.025,
|
||||||
|
},
|
||||||
|
|
||||||
|
// Icon container styles
|
||||||
|
iconContainer: {
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: 'space-around',
|
||||||
|
alignItems: 'center',
|
||||||
|
marginTop: screenWidth * 0.01875,
|
||||||
|
},
|
||||||
|
|
||||||
|
// Icon button styles
|
||||||
|
iconButton: {
|
||||||
|
flexDirection: 'column',
|
||||||
|
alignItems: 'center',
|
||||||
|
marginHorizontal: screenWidth * 0.05, // Add margin between buttons
|
||||||
|
},
|
||||||
|
|
||||||
|
// Icon text styles
|
||||||
|
iconText: {
|
||||||
|
color: '#2196F3',
|
||||||
|
marginTop: screenWidth * 0.01,
|
||||||
|
textAlign: 'center',
|
||||||
|
fontSize: screenWidth * 0.03,
|
||||||
|
},
|
||||||
|
|
||||||
|
// Horizontal divider styles
|
||||||
|
dividerHorizontal: {
|
||||||
|
width: '100%',
|
||||||
|
height: 1,
|
||||||
|
backgroundColor: '#ddd',
|
||||||
|
marginVertical: screenWidth * 0.025,
|
||||||
|
},
|
||||||
|
|
||||||
|
// Chevron icon styles
|
||||||
|
chevronIcon: {
|
||||||
|
marginLeft: 'auto',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
export default ScannedDataBox;
|
||||||
export default ScannedDataBox;
|
|
||||||
2
package-lock.json
generated
@@ -26,7 +26,7 @@
|
|||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"expo": "~51.0.24",
|
"expo": "~51.0.24",
|
||||||
"expo-camera": "~15.0.14",
|
"expo-camera": "~15.0.14",
|
||||||
"expo-dev-client": "~4.0.19",
|
"expo-dev-client": "~4.0.22",
|
||||||
"expo-image-manipulator": "^12.0.5",
|
"expo-image-manipulator": "^12.0.5",
|
||||||
"expo-image-picker": "~15.0.7",
|
"expo-image-picker": "~15.0.7",
|
||||||
"expo-intent-launcher": "~11.0.1",
|
"expo-intent-launcher": "~11.0.1",
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"expo": "~51.0.24",
|
"expo": "~51.0.24",
|
||||||
"expo-camera": "~15.0.14",
|
"expo-camera": "~15.0.14",
|
||||||
"expo-dev-client": "~4.0.19",
|
"expo-dev-client": "~4.0.22",
|
||||||
"expo-image-manipulator": "^12.0.5",
|
"expo-image-manipulator": "^12.0.5",
|
||||||
"expo-image-picker": "~15.0.7",
|
"expo-image-picker": "~15.0.7",
|
||||||
"expo-intent-launcher": "~11.0.1",
|
"expo-intent-launcher": "~11.0.1",
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ const styles = StyleSheet.create({
|
|||||||
},
|
},
|
||||||
scannedDataBoxPopup: {
|
scannedDataBoxPopup: {
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
top: '30%',
|
top: '20%',
|
||||||
left: '5%',
|
left: '5%',
|
||||||
right: '5%',
|
right: '5%',
|
||||||
zIndex: 2,
|
zIndex: 2,
|
||||||
|
|||||||
BIN
temp/Sample QR/20 redirects.png
Normal file
|
After Width: | Height: | Size: 294 KiB |
BIN
temp/Sample QR/7458a3bbd950d7a3ae848ca11830f608.png
Normal file
|
After Width: | Height: | Size: 158 KiB |
BIN
temp/Sample QR/executable.png
Normal file
|
After Width: | Height: | Size: 160 KiB |