Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into quick_pay_feature
Browse files Browse the repository at this point in the history
  • Loading branch information
BlakeKaufman committed Dec 12, 2024
2 parents 56b006a + 143738b commit 9b9efce
Show file tree
Hide file tree
Showing 26 changed files with 339 additions and 300 deletions.
34 changes: 24 additions & 10 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ import PushNotificationManager, {
import {initializeFirebase} from './db/initializeFirebase';
import {ChannelOpenFeeInformation} from './app/components/admin/homeComponents/receiveBitcoin';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
import GetThemeColors from './app/hooks/themeColors';

const Stack = createNativeStackNavigator();

Expand Down Expand Up @@ -320,7 +321,8 @@ function ResetStack(): JSX.Element | null {

const [isLoggedIn, setIsLoggedIn] = useState(false);
const [isloaded, setIsLoaded] = useState(false);
const {setDeepLinkContent} = useGlobalContextProvider();
const {setDeepLinkContent, theme} = useGlobalContextProvider();
const {backgroundColor} = GetThemeColors();

// Memoize handleDeepLink
const handleDeepLink = useCallback(
Expand Down Expand Up @@ -382,7 +384,19 @@ function ResetStack(): JSX.Element | null {
return <SplashScreen onAnimationFinish={handleAnimationFinish} />;
}
return (
<NavigationContainer ref={navigationRef}>
<NavigationContainer
theme={{
dark: theme,
colors: {
background: backgroundColor,
primary: '',
card: '',
text: '',
border: '',
notification: '',
},
}}
ref={navigationRef}>
<Stack.Navigator
screenOptions={{
headerShown: false,
Expand All @@ -397,24 +411,24 @@ function ResetStack(): JSX.Element | null {
component={ConnectingToNodeLoadingScreen}
options={{animation: 'fade', gestureEnabled: false}}
/>
<Stack.Screen
{/* <Stack.Screen
name="AddResturantItemToCart"
component={AddResturantItemToCart}
options={{
animation: 'fade',
gestureEnabled: false,
presentation: 'transparentModal',
}}
/>
<Stack.Screen
/> */}
{/* <Stack.Screen
name="giftWalletConfirmation"
component={GiftWalletConfirmation}
options={{
animation: 'fade',
gestureEnabled: false,
presentation: 'transparentModal',
}}
/>
/> */}
<Stack.Screen
name="ConfirmTxPage"
component={ConfirmTxPage}
Expand Down Expand Up @@ -497,11 +511,11 @@ function ResetStack(): JSX.Element | null {
name="AddChatGPTCredits"
component={AddChatGPTCredits}
/>
<Stack.Screen
{/* <Stack.Screen
options={{gestureEnabled: false}}
name="ResturantCartPage"
component={ResturantCartPage}
/>
/> */}
<Stack.Screen
name="SwitchGenerativeAIModel"
component={SwitchGenerativeAIModel}
Expand Down Expand Up @@ -645,10 +659,10 @@ function ResetStack(): JSX.Element | null {
name="ConfirmLeaveChatGPT"
component={ConfirmLeaveChatGPT}
/>
<Stack.Screen
{/* <Stack.Screen
name="GiftWalletConfirmation"
component={GiftWalletConfirmation}
/>
/> */}
<Stack.Screen
name="ClipboardCopyPopup"
component={ClipboardCopyPopup}
Expand Down
3 changes: 2 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
Expand Down Expand Up @@ -28,6 +28,7 @@
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_stat_ic_notification" />
<meta-data
tools:replace="android:resource"
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/colorAccent" />

Expand Down
Binary file modified app/assets/icons/arrow-small-left-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/assets/icons/arrow-small-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 20 additions & 10 deletions app/components/admin/homeComponents/apps/chatGPT/chatGPTHome.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,17 +188,15 @@ export default function ChatGPTHome(props) {
})
}
style={{
marginLeft: 'auto',
marginRight: 'auto',
flexDirection: 'row',
alignItems: 'center',
...styles.switchModel,
backgroundColor: backgroundOffset,
}}>
<ThemeText styles={styles.topBarText} content={model} />
<ThemeImage
styles={{transform: [{rotate: '90deg'}], width: 15, height: 15}}
lightModeIcon={ICONS.liquidIcon}
darkModeIcon={ICONS.liquidIcon}
lightsOutIcon={ICONS.liquidIconWhite}
styles={styles.topBarIcon}
lightModeIcon={ICONS.leftCheveronDark}
darkModeIcon={ICONS.left_cheveron_white}
lightsOutIcon={ICONS.left_cheveron_white}
/>
</TouchableOpacity>

Expand Down Expand Up @@ -547,14 +545,26 @@ const styles = StyleSheet.create({
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
marginBottom: 15,
...CENTER,
},
switchModel: {
marginLeft: 'auto',
marginRight: 'auto',
flexDirection: 'row',
alignItems: 'center',
paddingHorizontal: 10,
paddingVertical: 5,
borderRadius: 8,
},
topBarText: {
fontSize: SIZES.large,
marginRight: 5,
},
topBarIcon: {
width: 30,
height: 30,
transform: [{rotate: '270deg'}],
width: 20,
height: 20,
},

noChatHistoryImgContainer: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ export default function GiftCardPage() {

{filteredGiftCards.length === 0 || errorMessage ? (
<FullLoadingScreen
containerStyles={{
justifyContent:
giftCards.length === 0 && !errorMessage ? 'center' : 'start',
marginTop: giftCards.length === 0 && !errorMessage ? 0 : 30,
}}
showLoadingIcon={
giftCards.length === 0 && !errorMessage ? true : false
}
Expand Down
56 changes: 32 additions & 24 deletions app/components/admin/homeComponents/contacts/contactsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
StyleSheet,
TouchableOpacity,
TouchableWithoutFeedback,
useWindowDimensions,
View,
} from 'react-native';
import {CENTER, COLORS, FONT, ICONS, SIZES} from '../../../../constants';
Expand Down Expand Up @@ -181,6 +182,7 @@ export default function ContactsPage({navigation}) {
{pinnedContacts.length != 0 && (
<View style={{height: 130, marginBottom: 10}}>
<ScrollView
showsHorizontalScrollIndicator={false}
horizontal
contentContainerStyle={styles.pinnedContactsContainer}>
{pinnedContacts}
Expand Down Expand Up @@ -256,6 +258,7 @@ function PinnedContactElement(props) {
const contact = props.contact;
const publicKey = getPublicKey(contactsPrivateKey);
const navigate = useNavigation();
const dimenions = useWindowDimensions();
return (
<TouchableOpacity
onLongPress={() => {
Expand All @@ -276,7 +279,12 @@ function PinnedContactElement(props) {
navigate,
)
}>
<View style={styles.pinnedContact}>
<View
style={{
...styles.pinnedContact,
width: (dimenions.width * 0.95) / 4.5,
height: (dimenions.width * 0.95) / 4.5,
}}>
<View
style={[
styles.pinnedContactImageContainer,
Expand All @@ -301,16 +309,16 @@ function PinnedContactElement(props) {
/>
</View>

<View style={{flexDirection: 'row', alignItems: 'center'}}>
<View
style={{
width: '100%',
alignItems: 'center',
}}>
<ThemeText
CustomEllipsizeMode={'tail'}
CustomNumberOfLines={1}
styles={{textAlign: 'center', fontSize: SIZES.small}}
content={
contact.name.length > 15
? contact.name.slice(0, 13) + '...'
: contact.name ||
contact.uniqueName.slice(0, 13) +
`${contact.uniqueName.length > 15 ? '...' : ''}`
}
content={!!contact.name.length ? contact.name : contact.uniqueName}
/>
{contact.unlookedTransactions != 0 && (
<View
Expand Down Expand Up @@ -401,25 +409,23 @@ export function ContactElement(props) {
alignItems: 'center',
}}>
<ThemeText
CustomEllipsizeMode={'tail'}
CustomNumberOfLines={1}
styles={{
marginRight: contact.unlookedTransactions != 0 ? 5 : 'auto',
flex: 1,
width: '100%',
marginRight: 5,
}}
content={
contact.name
? contact.name.length > 15
? `${contact.name.slice(0, 15)}...`
: contact.name
: contact.uniqueName.length > 15
? `${contact.uniqueName.slice(0, 15)}...`
: contact.uniqueName
!!contact.name.length ? contact.name : contact.uniqueName
}
/>
{contact.unlookedTransactions != 0 && (
<View
style={[
styles.hasNotification,
{
marginRight: 'auto',
marginRight: 5,
backgroundColor:
darkModeType && theme
? COLORS.darkModeText
Expand All @@ -428,7 +434,11 @@ export function ContactElement(props) {
]}
/>
)}
<View style={{flexDirection: 'row', alignItems: 'center'}}>
<View
style={{
flexDirection: 'row',
alignItems: 'center',
}}>
<ThemeText
styles={{
fontSize: SIZES.small,
Expand Down Expand Up @@ -671,19 +681,17 @@ const styles = StyleSheet.create({
},

pinnedContact: {
width: 110,

height: 'auto',
maxHeight: 130,

margin: 5,
alignItems: 'center',
},
pinnedContactsContainer: {
flexDirection: 'row',
},
pinnedContactImageContainer: {
width: 90,
height: 90,
width: '100%',
height: '100%',
borderRadius: 50,
alignItems: 'center',
justifyContent: 'center',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export default function ChooseContactHalfModal() {
<View style={{flex: 1}}>
<ThemeText content={t('wallet.contactsPage.subHeader')} />
<ScrollView
showsVerticalScrollIndicator={false}
keyboardShouldPersistTaps="always"
style={{flex: 1, overflow: 'hidden'}}>
{contactElements}
Expand Down Expand Up @@ -166,26 +167,21 @@ export default function ChooseContactHalfModal() {
/>
</View>

<View>
<View style={{width: '100%', flex: 1}}>
<ThemeText
styles={{
marginRight: contact.unlookedTransactions != 0 ? 5 : 'auto',
}}
CustomEllipsizeMode={'tail'}
CustomNumberOfLines={1}
content={
contact.name
? contact.name.length > 25
? `${contact.name.slice(0, 25)}...`
: contact.name
: contact.uniqueName.length > 25
? `${contact.uniqueName.slice(0, 25)}...`
: contact.uniqueName
!!contact.name.length ? contact.name : contact.uniqueName
}
/>
<ThemeText
CustomEllipsizeMode={'tail'}
CustomNumberOfLines={1}
styles={{
fontSize: SIZES.small,
}}
content={contact.uniqueName}
content={!!contact.name.length ? contact.uniqueName : ''}
/>
</View>
</View>
Expand Down
Loading

0 comments on commit 9b9efce

Please sign in to comment.