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