mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-09-22 22:28:22 +03:00
fix ios status bar colours when opening modals
This commit is contained in:
@@ -109,7 +109,7 @@ export default function AppRoot() {
|
||||
<PaperProvider theme={colorScheme === 'dark' ? AMDarkTheme : AMLightTheme}>
|
||||
{/* @ts-ignore */}
|
||||
<NavigationContainer theme={colorScheme === 'dark' ? DarkTheme : LightTheme} linking={linking}>
|
||||
<StatusBar style={colorScheme}/>
|
||||
<StatusBar/>
|
||||
<Stack.Navigator initialRouteName="app">
|
||||
{/* main app */}
|
||||
<Stack.Screen name="app" component={AppContent} options={{headerShown: false}}/>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import {StatusBar} from "expo-status-bar";
|
||||
import {Card, Text, useTheme} from "react-native-paper";
|
||||
import {useCallback, useEffect, useLayoutEffect, useState} from "react";
|
||||
import {Alert, Platform, TextInput, TouchableOpacity, View} from "react-native";
|
||||
@@ -93,7 +94,9 @@ export default function ServerAddModal({route, navigation}) {
|
||||
}, 500);
|
||||
}, [realm]);
|
||||
|
||||
return (<View style={{display: "flex", gap: 10, justifyContent: "center", paddingHorizontal: 15, paddingTop: 25}}>
|
||||
return (<>
|
||||
{Platform.OS == 'ios' && <StatusBar style="light"/>}
|
||||
<View style={{display: "flex", gap: 10, justifyContent: "center", paddingHorizontal: 15, paddingTop: 25}}>
|
||||
<Card mode="contained">
|
||||
<Card.Content>
|
||||
<View style={{...modalStyles.formItemRow, gap: 10}}>
|
||||
@@ -118,7 +121,8 @@ export default function ServerAddModal({route, navigation}) {
|
||||
<Text variant="bodyMedium" style={modalStyles.formFootnote}>
|
||||
AMNet uses HTTP by default. HTTPS will not work unless specifically configured using HTTP.SYS
|
||||
</Text>
|
||||
</View>)
|
||||
</View>
|
||||
</>)
|
||||
}
|
||||
|
||||
function handleDeepLink(realm, navigation, route, setAddress: (address: string) => void) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import {StatusBar} from "expo-status-bar";
|
||||
import NfcManager from "react-native-nfc-manager";
|
||||
|
||||
import React, {useEffect, useState} from "react";
|
||||
@@ -32,6 +33,8 @@ function CardAddMethodSelector({navigation}) {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
{Platform.OS === 'ios' && <StatusBar style="light"/>}
|
||||
<View style={{paddingHorizontal: 15, paddingTop: 90, gap: 8}}>
|
||||
<View style={{paddingBottom: 25, gap: 5}}>
|
||||
<Text variant="titleLarge" style={{textAlign: "center", fontSize: 32, lineHeight: 32, fontWeight: "bold"}}>
|
||||
@@ -65,7 +68,7 @@ function CardAddMethodSelector({navigation}) {
|
||||
title="Generate New Card"
|
||||
onPress={() => navigation.navigate('Manual', {autoGenerate: true})}/>
|
||||
</View>
|
||||
)
|
||||
</>)
|
||||
}
|
||||
|
||||
function MethodCard(props: {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {BSON} from "realm";
|
||||
import {StatusBar} from "expo-status-bar";
|
||||
import {Card, Divider, Text, useTheme} from "react-native-paper";
|
||||
import {useCallback, useEffect, useLayoutEffect, useState} from "react";
|
||||
import {Platform, TextInput, TouchableOpacity, View} from "react-native";
|
||||
@@ -62,7 +63,8 @@ export default function CardEditorModal({navigation, route}) {
|
||||
});
|
||||
}, [cardName]);
|
||||
|
||||
return (
|
||||
return (<>
|
||||
{Platform.OS === 'ios' && <StatusBar style="light"/>}
|
||||
<View style={modalStyles.rootLayout}>
|
||||
<Card mode="contained">
|
||||
<Card.Content>
|
||||
@@ -93,5 +95,5 @@ export default function CardEditorModal({navigation, route}) {
|
||||
</Card.Content>
|
||||
</Card>
|
||||
</View>
|
||||
)
|
||||
</>)
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
import {StatusBar} from "expo-status-bar";
|
||||
import {generateCardNumber, DecodeAMAccessCode} from "amnet-shared";
|
||||
import {useCallback, useEffect, useLayoutEffect, useState} from "react";
|
||||
import {Alert, Platform, TextInput, TouchableOpacity, View} from "react-native";
|
||||
import {Button, Card, Divider, Text, useTheme} from "react-native-paper";
|
||||
import {Alert, Platform, TextInput, TouchableOpacity, View} from "react-native";
|
||||
|
||||
import {AMCard} from "../../models/AMCard";
|
||||
import RealmContext from "../../models/RealmContext";
|
||||
@@ -87,7 +88,8 @@ export default function CardAddModal({navigation, route}) {
|
||||
}
|
||||
}, []);
|
||||
|
||||
return (
|
||||
return (<>
|
||||
{Platform.OS == 'ios' && <StatusBar style="light"/>}
|
||||
<View style={modalStyles.rootLayout}>
|
||||
<Card mode="contained">
|
||||
<Card.Content>
|
||||
@@ -123,5 +125,5 @@ export default function CardAddModal({navigation, route}) {
|
||||
|
||||
<Button mode="text" onPress={() => setCardNumber(generateCardNumber())}>Generate Access Code</Button>
|
||||
</View>
|
||||
)
|
||||
</>)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import {StatusBar} from "expo-status-bar";
|
||||
import {useNavigation} from "@react-navigation/native";
|
||||
import {Card, Text, useTheme} from "react-native-paper";
|
||||
import {useCallback, useLayoutEffect, useState} from "react";
|
||||
import {TextInput, TouchableOpacity, View} from "react-native";
|
||||
import {Platform, TextInput, TouchableOpacity, View} from "react-native";
|
||||
|
||||
import RealmContext from "../../models/RealmContext";
|
||||
import {useModalStyles} from "../../utils/ModalStyles";
|
||||
@@ -57,7 +58,8 @@ export default function PhysicalCardScan() {
|
||||
})
|
||||
}, [navigation, modalStyles, cardName]);
|
||||
|
||||
return (
|
||||
return (<>
|
||||
{Platform.OS == 'ios' && <StatusBar style="light"/>}
|
||||
<View style={modalStyles.rootLayout}>
|
||||
<Card mode="contained">
|
||||
<Card.Content>
|
||||
@@ -81,5 +83,5 @@ export default function PhysicalCardScan() {
|
||||
After the scan has completed, the card will be saved to your device.
|
||||
</Text>
|
||||
</View>
|
||||
)
|
||||
</>)
|
||||
}
|
||||
Reference in New Issue
Block a user