Theme has been updated to be more inline with the storefront.

This commit is contained in:
michael
2026-01-26 15:50:46 -08:00
parent 2409ec3625
commit 199146d0b9
7 changed files with 236 additions and 82 deletions

View File

@@ -1,8 +1,8 @@
import React from 'react';
import {StyleSheet, View} from 'react-native';
import {Button, Text, Surface} from 'react-native-paper';
import {Text, Surface} from 'react-native-paper';
import {DTButton, DTColors} from 'react-native-dt-theme';
import type {HomeScreenProps} from '../types/navigation';
import {DTColors} from '../theme';
export function HomeScreen({navigation}: HomeScreenProps) {
return (
@@ -21,14 +21,11 @@ export function HomeScreen({navigation}: HomeScreenProps) {
Scan any NFC transponder to find compatible Dangerous Things implants.
</Text>
<Button
mode="outlined"
onPress={() => navigation.navigate('Scan')}
style={styles.scanButton}
labelStyle={styles.scanButtonLabel}
contentStyle={styles.scanButtonContent}>
<DTButton
variant="normal"
onPress={() => navigation.navigate('Scan')}>
START SCAN
</Button>
</DTButton>
</View>
<View style={styles.footer}>
@@ -74,21 +71,6 @@ const styles = StyleSheet.create({
opacity: 0.9,
paddingHorizontal: 20,
},
scanButton: {
borderColor: DTColors.modeNormal,
borderWidth: 2,
borderRadius: 4,
},
scanButtonLabel: {
color: DTColors.modeNormal,
fontSize: 18,
fontWeight: '600',
letterSpacing: 2,
},
scanButtonContent: {
paddingVertical: 12,
paddingHorizontal: 32,
},
footer: {
alignItems: 'center',
paddingBottom: 20,

View File

@@ -1,8 +1,8 @@
import React, { useMemo, useState } from 'react';
import { StyleSheet, View, ScrollView, Linking, TouchableOpacity } from 'react-native';
import { Button, Text, Surface, Divider, Chip } from 'react-native-paper';
import { DTCard, DTButton, DTColors } from 'react-native-dt-theme';
import type { ResultScreenProps } from '../types/navigation';
import { DTColors } from '../theme';
import { matchChipToProducts, getMatchSummary, getDesfireEvMismatchWarning, getMifareClassicCapacityWarning } from '../services/matching';
import { Product } from '../types/products';
import { getChipInfo, getChipFamilyInfo, getSecurityLevelDescription } from '../data/chipInfo';
@@ -72,11 +72,7 @@ export function ResultScreen({ route, navigation }: ResultScreenProps) {
<View style={styles.content}>
{/* Chip Identification Card */}
{transponder && (
<Surface style={styles.identificationCard} elevation={1}>
<Text variant="labelLarge" style={styles.identificationLabel}>
CHIP IDENTIFIED
</Text>
<Divider style={styles.divider} />
<DTCard mode="success" title="CHIP IDENTIFIED" style={{marginBottom: 20}}>
<Text variant="headlineMedium" style={styles.chipName}>
{transponder.chipName}
@@ -147,7 +143,7 @@ export function ResultScreen({ route, navigation }: ResultScreenProps) {
{transponder.cloneabilityNote}
</Text>
)}
</Surface>
</DTCard>
)}
{/* Educational Chip Info Card */}
@@ -380,11 +376,7 @@ export function ResultScreen({ route, navigation }: ResultScreenProps) {
)}
{/* Raw Tag Data Card */}
<Surface style={styles.resultCard} elevation={1}>
<Text variant="labelLarge" style={styles.cardLabel}>
RAW TAG DATA
</Text>
<Divider style={styles.divider} />
<DTCard mode="normal" title="RAW TAG DATA" style={{marginBottom: 20}}>
{tagData ? (
<>
@@ -444,7 +436,7 @@ export function ResultScreen({ route, navigation }: ResultScreenProps) {
No tag data available
</Text>
)}
</Surface>
</DTCard>
{/* No Detection Card (fallback) */}
{!transponder && (
@@ -494,13 +486,12 @@ export function ResultScreen({ route, navigation }: ResultScreenProps) {
{/* Action Buttons */}
<View style={styles.actions}>
<Button
mode="outlined"
<DTButton
variant="normal"
onPress={() => navigation.navigate('Scan')}
style={styles.actionButton}
labelStyle={styles.actionButtonLabel}>
style={{width: '100%'}}>
SCAN ANOTHER
</Button>
</DTButton>
<Button
mode="text"

View File

@@ -1,8 +1,8 @@
import React, { useCallback, useEffect } from 'react';
import { StyleSheet, View, Platform } from 'react-native';
import { Button, Text } from 'react-native-paper';
import { DTButton, DTColors } from 'react-native-dt-theme';
import type { ScanScreenProps } from '../types/navigation';
import { DTColors } from '../theme';
import { useScan } from '../hooks';
import { getScanInstructions } from '../services/nfc';
import { ScanAnimation } from '../components';
@@ -155,13 +155,12 @@ export function ScanScreen({ navigation }: ScanScreenProps) {
: 'Enable NFC in your device settings to scan tags.'}
</Text>
{Platform.OS === 'android' && (
<Button
mode="outlined"
<DTButton
variant="emphasis"
onPress={openSettings}
style={styles.settingsButton}
labelStyle={styles.settingsButtonLabel}>
style={styles.settingsButton}>
OPEN SETTINGS
</Button>
</DTButton>
)}
</View>
<View style={styles.footer}>
@@ -230,13 +229,11 @@ export function ScanScreen({ navigation }: ScanScreenProps) {
{getErrorHint()}
</Text>
)}
<Button
mode="outlined"
onPress={handleRetry}
style={styles.retryButton}
labelStyle={styles.buttonLabel}>
<DTButton
variant="normal"
onPress={handleRetry}>
TRY AGAIN
</Button>
</DTButton>
</>
)}
@@ -245,13 +242,11 @@ export function ScanScreen({ navigation }: ScanScreenProps) {
<Text variant="headlineMedium" style={styles.readyText}>
READY TO SCAN
</Text>
<Button
mode="outlined"
onPress={startScan}
style={styles.startButton}
labelStyle={styles.buttonLabel}>
<DTButton
variant="normal"
onPress={startScan}>
START
</Button>
</DTButton>
</>
)}
@@ -368,32 +363,14 @@ const styles = StyleSheet.create({
paddingHorizontal: 20,
fontStyle: 'italic',
},
retryButton: {
borderColor: DTColors.modeNormal,
borderWidth: 2,
},
settingsButton: {
borderColor: DTColors.modeEmphasis,
borderWidth: 2,
marginTop: 16,
},
settingsButtonLabel: {
color: DTColors.modeEmphasis,
letterSpacing: 2,
},
readyText: {
color: DTColors.modeEmphasis,
letterSpacing: 2,
marginBottom: 32,
},
startButton: {
borderColor: DTColors.modeNormal,
borderWidth: 2,
},
buttonLabel: {
color: DTColors.modeNormal,
letterSpacing: 2,
},
processingText: {
color: DTColors.modeEmphasis,
letterSpacing: 4,