bug fixes

This commit is contained in:
nnajah1 2025-04-10 17:06:41 +08:00
parent 00540064c1
commit fb36c69877
19 changed files with 134 additions and 61 deletions

Binary file not shown.

View File

@ -1,4 +1,4 @@
#Mon Apr 07 09:11:36 SGT 2025
#Thu Apr 10 14:29:56 SGT 2025
com.project.yondu.unioilloyaltyapp-main-49\:/mipmap-xxxhdpi/ic_launcher_round.png=C\:\\Users\\lenovo\\unioil-loyalty-rn-app-ios-and-android\\android\\app\\build\\intermediates\\merged_res\\debug\\mipmap-xxxhdpi_ic_launcher_round.png.flat
com.project.yondu.unioilloyaltyapp-main-49\:/mipmap-hdpi/ic_launcher_foreground.png=C\:\\Users\\lenovo\\unioil-loyalty-rn-app-ios-and-android\\android\\app\\build\\intermediates\\merged_res\\debug\\mipmap-hdpi_ic_launcher_foreground.png.flat
com.project.yondu.unioilloyaltyapp-main-49\:/mipmap-hdpi/ic_launcher.png=C\:\\Users\\lenovo\\unioil-loyalty-rn-app-ios-and-android\\android\\app\\build\\intermediates\\merged_res\\debug\\mipmap-hdpi_ic_launcher.png.flat

View File

@ -1,4 +1,4 @@
#Mon Apr 07 09:18:08 SGT 2025
#Thu Apr 10 14:41:30 SGT 2025
path.4=15/classes.dex
path.3=14/classes.dex
path.2=0/classes.dex

View File

@ -1,4 +1,10 @@
import { TextEncoder } from 'fast-text-encoding';
if (typeof global.TextEncoder === 'undefined') {
global.TextEncoder = TextEncoder;
}
import 'react-native-gesture-handler';
import * as React from 'react';
import { Platform, AppState, Text, TextInput, Alert, LogBox } from 'react-native';

View File

@ -10,7 +10,7 @@ import {
} from 'react-native';
import { connect } from "react-redux";
import { createDrawerNavigator } from '@react-navigation/drawer';
import { ListItem } from 'react-native-elements';
import { Avatar, Icon, ListItem } from 'react-native-elements';
import { openModal } from '../redux/actions/AlertActions.js';
import Assets from './assets.manager.js';
import Elements from './elements.js';
@ -175,32 +175,54 @@ class CustomDrawer extends React.PureComponent {
if (this.state.guest) {
return (
<ListItem
title="Guest"
subtitle="You are not login!"
leftAvatar={{source: Assets.logo.profileHolder}}
bottomDivider
subtitleStyle={this.props.app_theme?.theme.dark ? {color: this.props.app_theme?.theme.colors.text} : { color: 'white' }}
containerStyle={this.props.app_theme?.theme.dark && { backgroundColor: 'transparent' }}
titleStyle={{fontWeight: 'bold', fontSize: 15, color: this.props.app_theme?.theme.colors.text}}
>
<Avatar
source={Assets.logo.profileHolder}
/>
<ListItem.Content>
<ListItem.Title
style={{ fontWeight: 'bold', fontSize: 15, color: this.props.app_theme?.theme.colors.text }}
>
Guest
</ListItem.Title>
<ListItem.Subtitle
style={this.props.app_theme?.theme.dark ? { color: this.props.app_theme?.theme.colors.text } : { color: 'white' }}
>
You are not login!
</ListItem.Subtitle>
</ListItem.Content>
</ListItem>
);
} else {
return (
<View style={{ justifyContent: 'center' }}>
<ListItem
title={item.name}
subtitle={cn}
leftAvatar={{source: item.avatar_url != '' ? {uri: item.avatar_url} : Assets.logo.profileHolder}}
rightIcon={{
name: item.icon,
color: this.props.app_theme?.theme.colors.text,
onPress: () => this.navigateTo('Account', { test: {} }),
}}
bottomDivider
containerStyle={this.props.app_theme?.theme.dark && { backgroundColor: 'transparent' }}
subtitleStyle={{ color: this.props.app_theme?.theme.colors.text }}
titleStyle={{fontWeight: 'bold', fontSize: 15, color: this.props.app_theme?.theme.colors.text}}
>
<Avatar
source={item.avatar_url !== '' ? { uri: item.avatar_url } : Assets.logo.profileHolder}
/>
<ListItem.Content>
<ListItem.Title
style={{ fontWeight: 'bold', fontSize: 15, color: this.props.app_theme?.theme.colors.text }}
>
{item.name}
</ListItem.Title>
<ListItem.Subtitle
style={{ color: this.props.app_theme?.theme.colors.text }}
>
{cn}
</ListItem.Subtitle>
</ListItem.Content>
<Icon
name={item.icon}
color={this.props.app_theme?.theme.colors.text}
onPress={() => this.navigateTo('Account', { test: {} })}
/>
</ListItem>
</View>
);
}
@ -229,33 +251,44 @@ class CustomDrawer extends React.PureComponent {
{Options.map((item, i) => (
<ListItem
key={i}
title={item.title}
leftIcon={<Elements.icon name={item.icon} size={25} />}
titleStyle={[this.state.guest ? styles.titleDisabled : styles.title, { color: !this.state.guest ? this.props.app_theme?.theme.colors.text : '#7e7e7e' }]}
bottomDivider={i == Options.length - 1 ? true : false}
containerStyle={[styles.container, this.props.app_theme?.theme.dark && { backgroundColor: 'transparent' }]}
disabled={this.state.guest ? true : false}
onPress={() => {
this.navigateTo(item.screen, item.props || {})
}}
/>
}}>
<Elements.icon name={item.icon} size={25} />
<ListItem.Content>
<ListItem.Title
style={[this.state.guest ? styles.titleDisabled : styles.title, { color: !this.state.guest ? this.props.app_theme?.theme.colors.text : '#7e7e7e' }]}
>
{item.title}
</ListItem.Title>
</ListItem.Content>
</ListItem>
))}
</View>
<View>
{Options2.map((item, i) => (
<ListItem
key={i}
title={item.title}
leftIcon={<Elements.icon name={item.icon} size={25} />}
titleStyle={[styles.title, { color: this.props.app_theme?.theme.colors.text }]}
containerStyle={[styles.container, this.props.app_theme?.theme.dark && { backgroundColor: 'transparent' }]}
bottomDivider={i == Options2.length - 1 ? true : false}
containerStyle={[styles.container, this.props.app_theme?.theme.dark && { backgroundColor: 'transparent' }]}
onPress={() => {
this.navigateTo(item.screen, item.props || {}, item.screen)
}}
/>
}}>
<Elements.icon name={item.icon} size={25} />
<ListItem.Content>
<ListItem.Title
style={[styles.title, { color: this.props.app_theme?.theme.colors.text }]}
>
{item.title}
</ListItem.Title>
</ListItem.Content>
</ListItem>
))}
</View>
{this.state.guest ? (
<View style={styles.marginEnroll}>
<TouchableOpacity
@ -275,15 +308,21 @@ class CustomDrawer extends React.PureComponent {
) : (
<ListItem
key={12}
title="Logout"
leftIcon={<Elements.icon name={'logout'} size={25} />}
titleStyle={[styles.title, { color: this.props.app_theme?.theme.colors.text }]}
containerStyle={[styles.container, this.props.app_theme?.theme.dark && { backgroundColor: 'transparent' }]}
containerStyle={[styles.container,{marginTop: 2}, this.props.app_theme?.theme.dark && { backgroundColor: 'transparent' }]}
onPress={() => {
this.props.props.navigation.closeDrawer();
Alert.alert("Logout", '\n' + 'Are you sure you want to logout?', [{ text: "CANCEL", onPress: () => { } }, { text: "OK", onPress: () => this.onLogout() }])
}}
/>
>
<Elements.icon name={'logout'} size={25} />
<ListItem.Content>
<ListItem.Title
style={[styles.title, { color: this.props.app_theme?.theme.colors.text }]}
>
Logout
</ListItem.Title>
</ListItem.Content>
</ListItem>
)}
</CustomSafeArea>
)

View File

@ -37,6 +37,7 @@
"card-validator": "^8.1.1",
"crypto-js": "4.1.1",
"deprecated-react-native-prop-types": "^5.0.0",
"fast-text-encoding": "^1.0.6",
"lodash": "^4.17.21",
"lottie-react-native": "6.4.1",
"moment": "2.29.4",

View File

@ -0,0 +1,22 @@
diff --git a/node_modules/native-base/src/core/NativeBaseProvider.tsx b/node_modules/native-base/src/core/NativeBaseProvider.tsx
index 43b4bd1..9bffc90 100644
--- a/node_modules/native-base/src/core/NativeBaseProvider.tsx
+++ b/node_modules/native-base/src/core/NativeBaseProvider.tsx
@@ -4,7 +4,7 @@ import {
Metrics,
initialWindowMetrics as defaultInitialWindowMetrics,
} from 'react-native-safe-area-context';
-import { SSRProvider } from '@react-native-aria/utils';
+
import { theme as defaultTheme, ITheme } from './../theme';
import type { IColorModeProviderProps } from './color-mode';
import HybridProvider from './hybrid-overlay/HybridProvider';
@@ -94,7 +94,7 @@ const NativeBaseProvider = (props: NativeBaseProviderProps) => {
<OverlayProvider isSSR>
<ToastProvider>
<InitializeToastRef />
- <SSRProvider>{children}</SSRProvider>
+ {children}
</ToastProvider>
</OverlayProvider>
</HybridProvider>

View File

@ -2303,9 +2303,9 @@
integrity sha512-Z1jQI2NpdFJCVgpY+8Dq/Bt3d+YUi1928Q+/CZm/oh66fzM0RUl54vvuXlPJKybH4pdCZey1eDTPaLHkMPNgWA==
"@react-native/normalize-colors@*":
version "0.78.2"
resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.78.2.tgz#0fc6b1eb5ebe8ba8ce2493b2f67fa28cfdb82717"
integrity sha512-CA/3ynRO6/g1LDbqU8ewrv0js/1lU4+j04L7qz6btXbLTDk1UkF+AfpGRJGbIVY9UmFBJ7l1AOmzwutrWb3Txw==
version "0.79.0"
resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.79.0.tgz#ccf15b7deef99820141c85abe1c2651b92b1e09d"
integrity sha512-RmM7Dgb69a4qwdguKR+8MhT0u1IAKa/s0uy8/7JP9b/fm8zjUV9HctMgRgIpZTOELsowEyQodyTnhHQf4HPX0A==
"@react-native/normalize-colors@<0.73.0", "@react-native/normalize-colors@^0.72.0":
version "0.72.0"
@ -3696,9 +3696,9 @@ camelize@^1.0.0:
integrity sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==
caniuse-lite@^1.0.30001688:
version "1.0.30001710"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001710.tgz#2cda0c6071ddd43c01151c7f704a0e510a86612f"
integrity sha512-B5C0I0UmaGqHgo5FuqJ7hBd4L57A4dDD+Xi+XX1nXOoxGeDdY4Ko38qJYOyqznBVJEqON5p8P1x5zRR3+rsnxA==
version "1.0.30001713"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001713.tgz#6b33a8857e6c7dcb41a0caa2dd0f0489c823a52d"
integrity sha512-wCIWIg+A4Xr7NfhTuHdX+/FKh3+Op3LBbSp2N5Pfx6T/LhdQy3GTyoTg48BReaW/MyMNZAkTadsBtai3ldWK0Q==
card-validator@^3.0.0:
version "3.0.1"
@ -4321,9 +4321,9 @@ ee-first@1.1.1:
integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==
electron-to-chromium@^1.5.73:
version "1.5.131"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.131.tgz#c28993f0624d283ef2e7debb567264730f3f4416"
integrity sha512-fJFRYXVEJgDCiqFOgRGJm8XR97hZ13tw7FXI9k2yC5hgY+nyzC2tMO8baq1cQR7Ur58iCkASx2zrkZPZUnfzPg==
version "1.5.135"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.135.tgz#6d835020fa0c7f02f30d7608c2f3c0a764236699"
integrity sha512-8gXUdEmvb+WCaYUhA0Svr08uSeRjM2w3x5uHOc1QbaEVzJXB8rgm5eptieXzyKoVEtinLvW6MtTcurA65PeS1Q==
emittery@^0.13.1:
version "0.13.1"
@ -4802,6 +4802,11 @@ fast-loops@^1.1.3:
resolved "https://registry.yarnpkg.com/fast-loops/-/fast-loops-1.1.4.tgz#61bc77d518c0af5073a638c6d9d5c7683f069ce2"
integrity sha512-8dbd3XWoKCTms18ize6JmQF1SFnnfj5s0B7rRry22EofgMu7B6LKHVh+XfFqFGsqnbH54xgeO83PzpKI+ODhlg==
fast-text-encoding@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.6.tgz#0aa25f7f638222e3396d72bf936afcf1d42d6867"
integrity sha512-VhXlQgj9ioXCqGstD37E/HBeqEGV/qOD/kmbVG8h5xKBYvM1L3lR1Zn4555cQ8GkYbJa8aJSipLPndE1k6zK2w==
fast-xml-parser@^4.0.12:
version "4.5.3"
resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.5.3.tgz#c54d6b35aa0f23dc1ea60b6c884340c006dc6efb"