theme
parent
e455b52085
commit
ec243c5558
|
@ -6,7 +6,7 @@
|
||||||
"android": "react-native run-android",
|
"android": "react-native run-android",
|
||||||
"ios": "react-native run-ios",
|
"ios": "react-native run-ios",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"start": "react-native start",
|
"start": "host=0.0.0.0 react-native start",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
import {ReactNode} from 'react';
|
import {ReactNode} from 'react';
|
||||||
import {ScrollView, StyleProp, View, ViewStyle} from 'react-native';
|
import {ScrollView, StyleProp, View, ViewStyle} from 'react-native';
|
||||||
|
|
||||||
import {useSelector} from 'react-redux';
|
import {useSelector} from 'react-redux';
|
||||||
import {RootState} from '@redux/store';
|
import {RootState} from '@redux/store';
|
||||||
|
|
||||||
|
|
||||||
interface MyScreenContainerProps {
|
interface MyScreenContainerProps {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
style?: StyleProp<ViewStyle>;
|
style?: StyleProp<ViewStyle>;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import {createSlice} from '@reduxjs/toolkit';
|
import {createSlice} from '@reduxjs/toolkit';
|
||||||
import type {PayloadAction} from '@reduxjs/toolkit';
|
import type {PayloadAction} from '@reduxjs/toolkit';
|
||||||
|
|
||||||
import {appStatus, non_save_vars} from './appNonSaveVar';
|
import {appStatus, non_save_vars} from './appNonSaveVar';
|
||||||
|
|
||||||
import {ThemeTokensType} from '@configs/colors';
|
import {ThemeTokensType} from '@configs/colors';
|
||||||
|
|
||||||
export const appNonSaveVariablesSlice = createSlice({
|
export const appNonSaveVariablesSlice = createSlice({
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
import {createSlice} from '@reduxjs/toolkit';
|
import {createSlice} from '@reduxjs/toolkit';
|
||||||
import type {PayloadAction} from '@reduxjs/toolkit';
|
import type {PayloadAction} from '@reduxjs/toolkit';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
PREFERENCES_VARS,
|
PREFERENCES_VARS,
|
||||||
preferences_vars_default,
|
preferences_vars_default,
|
||||||
RegisterProcess,
|
RegisterProcess,
|
||||||
ThemeMode,
|
|
||||||
} from './appVar';
|
} from './appVar';
|
||||||
import {non_save_vars, NON_SAVE_VARS} from './appNonSaveVar';
|
|
||||||
import LangFormat from '@lang/default';
|
import LangFormat from '@lang/default';
|
||||||
import {lang as defaultLang} from '@lang/en';
|
import {lang as defaultLang} from '@lang/en';
|
||||||
import {UserId} from './types';
|
import {UserId} from './types';
|
||||||
import {MyUserAccount} from '@user/types';
|
import {MyUserAccount} from '@user/types';
|
||||||
|
import {ThemeMode} from './colors';
|
||||||
|
|
||||||
export interface appVariablesState {
|
export interface appVariablesState {
|
||||||
preferences: PREFERENCES_VARS;
|
preferences: PREFERENCES_VARS;
|
||||||
|
|
|
@ -117,6 +117,11 @@ function CustomTabBar(props: BottomTabBarProps) {
|
||||||
margin: 10,
|
margin: 10,
|
||||||
backgroundColor: currentTheme.backgroundDark300,
|
backgroundColor: currentTheme.backgroundDark300,
|
||||||
borderRadius: 20,
|
borderRadius: 20,
|
||||||
|
position: 'absolute',
|
||||||
|
zIndex: 100,
|
||||||
|
bottom: 0,
|
||||||
|
borderColor: currentTheme.backgroundDark300,
|
||||||
|
borderWidth: 3,
|
||||||
}}>
|
}}>
|
||||||
{state.routes.map((route, index) => {
|
{state.routes.map((route, index) => {
|
||||||
const isFocused = state.index === index;
|
const isFocused = state.index === index;
|
||||||
|
|
|
@ -220,7 +220,9 @@ function RegistrationPreview({type}: {type: 'login' | 'signup'}) {
|
||||||
|
|
||||||
<View style={{flexDirection: 'row'}}>
|
<View style={{flexDirection: 'row'}}>
|
||||||
{type === 'login' ? (
|
{type === 'login' ? (
|
||||||
<Text>{lang.previewLogin.dontHaveAccount}</Text>
|
<Text color={currentTheme.textLight100}>
|
||||||
|
{lang.previewLogin.dontHaveAccount}
|
||||||
|
</Text>
|
||||||
) : (
|
) : (
|
||||||
<Text color={currentTheme.textLight100}>
|
<Text color={currentTheme.textLight100}>
|
||||||
{lang.previewSignup.alreadyHaveAccount}
|
{lang.previewSignup.alreadyHaveAccount}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import {
|
||||||
NativeStackNavigationProp,
|
NativeStackNavigationProp,
|
||||||
} from '@react-navigation/native-stack';
|
} from '@react-navigation/native-stack';
|
||||||
import {RootState} from '@redux/store';
|
import {RootState} from '@redux/store';
|
||||||
|
import {View} from 'react-native';
|
||||||
import {useSelector} from 'react-redux';
|
import {useSelector} from 'react-redux';
|
||||||
|
|
||||||
export const MapTabName = 'Map';
|
export const MapTabName = 'Map';
|
||||||
|
@ -19,7 +20,9 @@ export type MapScreenNavigationProp =
|
||||||
NativeStackNavigationProp<MapStackNavigatorParamList>;
|
NativeStackNavigationProp<MapStackNavigatorParamList>;
|
||||||
|
|
||||||
function MapTab() {
|
function MapTab() {
|
||||||
const lang = useSelector((state: RootState) => state.appVariables.lang.navigation.home.map);
|
const lang = useSelector(
|
||||||
|
(state: RootState) => state.appVariables.lang.navigation.home.map,
|
||||||
|
);
|
||||||
const currentTheme = useSelector(
|
const currentTheme = useSelector(
|
||||||
(state: RootState) => state.nonSaveVariables.theme.colors,
|
(state: RootState) => state.nonSaveVariables.theme.colors,
|
||||||
);
|
);
|
||||||
|
@ -33,12 +36,7 @@ function MapTab() {
|
||||||
<MapStack.Navigator initialRouteName="Overview">
|
<MapStack.Navigator initialRouteName="Overview">
|
||||||
<MapStack.Screen
|
<MapStack.Screen
|
||||||
name="Overview"
|
name="Overview"
|
||||||
options={{
|
options={{headerShown: false}}
|
||||||
title: lang.tabName,
|
|
||||||
headerShown: true,
|
|
||||||
headerShadowVisible: false,
|
|
||||||
headerStyle: headerStyle,
|
|
||||||
}}
|
|
||||||
component={MapScreen}
|
component={MapScreen}
|
||||||
/>
|
/>
|
||||||
</MapStack.Navigator>
|
</MapStack.Navigator>
|
||||||
|
|
|
@ -44,7 +44,7 @@ export default function ProfileTab() {
|
||||||
);
|
);
|
||||||
|
|
||||||
const headerStyle = {
|
const headerStyle = {
|
||||||
backgroundColor: currentTheme.backgroundDark400
|
backgroundColor: currentTheme.backgroundDark400,
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {MyIcon} from '@components/MyIcon';
|
||||||
import {useNavigation} from '@react-navigation/native';
|
import {useNavigation} from '@react-navigation/native';
|
||||||
import {ProfileScreenNavigationProp} from '@navigation/tabs/main/ProfileTab';
|
import {ProfileScreenNavigationProp} from '@navigation/tabs/main/ProfileTab';
|
||||||
import {MyIconInput} from '@components/MyInput';
|
import {MyIconInput} from '@components/MyInput';
|
||||||
import {useEffect, useState} from 'react';
|
import {useEffect, useLayoutEffect, useState} from 'react';
|
||||||
import {RootScreenNavigationProp} from '@navigation/navigation';
|
import {RootScreenNavigationProp} from '@navigation/navigation';
|
||||||
import {useSelector} from 'react-redux';
|
import {useSelector} from 'react-redux';
|
||||||
import {RootState} from '@redux/store';
|
import {RootState} from '@redux/store';
|
||||||
|
@ -37,7 +37,9 @@ export function ProfileOverview() {
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
paddingTop: 10,
|
paddingTop: 10,
|
||||||
}}>
|
}}>
|
||||||
|
<View style={{paddingBottom: 10}}>
|
||||||
<UserAvatar />
|
<UserAvatar />
|
||||||
|
</View>
|
||||||
|
|
||||||
<MyTitle text="Max Mustermann" />
|
<MyTitle text="Max Mustermann" />
|
||||||
|
|
||||||
|
@ -96,8 +98,8 @@ export function ProfileSettings() {
|
||||||
const rootNavigation = useNavigation<RootScreenNavigationProp>();
|
const rootNavigation = useNavigation<RootScreenNavigationProp>();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView>
|
|
||||||
<MyScreenContainer
|
<MyScreenContainer
|
||||||
|
scrollView
|
||||||
style={{
|
style={{
|
||||||
paddingTop: 10,
|
paddingTop: 10,
|
||||||
}}>
|
}}>
|
||||||
|
@ -157,7 +159,6 @@ export function ProfileSettings() {
|
||||||
/>
|
/>
|
||||||
</SettingsItemContainer>
|
</SettingsItemContainer>
|
||||||
</MyScreenContainer>
|
</MyScreenContainer>
|
||||||
</ScrollView>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -264,7 +265,9 @@ export function UpdateUsername() {
|
||||||
setNewUsername(text);
|
setNewUsername(text);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Text color={currentTheme.textLight100} style={{marginTop: 12}}>{lang.changeUsername.info}</Text>
|
<Text color={currentTheme.textLight100} style={{marginTop: 12}}>
|
||||||
|
{lang.changeUsername.info}
|
||||||
|
</Text>
|
||||||
<Text color={currentTheme.textLight100}>{lang.changeUsername.info2}</Text>
|
<Text color={currentTheme.textLight100}>{lang.changeUsername.info2}</Text>
|
||||||
</MyScreenContainer>
|
</MyScreenContainer>
|
||||||
);
|
);
|
||||||
|
@ -340,7 +343,9 @@ export function UpdatePassword() {
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Text color={currentTheme.textLight100} style={{marginTop: 12}}>{lang.info}</Text>
|
<Text color={currentTheme.textLight100} style={{marginTop: 12}}>
|
||||||
|
{lang.info}
|
||||||
|
</Text>
|
||||||
<Text color={currentTheme.textLight100}>{lang.info2}</Text>
|
<Text color={currentTheme.textLight100}>{lang.info2}</Text>
|
||||||
</MyScreenContainer>
|
</MyScreenContainer>
|
||||||
);
|
);
|
||||||
|
|
|
@ -119,7 +119,7 @@ export function SignUpStepVerifyPhoneNumber() {
|
||||||
description={`${lang.signUpStepVerifyPhoneNumber.description} +49 15** ******43`}
|
description={`${lang.signUpStepVerifyPhoneNumber.description} +49 15** ******43`}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<KeyboardAvoidingView style={{gap: 12, marginTop: 20}}>
|
<View style={{gap: 12, marginTop: 20}}>
|
||||||
<ConfirmationCodeInput />
|
<ConfirmationCodeInput />
|
||||||
|
|
||||||
<MyButton
|
<MyButton
|
||||||
|
@ -138,7 +138,7 @@ export function SignUpStepVerifyPhoneNumber() {
|
||||||
color={currentTheme.textLight400}
|
color={currentTheme.textLight400}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</KeyboardAvoidingView>
|
</View>
|
||||||
</ContentContainer>
|
</ContentContainer>
|
||||||
</MyScreenContainer>
|
</MyScreenContainer>
|
||||||
);
|
);
|
||||||
|
@ -192,10 +192,10 @@ export function SignUpStepAccountName() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MyScreenContainer
|
<MyScreenContainer
|
||||||
|
scrollView
|
||||||
style={{
|
style={{
|
||||||
flexDirection: 'column',
|
flexDirection: 'column',
|
||||||
}}>
|
}}>
|
||||||
<ScrollView>
|
|
||||||
<ContentContainer>
|
<ContentContainer>
|
||||||
<Title
|
<Title
|
||||||
text={lang.signUpStepAccountName.title}
|
text={lang.signUpStepAccountName.title}
|
||||||
|
@ -216,7 +216,6 @@ export function SignUpStepAccountName() {
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
</ContentContainer>
|
</ContentContainer>
|
||||||
</ScrollView>
|
|
||||||
</MyScreenContainer>
|
</MyScreenContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue