mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-09-22 22:28:22 +03:00
improve non-nfc enabled apple device message
This commit is contained in:
@@ -5,7 +5,7 @@ import {Platform, TouchableOpacity, View} from "react-native";
|
||||
import {createNativeStackNavigator} from "@react-navigation/native-stack";
|
||||
|
||||
import {Card, Paragraph, Text, Title, useTheme} from "react-native-paper";
|
||||
import {SmartphoneNfc, SquareAsterisk, SquarePlus} from "lucide-react-native";
|
||||
import {ShieldBan, SmartphoneNfc, SquareAsterisk, SquarePlus} from "lucide-react-native";
|
||||
|
||||
import ManualCardEntry from "./ManualCardEntry";
|
||||
import PhysicalCardScan from "./PhyscialCardScan";
|
||||
@@ -42,10 +42,10 @@ function CardAddMethodSelector({navigation}) {
|
||||
|
||||
{nfcSupported !== null && (
|
||||
<>
|
||||
<MethodCard color="#03a9f4"
|
||||
icon={<SmartphoneNfc/>}
|
||||
<MethodCard title="Scan Physical Card"
|
||||
disabled={!nfcSupported}
|
||||
title="Scan Physical Card"
|
||||
color={nfcSupported ? "#03a9f4" : "gray"}
|
||||
icon={nfcSupported ? <SmartphoneNfc/> : <ShieldBan/>}
|
||||
description={nfcSupported ? "Amusement IC or Transport cards supported" : "NFC is not supported on this device"}
|
||||
onPress={() => navigation.navigate('Scan')}/>
|
||||
|
||||
@@ -102,4 +102,7 @@ function MethodCard(props: {
|
||||
}
|
||||
|
||||
// the nfc library doesn't offer the same support for felica cards on android compared to ios...
|
||||
export default Platform.OS === 'ios' ? CardAddModal : ManualCardEntry;
|
||||
export default Platform.select({
|
||||
ios: CardAddModal,
|
||||
default: ManualCardEntry
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user