main
alex 2023-07-12 20:24:06 +00:00
parent 5adb288565
commit 1a2f47bf7c
2 changed files with 89 additions and 11 deletions

2
App.js
View File

@ -63,7 +63,7 @@ export function MyApp() {
<NavigationContainer> <NavigationContainer>
<Drawer.Navigator <Drawer.Navigator
screenOptions={{ screenOptions={{
headerShown: false, // headerShown: false,
drawerStyle: { drawerStyle: {
backgroundColor: appContext.appTheme.drawer.backgroundColor, backgroundColor: appContext.appTheme.drawer.backgroundColor,
}, },

View File

@ -105,13 +105,28 @@ export default function SettingsScreen() {
onValueChange={(e) => appContext.setUserIsDeveloperModeEnabled(e)} onValueChange={(e) => appContext.setUserIsDeveloperModeEnabled(e)}
/> />
</View> </View>
<Text onPress={() => setModalVisible(true)}>Test</Text>
<TouchableOpacity onPress={() => setModalVisible(true)}>
<View
style={{
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between",
}}
>
<Text style={{ color: appContext.appTheme.text }}>
Anzeigemodus
</Text>
<Text style={{ color: appContext.appTheme.colors.primary }}>
{appContext.appColorScheme}
</Text>
</View>
</TouchableOpacity>
<Modal <Modal
visible={modalVisible} visible={modalVisible}
animationType="slide" animationType="slide"
onRequestClose={() => { onRequestClose={() => {
Alert.alert("Modal has been closed.");
setModalVisible(!modalVisible); setModalVisible(!modalVisible);
}} }}
> >
@ -119,16 +134,79 @@ export default function SettingsScreen() {
<Icon <Icon
name="window-close" name="window-close"
size={24} size={24}
style={{ marginLeft: 10, marginTop: 20 }} style={{ marginLeft: 10, marginTop: 20, marginBottom: 20 }}
/> />
<Text style={([AppStyles.typography16])}>
System default
</Text>
<Divider />
<Text style={[AppStyles.typography16]}>Dark</Text>
<Divider />
<Text style={[AppStyles.typography16]}>Light</Text>
</TouchableOpacity> </TouchableOpacity>
<Text style={[AppStyles.typography16, { marginLeft: 20 }]}>
System default
</Text>
<Divider />
{appContext.appColorScheme === "dark" ? (
<TouchableOpacity onPress={() => setModalVisible(false)}>
<View
style={{
flexDirection: "row",
justifyContent: "space-between",
marginLeft: 20,
marginRight: 20,
}}
>
<Text style={[AppStyles.typography16]}>Dark</Text>
<Icon
name="check"
size={24}
color={appContext.appTheme.colors.primary}
/>
</View>
</TouchableOpacity>
) : (
<TouchableOpacity
onPress={() => {
setModalVisible(false);
appContext.setAppColorScheme("dark");
}}
>
<Text style={[AppStyles.typography16, { marginLeft: 20 }]}>
Dark
</Text>
</TouchableOpacity>
)}
<Divider />
{appContext.appColorScheme === "light" ? (
<TouchableOpacity onPress={() => setModalVisible(false)}>
<View
style={{
flexDirection: "row",
justifyContent: "space-between",
marginLeft: 20,
marginRight: 20,
}}
>
<Text style={[AppStyles.typography16]}>Light</Text>
<Icon
name="check"
size={24}
color={appContext.appTheme.colors.primary}
/>
</View>
</TouchableOpacity>
) : (
<TouchableOpacity
onPress={() => {
setModalVisible(false);
appContext.setAppColorScheme("light");
}}
>
<Text style={[AppStyles.typography16, { marginLeft: 20 }]}>
Light
</Text>
</TouchableOpacity>
)}
</Modal> </Modal>
</Card> </Card>
</View> </View>