@oxyhq/services 6.9.45 → 6.9.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/ui/components/OxyProvider.js +6 -5
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/SignInModal.js +271 -102
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +24 -15
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +0 -35
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +26 -13
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +50 -28
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +83 -48
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +11 -10
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +38 -23
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +4 -3
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +1 -3
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +47 -63
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +90 -68
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +72 -63
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +5 -5
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +57 -51
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +25 -36
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +31 -31
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +15 -8
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +60 -54
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +12 -9
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +159 -190
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +20 -22
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +16 -17
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +26 -4
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +13 -29
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +110 -52
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +3 -5
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +6 -5
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/SignInModal.js +271 -100
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +24 -15
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/index.js +0 -5
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +26 -13
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js +49 -26
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +84 -48
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +11 -9
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +38 -22
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +4 -3
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +1 -3
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +46 -62
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +90 -68
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +73 -64
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +6 -6
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +48 -42
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +25 -36
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +32 -32
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +16 -9
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +61 -55
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +12 -9
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +161 -192
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +21 -23
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +17 -18
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +27 -5
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +15 -31
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +110 -52
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +4 -6
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/index.d.ts +0 -5
- package/lib/typescript/commonjs/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/index.d.ts +0 -5
- package/lib/typescript/module/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/ui/components/OxyProvider.tsx +6 -5
- package/src/ui/components/SignInModal.tsx +186 -42
- package/src/ui/components/fileManagement/FileViewer.tsx +25 -15
- package/src/ui/components/index.ts +0 -5
- package/src/ui/components/payment/PaymentDetailsStep.tsx +16 -19
- package/src/ui/components/payment/PaymentMethodStep.tsx +33 -35
- package/src/ui/components/payment/PaymentReviewStep.tsx +63 -67
- package/src/ui/components/payment/PaymentSuccessStep.tsx +4 -12
- package/src/ui/components/payment/PaymentSummaryStep.tsx +26 -33
- package/src/ui/context/hooks/useAuthOperations.ts +4 -3
- package/src/ui/screens/AccountCenterScreen.tsx +2 -3
- package/src/ui/screens/AccountOverviewScreen.tsx +44 -65
- package/src/ui/screens/AccountSettingsScreen.tsx +121 -149
- package/src/ui/screens/AccountSwitcherScreen.tsx +94 -115
- package/src/ui/screens/AccountVerificationScreen.tsx +10 -9
- package/src/ui/screens/FeedbackScreen.tsx +50 -38
- package/src/ui/screens/FileManagementScreen.tsx +26 -34
- package/src/ui/screens/HistoryViewScreen.tsx +29 -10
- package/src/ui/screens/LanguageSelectorScreen.tsx +19 -7
- package/src/ui/screens/LegalDocumentsScreen.tsx +46 -63
- package/src/ui/screens/PaymentGatewayScreen.tsx +11 -12
- package/src/ui/screens/PrivacySettingsScreen.tsx +81 -193
- package/src/ui/screens/SavesCollectionsScreen.tsx +23 -23
- package/src/ui/screens/SearchSettingsScreen.tsx +11 -19
- package/src/ui/screens/SessionManagementScreen.tsx +29 -3
- package/src/ui/screens/UserLinksScreen.tsx +15 -32
- package/src/ui/screens/WelcomeNewUserScreen.tsx +46 -20
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +4 -6
- package/lib/commonjs/ui/components/GroupedItem.js +0 -138
- package/lib/commonjs/ui/components/GroupedItem.js.map +0 -1
- package/lib/commonjs/ui/components/GroupedSection.js +0 -41
- package/lib/commonjs/ui/components/GroupedSection.js.map +0 -1
- package/lib/commonjs/ui/components/Section.js +0 -39
- package/lib/commonjs/ui/components/Section.js.map +0 -1
- package/lib/commonjs/ui/components/SectionTitle.js +0 -29
- package/lib/commonjs/ui/components/SectionTitle.js.map +0 -1
- package/lib/commonjs/ui/components/SettingRow.js +0 -96
- package/lib/commonjs/ui/components/SettingRow.js.map +0 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +0 -208
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +0 -1
- package/lib/module/ui/components/GroupedItem.js +0 -135
- package/lib/module/ui/components/GroupedItem.js.map +0 -1
- package/lib/module/ui/components/GroupedSection.js +0 -37
- package/lib/module/ui/components/GroupedSection.js.map +0 -1
- package/lib/module/ui/components/Section.js +0 -34
- package/lib/module/ui/components/Section.js.map +0 -1
- package/lib/module/ui/components/SectionTitle.js +0 -25
- package/lib/module/ui/components/SectionTitle.js.map +0 -1
- package/lib/module/ui/components/SettingRow.js +0 -91
- package/lib/module/ui/components/SettingRow.js.map +0 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +0 -204
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts +0 -24
- package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts +0 -30
- package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Section.d.ts +0 -12
- package/lib/typescript/commonjs/ui/components/Section.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SectionTitle.d.ts +0 -10
- package/lib/typescript/commonjs/ui/components/SectionTitle.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SettingRow.d.ts +0 -20
- package/lib/typescript/commonjs/ui/components/SettingRow.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.d.ts +0 -24
- package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/GroupedItem.d.ts +0 -24
- package/lib/typescript/module/ui/components/GroupedItem.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/GroupedSection.d.ts +0 -30
- package/lib/typescript/module/ui/components/GroupedSection.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Section.d.ts +0 -12
- package/lib/typescript/module/ui/components/Section.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SectionTitle.d.ts +0 -10
- package/lib/typescript/module/ui/components/SectionTitle.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SettingRow.d.ts +0 -20
- package/lib/typescript/module/ui/components/SettingRow.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/internal/GroupedPillButtons.d.ts +0 -24
- package/lib/typescript/module/ui/components/internal/GroupedPillButtons.d.ts.map +0 -1
- package/src/ui/components/GroupedItem.tsx +0 -161
- package/src/ui/components/GroupedSection.tsx +0 -60
- package/src/ui/components/Section.tsx +0 -42
- package/src/ui/components/SectionTitle.tsx +0 -27
- package/src/ui/components/SettingRow.tsx +0 -105
- package/src/ui/components/internal/GroupedPillButtons.tsx +0 -253
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
Dimensions,
|
|
20
20
|
Platform,
|
|
21
21
|
Linking,
|
|
22
|
+
useWindowDimensions,
|
|
22
23
|
} from 'react-native';
|
|
23
24
|
import Animated, {
|
|
24
25
|
useSharedValue,
|
|
@@ -32,6 +33,7 @@ import QRCode from 'react-native-qrcode-svg';
|
|
|
32
33
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
33
34
|
import { Button } from '@oxyhq/bloom/button';
|
|
34
35
|
import { Loading } from '@oxyhq/bloom/loading';
|
|
36
|
+
import { BottomSheet, type BottomSheetRef } from '@oxyhq/bloom/bottom-sheet';
|
|
35
37
|
import { useOxy } from '../context/OxyContext';
|
|
36
38
|
import OxyLogo from './OxyLogo';
|
|
37
39
|
import { createDebugLogger } from '@oxyhq/core';
|
|
@@ -84,8 +86,11 @@ export const subscribeToSignInModal = (listener: (visible: boolean) => void): ((
|
|
|
84
86
|
return () => visibilityListeners.delete(listener);
|
|
85
87
|
};
|
|
86
88
|
|
|
89
|
+
type ModalView = 'main' | 'qr';
|
|
90
|
+
|
|
87
91
|
const SignInModal: React.FC = () => {
|
|
88
92
|
const [visible, setVisible] = useState(false);
|
|
93
|
+
const [view, setView] = useState<ModalView>('main');
|
|
89
94
|
const [authSession, setAuthSession] = useState<AuthSession | null>(null);
|
|
90
95
|
const [isLoading, setIsLoading] = useState(false);
|
|
91
96
|
const [error, setError] = useState<string | null>(null);
|
|
@@ -93,11 +98,14 @@ const SignInModal: React.FC = () => {
|
|
|
93
98
|
|
|
94
99
|
const insets = useSafeAreaInsets();
|
|
95
100
|
const theme = useTheme();
|
|
101
|
+
const { width: windowWidth } = useWindowDimensions();
|
|
102
|
+
const isWide = windowWidth >= 768;
|
|
96
103
|
const { oxyServices, switchSession } = useOxy();
|
|
97
104
|
|
|
98
105
|
const socketRef = useRef<Socket | null>(null);
|
|
99
106
|
const pollingIntervalRef = useRef<ReturnType<typeof setInterval> | null>(null);
|
|
100
107
|
const isProcessingRef = useRef(false);
|
|
108
|
+
const sheetRef = useRef<BottomSheetRef>(null);
|
|
101
109
|
|
|
102
110
|
// Animation values
|
|
103
111
|
const opacity = useSharedValue(0);
|
|
@@ -117,12 +125,15 @@ const SignInModal: React.FC = () => {
|
|
|
117
125
|
if (visible) {
|
|
118
126
|
opacity.value = withTiming(1, { duration: 250 });
|
|
119
127
|
scale.value = withTiming(1, { duration: 250 });
|
|
128
|
+
setView('main');
|
|
120
129
|
generateAuthSession();
|
|
130
|
+
if (!isWide) sheetRef.current?.present();
|
|
121
131
|
} else {
|
|
122
132
|
opacity.value = withTiming(0, { duration: 200 });
|
|
123
133
|
scale.value = withTiming(0.9, { duration: 200 });
|
|
134
|
+
if (!isWide) sheetRef.current?.dismiss();
|
|
124
135
|
}
|
|
125
|
-
}, [visible]);
|
|
136
|
+
}, [visible, isWide]);
|
|
126
137
|
|
|
127
138
|
const backdropStyle = useAnimatedStyle(() => ({
|
|
128
139
|
opacity: opacity.value,
|
|
@@ -138,6 +149,16 @@ const SignInModal: React.FC = () => {
|
|
|
138
149
|
if (isProcessingRef.current) return;
|
|
139
150
|
isProcessingRef.current = true;
|
|
140
151
|
|
|
152
|
+
// Dismiss the in-app browser (if any) so the user returns to the app.
|
|
153
|
+
if (Platform.OS !== 'web') {
|
|
154
|
+
try {
|
|
155
|
+
const WebBrowser = await import('expo-web-browser');
|
|
156
|
+
WebBrowser.dismissBrowser();
|
|
157
|
+
} catch {
|
|
158
|
+
/* expo-web-browser not available */
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
141
162
|
try {
|
|
142
163
|
if (switchSession) {
|
|
143
164
|
await switchSession(sessionId);
|
|
@@ -169,6 +190,11 @@ const SignInModal: React.FC = () => {
|
|
|
169
190
|
|
|
170
191
|
// Connect to socket for real-time updates
|
|
171
192
|
const connectSocket = useCallback((sessionToken: string) => {
|
|
193
|
+
// Disconnect any pre-existing socket to avoid duplicates on re-renders.
|
|
194
|
+
if (socketRef.current) {
|
|
195
|
+
socketRef.current.disconnect();
|
|
196
|
+
socketRef.current = null;
|
|
197
|
+
}
|
|
172
198
|
const baseURL = oxyServices.getBaseURL();
|
|
173
199
|
|
|
174
200
|
const socket = io(`${baseURL}/auth-session`, {
|
|
@@ -318,8 +344,17 @@ const SignInModal: React.FC = () => {
|
|
|
318
344
|
`width=${width},height=${height},left=${left},top=${top},popup=1`
|
|
319
345
|
);
|
|
320
346
|
} else {
|
|
321
|
-
// Open in browser on native
|
|
322
|
-
|
|
347
|
+
// Open in in-app browser on native via expo-web-browser. Falls back
|
|
348
|
+
// to system browser if expo-web-browser is not available.
|
|
349
|
+
try {
|
|
350
|
+
const WebBrowser = await import('expo-web-browser');
|
|
351
|
+
await WebBrowser.openBrowserAsync(webUrl.toString(), {
|
|
352
|
+
presentationStyle: WebBrowser.WebBrowserPresentationStyle.PAGE_SHEET,
|
|
353
|
+
dismissButtonStyle: 'close',
|
|
354
|
+
});
|
|
355
|
+
} catch {
|
|
356
|
+
Linking.openURL(webUrl.toString());
|
|
357
|
+
}
|
|
323
358
|
}
|
|
324
359
|
}, [authSession, oxyServices]);
|
|
325
360
|
|
|
@@ -342,30 +377,24 @@ const SignInModal: React.FC = () => {
|
|
|
342
377
|
};
|
|
343
378
|
}, [cleanup]);
|
|
344
379
|
|
|
345
|
-
if (!visible) return null;
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
<TouchableOpacity style={
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
<Text className="text-foreground" style={styles.title}>Sign in with Oxy</Text>
|
|
362
|
-
<Text className="text-muted-foreground" style={styles.subtitle}>
|
|
363
|
-
Scan with Oxy Accounts app or use the button below
|
|
364
|
-
</Text>
|
|
365
|
-
</View>
|
|
366
|
-
|
|
367
|
-
{isLoading ? (
|
|
380
|
+
if (!visible && isWide) return null;
|
|
381
|
+
|
|
382
|
+
const innerContent = (
|
|
383
|
+
<>
|
|
384
|
+
{!isWide && view === 'qr' ? (
|
|
385
|
+
<TouchableOpacity style={styles.backButton} onPress={() => setView('main')} accessibilityLabel="Back">
|
|
386
|
+
<Text style={styles.backButtonText}>‹</Text>
|
|
387
|
+
</TouchableOpacity>
|
|
388
|
+
) : null}
|
|
389
|
+
{isWide ? (
|
|
390
|
+
<TouchableOpacity style={styles.closeButton} onPress={handleClose} accessibilityLabel="Close">
|
|
391
|
+
<Text style={styles.closeButtonText}>×</Text>
|
|
392
|
+
</TouchableOpacity>
|
|
393
|
+
) : null}
|
|
394
|
+
|
|
395
|
+
{isLoading ? (
|
|
368
396
|
<View style={styles.loadingContainer}>
|
|
397
|
+
<OxyLogo variant="icon" size={56} />
|
|
369
398
|
<Loading size="large" />
|
|
370
399
|
<Text className="text-muted-foreground" style={styles.loadingText}>
|
|
371
400
|
Preparing sign in...
|
|
@@ -373,12 +402,20 @@ const SignInModal: React.FC = () => {
|
|
|
373
402
|
</View>
|
|
374
403
|
) : error ? (
|
|
375
404
|
<View style={styles.errorContainer}>
|
|
405
|
+
<OxyLogo variant="icon" size={56} />
|
|
376
406
|
<Text className="text-destructive" style={styles.errorText}>{error}</Text>
|
|
377
407
|
<Button onPress={handleRefresh}>Try Again</Button>
|
|
378
408
|
</View>
|
|
379
|
-
) : (
|
|
409
|
+
) : isWide ? (
|
|
380
410
|
<>
|
|
381
|
-
{
|
|
411
|
+
<View style={styles.header}>
|
|
412
|
+
<OxyLogo variant="icon" size={56} />
|
|
413
|
+
<Text style={[styles.title, { color: theme.colors.text }]}>Sign in with Oxy</Text>
|
|
414
|
+
<Text style={[styles.subtitle, { color: theme.colors.textSecondary }]}>
|
|
415
|
+
Scan with Oxy Accounts app or use the button below
|
|
416
|
+
</Text>
|
|
417
|
+
</View>
|
|
418
|
+
|
|
382
419
|
<View style={[styles.qrContainer, { backgroundColor: 'white' }]}>
|
|
383
420
|
{authSession ? (
|
|
384
421
|
<QRCode
|
|
@@ -392,14 +429,12 @@ const SignInModal: React.FC = () => {
|
|
|
392
429
|
)}
|
|
393
430
|
</View>
|
|
394
431
|
|
|
395
|
-
{/* Divider */}
|
|
396
432
|
<View style={styles.dividerContainer}>
|
|
397
|
-
<View style={[styles.divider, { backgroundColor:
|
|
398
|
-
<Text style={[styles.dividerText, { color:
|
|
399
|
-
<View style={[styles.divider, { backgroundColor:
|
|
433
|
+
<View style={[styles.divider, { backgroundColor: theme.colors.border }]} />
|
|
434
|
+
<Text style={[styles.dividerText, { color: theme.colors.textTertiary }]}>or</Text>
|
|
435
|
+
<View style={[styles.divider, { backgroundColor: theme.colors.border }]} />
|
|
400
436
|
</View>
|
|
401
437
|
|
|
402
|
-
{/* Open Auth Popup Button */}
|
|
403
438
|
<Button
|
|
404
439
|
onPress={handleOpenAuthPopup}
|
|
405
440
|
icon={<OxyLogo variant="icon" size={20} fillColor={theme.colors.card} />}
|
|
@@ -407,17 +442,94 @@ const SignInModal: React.FC = () => {
|
|
|
407
442
|
Open Oxy Auth
|
|
408
443
|
</Button>
|
|
409
444
|
|
|
410
|
-
{/* Status */}
|
|
411
445
|
{isWaiting && (
|
|
412
446
|
<View style={styles.statusContainer}>
|
|
413
447
|
<Loading size="small" />
|
|
414
|
-
<Text style={styles.statusText}>
|
|
415
|
-
Waiting for authorization
|
|
448
|
+
<Text style={[styles.statusText, { color: theme.colors.textSecondary }]}>
|
|
449
|
+
Waiting for authorization…
|
|
450
|
+
</Text>
|
|
451
|
+
</View>
|
|
452
|
+
)}
|
|
453
|
+
</>
|
|
454
|
+
) : view === 'main' ? (
|
|
455
|
+
<>
|
|
456
|
+
<View style={styles.header}>
|
|
457
|
+
<OxyLogo variant="icon" size={56} />
|
|
458
|
+
<Text style={[styles.title, { color: theme.colors.text }]}>Sign in with Oxy</Text>
|
|
459
|
+
<Text style={[styles.subtitle, { color: theme.colors.textSecondary }]}>
|
|
460
|
+
One account for the whole Oxy ecosystem. Continue to authorize this device.
|
|
461
|
+
</Text>
|
|
462
|
+
</View>
|
|
463
|
+
|
|
464
|
+
<View style={styles.actions}>
|
|
465
|
+
<Button
|
|
466
|
+
onPress={handleOpenAuthPopup}
|
|
467
|
+
icon={<OxyLogo variant="icon" size={20} fillColor={theme.colors.card} />}
|
|
468
|
+
>
|
|
469
|
+
Continue with Oxy
|
|
470
|
+
</Button>
|
|
471
|
+
|
|
472
|
+
<Button variant="ghost" onPress={() => setView('qr')}>
|
|
473
|
+
Scan QR code instead
|
|
474
|
+
</Button>
|
|
475
|
+
</View>
|
|
476
|
+
</>
|
|
477
|
+
) : (
|
|
478
|
+
<>
|
|
479
|
+
<View style={styles.header}>
|
|
480
|
+
<Text style={[styles.title, { color: theme.colors.text }]}>Scan QR</Text>
|
|
481
|
+
<Text style={[styles.subtitle, { color: theme.colors.textSecondary }]}>
|
|
482
|
+
Open the Oxy Accounts app on another device and scan this code.
|
|
483
|
+
</Text>
|
|
484
|
+
</View>
|
|
485
|
+
|
|
486
|
+
<View style={[styles.qrContainer, { backgroundColor: 'white' }]}>
|
|
487
|
+
{authSession ? (
|
|
488
|
+
<QRCode
|
|
489
|
+
value={getQRData()}
|
|
490
|
+
size={220}
|
|
491
|
+
backgroundColor="white"
|
|
492
|
+
color="black"
|
|
493
|
+
/>
|
|
494
|
+
) : (
|
|
495
|
+
<Loading size="large" />
|
|
496
|
+
)}
|
|
497
|
+
</View>
|
|
498
|
+
|
|
499
|
+
{isWaiting && (
|
|
500
|
+
<View style={styles.statusContainer}>
|
|
501
|
+
<Loading size="small" />
|
|
502
|
+
<Text style={[styles.statusText, { color: theme.colors.textSecondary }]}>
|
|
503
|
+
Waiting for authorization…
|
|
416
504
|
</Text>
|
|
417
505
|
</View>
|
|
418
506
|
)}
|
|
419
507
|
</>
|
|
420
508
|
)}
|
|
509
|
+
</>
|
|
510
|
+
);
|
|
511
|
+
|
|
512
|
+
if (!isWide) {
|
|
513
|
+
return (
|
|
514
|
+
<BottomSheet
|
|
515
|
+
ref={sheetRef}
|
|
516
|
+
onDismiss={handleClose}
|
|
517
|
+
enablePanDownToClose
|
|
518
|
+
>
|
|
519
|
+
<View style={[styles.sheetContent, { paddingBottom: insets.bottom + 24 }]}>
|
|
520
|
+
{innerContent}
|
|
521
|
+
</View>
|
|
522
|
+
</BottomSheet>
|
|
523
|
+
);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
return (
|
|
527
|
+
<Modal visible={visible} transparent animationType="none" statusBarTranslucent onRequestClose={handleClose}>
|
|
528
|
+
<Animated.View style={[styles.backdrop, { backgroundColor: theme.colors.overlay }, backdropStyle]}>
|
|
529
|
+
<TouchableOpacity style={StyleSheet.absoluteFill} onPress={handleClose} activeOpacity={1} />
|
|
530
|
+
|
|
531
|
+
<Animated.View style={[styles.content, contentStyle, { paddingTop: insets.top + 20, paddingBottom: insets.bottom + 20 }]}>
|
|
532
|
+
{innerContent}
|
|
421
533
|
</Animated.View>
|
|
422
534
|
</Animated.View>
|
|
423
535
|
</Modal>
|
|
@@ -454,19 +566,51 @@ const styles = StyleSheet.create({
|
|
|
454
566
|
fontWeight: '300',
|
|
455
567
|
lineHeight: 32,
|
|
456
568
|
},
|
|
569
|
+
backButton: {
|
|
570
|
+
position: 'absolute',
|
|
571
|
+
top: 16,
|
|
572
|
+
left: 16,
|
|
573
|
+
width: 40,
|
|
574
|
+
height: 40,
|
|
575
|
+
borderRadius: 20,
|
|
576
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
577
|
+
justifyContent: 'center',
|
|
578
|
+
alignItems: 'center',
|
|
579
|
+
zIndex: 10,
|
|
580
|
+
},
|
|
581
|
+
backButtonText: {
|
|
582
|
+
color: 'white',
|
|
583
|
+
fontSize: 32,
|
|
584
|
+
fontWeight: '300',
|
|
585
|
+
lineHeight: 32,
|
|
586
|
+
marginRight: 2,
|
|
587
|
+
},
|
|
588
|
+
actions: {
|
|
589
|
+
width: '100%',
|
|
590
|
+
gap: 12,
|
|
591
|
+
},
|
|
592
|
+
sheetContent: {
|
|
593
|
+
paddingHorizontal: 24,
|
|
594
|
+
paddingTop: 48,
|
|
595
|
+
paddingBottom: 32,
|
|
596
|
+
alignItems: 'center',
|
|
597
|
+
gap: 24,
|
|
598
|
+
width: '100%',
|
|
599
|
+
},
|
|
457
600
|
header: {
|
|
458
601
|
alignItems: 'center',
|
|
459
|
-
|
|
602
|
+
gap: 8,
|
|
460
603
|
},
|
|
461
604
|
title: {
|
|
462
|
-
fontSize:
|
|
463
|
-
fontWeight: '
|
|
464
|
-
marginTop:
|
|
605
|
+
fontSize: 24,
|
|
606
|
+
fontWeight: '700',
|
|
607
|
+
marginTop: 8,
|
|
465
608
|
},
|
|
466
609
|
subtitle: {
|
|
467
|
-
fontSize:
|
|
468
|
-
marginTop: 8,
|
|
610
|
+
fontSize: 14,
|
|
469
611
|
textAlign: 'center',
|
|
612
|
+
lineHeight: 20,
|
|
613
|
+
maxWidth: 320,
|
|
470
614
|
},
|
|
471
615
|
qrContainer: {
|
|
472
616
|
padding: 20,
|
|
@@ -9,7 +9,7 @@ import type { FileMetadata } from '@oxyhq/core';
|
|
|
9
9
|
import { formatFileSize } from '../../utils/fileManagement';
|
|
10
10
|
import { fileManagementStyles } from './styles';
|
|
11
11
|
import { Colors } from '../../constants/theme';
|
|
12
|
-
import {
|
|
12
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
13
13
|
|
|
14
14
|
interface FileViewerProps {
|
|
15
15
|
file: FileMetadata;
|
|
@@ -105,53 +105,53 @@ export const FileViewer: React.FC<FileViewerProps> = ({
|
|
|
105
105
|
}, [imageDimensions, containerWidth]);
|
|
106
106
|
|
|
107
107
|
const fileDetailItems = useMemo(() => {
|
|
108
|
-
const items = [
|
|
108
|
+
const items: Array<{ id: string; iconName: string; iconColor: string; title: string; description: string }> = [
|
|
109
109
|
{
|
|
110
110
|
id: 'filename',
|
|
111
|
-
|
|
111
|
+
iconName: 'file-document',
|
|
112
112
|
iconColor: constantColors.iconSecurity,
|
|
113
113
|
title: 'File Name',
|
|
114
|
-
|
|
114
|
+
description: file.filename,
|
|
115
115
|
},
|
|
116
116
|
{
|
|
117
117
|
id: 'size',
|
|
118
|
-
|
|
118
|
+
iconName: 'server',
|
|
119
119
|
iconColor: constantColors.iconStorage,
|
|
120
120
|
title: 'Size',
|
|
121
|
-
|
|
121
|
+
description: formatFileSize(file.length),
|
|
122
122
|
},
|
|
123
123
|
{
|
|
124
124
|
id: 'type',
|
|
125
|
-
|
|
125
|
+
iconName: 'code-tags',
|
|
126
126
|
iconColor: constantColors.iconData,
|
|
127
127
|
title: 'Type',
|
|
128
|
-
|
|
128
|
+
description: file.contentType,
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
id: 'uploaded',
|
|
132
|
-
|
|
132
|
+
iconName: 'clock',
|
|
133
133
|
iconColor: constantColors.iconPersonalInfo,
|
|
134
134
|
title: 'Uploaded',
|
|
135
|
-
|
|
135
|
+
description: new Date(file.uploadDate).toLocaleString(),
|
|
136
136
|
},
|
|
137
137
|
];
|
|
138
138
|
|
|
139
139
|
if (file.metadata?.description) {
|
|
140
140
|
items.push({
|
|
141
141
|
id: 'description',
|
|
142
|
-
|
|
142
|
+
iconName: 'text',
|
|
143
143
|
iconColor: constantColors.iconData,
|
|
144
144
|
title: 'Description',
|
|
145
|
-
|
|
145
|
+
description: file.metadata.description,
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
items.push({
|
|
150
150
|
id: 'fileId',
|
|
151
|
-
|
|
151
|
+
iconName: 'key',
|
|
152
152
|
iconColor: constantColors.iconSecurity,
|
|
153
153
|
title: 'File ID',
|
|
154
|
-
|
|
154
|
+
description: file.id,
|
|
155
155
|
});
|
|
156
156
|
|
|
157
157
|
return items;
|
|
@@ -366,7 +366,17 @@ export const FileViewer: React.FC<FileViewerProps> = ({
|
|
|
366
366
|
{showFileDetailsInViewer && (
|
|
367
367
|
<>
|
|
368
368
|
<View style={fileManagementStyles.fileDetailsSectionContent}>
|
|
369
|
-
<
|
|
369
|
+
<SettingsListGroup>
|
|
370
|
+
{fileDetailItems.map((item) => (
|
|
371
|
+
<SettingsListItem
|
|
372
|
+
key={item.id}
|
|
373
|
+
icon={<MaterialCommunityIcons name={item.iconName} size={20} color={item.iconColor} />}
|
|
374
|
+
title={item.title}
|
|
375
|
+
description={item.description}
|
|
376
|
+
showChevron={false}
|
|
377
|
+
/>
|
|
378
|
+
))}
|
|
379
|
+
</SettingsListGroup>
|
|
370
380
|
</View>
|
|
371
381
|
|
|
372
382
|
{isOwner && (
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
// Re-export all reusable UI components
|
|
2
2
|
export { default as ProfileCard } from './ProfileCard';
|
|
3
|
-
export { default as Section } from './Section';
|
|
4
|
-
export { default as SectionTitle } from './SectionTitle';
|
|
5
|
-
export { default as GroupedItem } from './GroupedItem';
|
|
6
|
-
export { default as GroupedSection } from './GroupedSection';
|
|
7
3
|
export { default as QuickActions } from './QuickActions';
|
|
8
4
|
export { default as Header, getHeaderHeight } from './Header';
|
|
9
5
|
export { default as LoadingState } from './LoadingState';
|
|
10
6
|
export { default as EmptyState } from './EmptyState';
|
|
11
|
-
export { default as SettingRow } from './SettingRow';
|
|
12
7
|
export { SettingsIcon } from './SettingsIcon';
|
|
13
8
|
|
|
14
9
|
// Re-export existing components
|
|
@@ -2,7 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { View, Text, Animated, TouchableOpacity, Clipboard, Linking } from 'react-native';
|
|
4
4
|
import { Ionicons } from '@expo/vector-icons';
|
|
5
|
-
import
|
|
5
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
6
6
|
import TextField from '../TextField';
|
|
7
7
|
import { FAIRWalletIcon } from '../icon';
|
|
8
8
|
import { createPaymentStyles } from './paymentStyles';
|
|
@@ -200,24 +200,21 @@ const PaymentDetailsStep: React.FC<PaymentDetailsStepProps> = ({
|
|
|
200
200
|
)}
|
|
201
201
|
</View>
|
|
202
202
|
|
|
203
|
-
<
|
|
204
|
-
|
|
205
|
-
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
{
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
]}
|
|
219
|
-
colors={colors}
|
|
220
|
-
/>
|
|
203
|
+
<View style={{ flexDirection: 'row', gap: 8, justifyContent: 'flex-end' }}>
|
|
204
|
+
<Button variant="secondary" onPress={onBack} size="small" icon={<Ionicons name="arrow-back" size={16} />}>
|
|
205
|
+
{t('payment.actions.back')}
|
|
206
|
+
</Button>
|
|
207
|
+
<Button
|
|
208
|
+
variant="primary"
|
|
209
|
+
onPress={onNext}
|
|
210
|
+
size="small"
|
|
211
|
+
icon={<Ionicons name="arrow-forward" size={16} />}
|
|
212
|
+
iconPosition="right"
|
|
213
|
+
disabled={paymentMethod === 'card' && !isCardValid}
|
|
214
|
+
>
|
|
215
|
+
{t('payment.actions.continue')}
|
|
216
|
+
</Button>
|
|
217
|
+
</View>
|
|
221
218
|
</Animated.View>
|
|
222
219
|
);
|
|
223
220
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { View, Text, Animated } from 'react-native';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
4
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
5
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
6
7
|
import { FAIRWalletIcon } from '../icon';
|
|
7
8
|
import { createPaymentStyles } from './paymentStyles';
|
|
8
9
|
import type { PaymentMethod, PaymentColors, PaymentStepAnimations } from './types';
|
|
@@ -49,42 +50,39 @@ const PaymentMethodStep: React.FC<PaymentMethodStepProps> = ({
|
|
|
49
50
|
<View style={styles.section}>
|
|
50
51
|
<Text style={styles.sectionTitle}>{t('payment.method.title')}</Text>
|
|
51
52
|
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
icon: method.key === 'faircoin' ? undefined : method.icon,
|
|
56
|
-
iconColor: method.key === 'card' ? '#007AFF' :
|
|
53
|
+
<SettingsListGroup>
|
|
54
|
+
{availablePaymentMethods.map(method => {
|
|
55
|
+
const iconColor = method.key === 'card' ? '#007AFF' :
|
|
57
56
|
method.key === 'oxy' ? '#32D74B' :
|
|
58
|
-
method.key === 'faircoin' ? '#9ffb50' : colors.primary
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
method.key === 'faircoin' ? '#9ffb50' : colors.primary;
|
|
58
|
+
const iconElement = method.key === 'faircoin'
|
|
59
|
+
? <FAIRWalletIcon size={20} />
|
|
60
|
+
: <Ionicons name={method.icon} size={20} color={iconColor} />;
|
|
61
|
+
return (
|
|
62
|
+
<SettingsListItem
|
|
63
|
+
key={method.key}
|
|
64
|
+
icon={iconElement}
|
|
65
|
+
title={t(`payment.methods.${method.key}.label`)}
|
|
66
|
+
description={t(`payment.methods.${method.key}.description`)}
|
|
67
|
+
onPress={() => onSelectMethod(method.key)}
|
|
68
|
+
showChevron={false}
|
|
69
|
+
rightElement={selectedMethod === method.key ? (
|
|
70
|
+
<Ionicons name="checkmark-circle" size={20} color={colors.primary} />
|
|
71
|
+
) : undefined}
|
|
72
|
+
/>
|
|
73
|
+
);
|
|
74
|
+
})}
|
|
75
|
+
</SettingsListGroup>
|
|
69
76
|
</View>
|
|
70
77
|
|
|
71
|
-
<
|
|
72
|
-
|
|
73
|
-
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
{
|
|
80
|
-
text: t('payment.actions.continue'),
|
|
81
|
-
onPress: onNext,
|
|
82
|
-
icon: 'arrow-forward',
|
|
83
|
-
variant: 'primary',
|
|
84
|
-
},
|
|
85
|
-
]}
|
|
86
|
-
colors={colors}
|
|
87
|
-
/>
|
|
78
|
+
<View style={{ flexDirection: 'row', gap: 8, justifyContent: 'flex-end' }}>
|
|
79
|
+
<Button variant="secondary" onPress={onBack} size="small" icon={<Ionicons name="arrow-back" size={16} />}>
|
|
80
|
+
{t('payment.actions.back')}
|
|
81
|
+
</Button>
|
|
82
|
+
<Button variant="primary" onPress={onNext} size="small" icon={<Ionicons name="arrow-forward" size={16} />} iconPosition="right">
|
|
83
|
+
{t('payment.actions.continue')}
|
|
84
|
+
</Button>
|
|
85
|
+
</View>
|
|
88
86
|
</Animated.View>
|
|
89
87
|
);
|
|
90
88
|
};
|