@oxyhq/services 6.9.44 → 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/OxyPayButton.js +4 -2
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +6 -5
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +83 -82
- package/lib/commonjs/ui/components/OxySignInButton.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/FileDetailsModal.js +76 -121
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.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/fileManagement/UploadPreview.js +32 -18
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/icon/OxyIcon.js +5 -4
- package/lib/commonjs/ui/components/icon/OxyIcon.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/internal/PinInput.js +3 -2
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +83 -219
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.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/constants/theme.js +2 -2
- package/lib/commonjs/ui/constants/theme.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 +13 -13
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +117 -142
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +112 -78
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +213 -144
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +26 -14
- 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 +108 -86
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +109 -130
- 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/PremiumSubscriptionScreen.js +66 -93
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.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 +127 -70
- 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/commonjs/ui/utils/fileManagement.js +0 -21
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +4 -2
- package/lib/module/ui/components/OxyPayButton.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/OxySignInButton.js +84 -83
- package/lib/module/ui/components/OxySignInButton.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/FileDetailsModal.js +76 -122
- package/lib/module/ui/components/fileManagement/FileDetailsModal.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/fileManagement/UploadPreview.js +32 -19
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/icon/OxyIcon.js +5 -4
- package/lib/module/ui/components/icon/OxyIcon.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/internal/PinInput.js +3 -2
- package/lib/module/ui/components/internal/PinInput.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +83 -220
- package/lib/module/ui/components/modals/DeleteAccountModal.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/constants/theme.js +2 -2
- package/lib/module/ui/constants/theme.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 +12 -13
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +117 -142
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +112 -78
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +213 -145
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +28 -16
- 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 +110 -88
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +110 -131
- 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/PremiumSubscriptionScreen.js +66 -94
- package/lib/module/ui/screens/PremiumSubscriptionScreen.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 +128 -72
- 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/module/ui/utils/fileManagement.js +0 -20
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts +0 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +3 -4
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts +2 -3
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/icon/OxyIcon.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/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.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/PremiumSubscriptionScreen.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/commonjs/ui/utils/fileManagement.d.ts +0 -4
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts +0 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +3 -4
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts +2 -3
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/icon/OxyIcon.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/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +2 -2
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.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/PremiumSubscriptionScreen.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/lib/typescript/module/ui/utils/fileManagement.d.ts +0 -4
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/ui/components/OxyPayButton.tsx +5 -3
- package/src/ui/components/OxyProvider.tsx +6 -5
- package/src/ui/components/OxySignInButton.tsx +82 -81
- package/src/ui/components/SignInModal.tsx +186 -42
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +69 -99
- package/src/ui/components/fileManagement/FileViewer.tsx +25 -15
- package/src/ui/components/fileManagement/UploadPreview.tsx +58 -46
- package/src/ui/components/icon/OxyIcon.tsx +5 -4
- package/src/ui/components/index.ts +0 -5
- package/src/ui/components/internal/PinInput.tsx +4 -3
- package/src/ui/components/modals/DeleteAccountModal.tsx +79 -221
- 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/constants/theme.ts +2 -2
- package/src/ui/context/hooks/useAuthOperations.ts +4 -3
- package/src/ui/screens/AccountCenterScreen.tsx +36 -139
- package/src/ui/screens/AccountOverviewScreen.tsx +107 -163
- package/src/ui/screens/AccountSettingsScreen.tsx +142 -156
- package/src/ui/screens/AccountSwitcherScreen.tsx +226 -199
- package/src/ui/screens/AccountVerificationScreen.tsx +34 -25
- package/src/ui/screens/FeedbackScreen.tsx +50 -38
- package/src/ui/screens/FileManagementScreen.tsx +88 -88
- package/src/ui/screens/HistoryViewScreen.tsx +79 -207
- 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/PremiumSubscriptionScreen.tsx +73 -93
- 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 +130 -76
- 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/src/ui/utils/fileManagement.ts +0 -30
- 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 -90
- package/lib/commonjs/ui/components/SettingRow.js.map +0 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +0 -206
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +0 -1
- package/lib/commonjs/ui/utils/confirmAction.js +0 -28
- package/lib/commonjs/ui/utils/confirmAction.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 -85
- package/lib/module/ui/components/SettingRow.js.map +0 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +0 -202
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +0 -1
- package/lib/module/ui/utils/confirmAction.js +0 -25
- package/lib/module/ui/utils/confirmAction.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/commonjs/ui/utils/confirmAction.d.ts +0 -7
- package/lib/typescript/commonjs/ui/utils/confirmAction.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/lib/typescript/module/ui/utils/confirmAction.d.ts +0 -7
- package/lib/typescript/module/ui/utils/confirmAction.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 -98
- package/src/ui/components/internal/GroupedPillButtons.tsx +0 -250
- package/src/ui/utils/confirmAction.ts +0 -23
|
@@ -1,33 +1,22 @@
|
|
|
1
1
|
import React, { useState, useCallback } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
View,
|
|
4
|
-
StyleSheet,
|
|
5
|
-
ScrollView,
|
|
6
|
-
} from 'react-native';
|
|
2
|
+
import { View, StyleSheet, ScrollView } from 'react-native';
|
|
7
3
|
import type { BaseScreenProps } from '../types/navigation';
|
|
8
4
|
import { toast } from '../../lib/sonner';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { Header, LoadingState, EmptyState } from '../components';
|
|
6
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
7
|
+
import { SettingsIcon } from '../components/SettingsIcon';
|
|
11
8
|
import { useI18n } from '../hooks/useI18n';
|
|
12
9
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
13
10
|
import { useColorScheme } from '../hooks/useColorScheme';
|
|
14
11
|
import { Colors } from '../constants/theme';
|
|
15
12
|
import { normalizeColorScheme } from '../utils/themeUtils';
|
|
16
13
|
import { useOxy } from '../context/OxyContext';
|
|
14
|
+
import * as Prompt from '@oxyhq/bloom/prompt';
|
|
15
|
+
import { usePromptControl } from '@oxyhq/bloom/prompt';
|
|
17
16
|
|
|
18
|
-
interface HistoryItem {
|
|
19
|
-
id: string;
|
|
20
|
-
query: string;
|
|
21
|
-
type: 'search' | 'browse';
|
|
22
|
-
timestamp: Date;
|
|
23
|
-
}
|
|
17
|
+
interface HistoryItem { id: string; query: string; type: 'search' | 'browse'; timestamp: Date; }
|
|
24
18
|
|
|
25
|
-
const HistoryViewScreen: React.FC<BaseScreenProps> = ({
|
|
26
|
-
onClose,
|
|
27
|
-
theme,
|
|
28
|
-
goBack,
|
|
29
|
-
}) => {
|
|
30
|
-
// Use useOxy() hook for OxyContext values
|
|
19
|
+
const HistoryViewScreen: React.FC<BaseScreenProps> = ({ onClose, theme, goBack }) => {
|
|
31
20
|
const { user } = useOxy();
|
|
32
21
|
const { t } = useI18n();
|
|
33
22
|
const bloomTheme = useTheme();
|
|
@@ -37,227 +26,110 @@ const HistoryViewScreen: React.FC<BaseScreenProps> = ({
|
|
|
37
26
|
const [history, setHistory] = useState<HistoryItem[]>([]);
|
|
38
27
|
const [isLoading, setIsLoading] = useState(true);
|
|
39
28
|
const [isDeleting, setIsDeleting] = useState(false);
|
|
29
|
+
const deleteLast15Prompt = usePromptControl();
|
|
30
|
+
const clearAllPrompt = usePromptControl();
|
|
40
31
|
|
|
41
|
-
// Helper to get storage
|
|
42
32
|
const getStorage = async () => {
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
if (isReactNative) {
|
|
33
|
+
const isRN = typeof navigator !== 'undefined' && navigator.product === 'ReactNative';
|
|
34
|
+
if (isRN) {
|
|
46
35
|
try {
|
|
47
|
-
const
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
removeItem: (key: string) => Promise<void>;
|
|
52
|
-
};
|
|
53
|
-
return {
|
|
54
|
-
getItem: storage.getItem.bind(storage),
|
|
55
|
-
setItem: storage.setItem.bind(storage),
|
|
56
|
-
removeItem: storage.removeItem.bind(storage),
|
|
57
|
-
};
|
|
58
|
-
} catch (error) {
|
|
59
|
-
if (__DEV__) {
|
|
60
|
-
console.error('AsyncStorage not available:', error);
|
|
61
|
-
}
|
|
62
|
-
throw new Error('AsyncStorage is required in React Native environment');
|
|
63
|
-
}
|
|
64
|
-
} else {
|
|
65
|
-
// Use localStorage for web
|
|
66
|
-
return {
|
|
67
|
-
getItem: async (key: string) => {
|
|
68
|
-
if (typeof window !== 'undefined' && window.localStorage) {
|
|
69
|
-
return window.localStorage.getItem(key);
|
|
70
|
-
}
|
|
71
|
-
return null;
|
|
72
|
-
},
|
|
73
|
-
setItem: async (key: string, value: string) => {
|
|
74
|
-
if (typeof window !== 'undefined' && window.localStorage) {
|
|
75
|
-
window.localStorage.setItem(key, value);
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
removeItem: async (key: string) => {
|
|
79
|
-
if (typeof window !== 'undefined' && window.localStorage) {
|
|
80
|
-
window.localStorage.removeItem(key);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
};
|
|
36
|
+
const mod = await import('@react-native-async-storage/async-storage');
|
|
37
|
+
const s = mod.default as unknown as { getItem: (k: string) => Promise<string | null>; setItem: (k: string, v: string) => Promise<void>; removeItem: (k: string) => Promise<void> };
|
|
38
|
+
return { getItem: s.getItem.bind(s), setItem: s.setItem.bind(s), removeItem: s.removeItem.bind(s) };
|
|
39
|
+
} catch (e) { if (__DEV__) console.error('AsyncStorage not available:', e); throw new Error('AsyncStorage required'); }
|
|
84
40
|
}
|
|
41
|
+
return {
|
|
42
|
+
getItem: async (k: string) => typeof window !== 'undefined' && window.localStorage ? window.localStorage.getItem(k) : null,
|
|
43
|
+
setItem: async (k: string, v: string) => { if (typeof window !== 'undefined' && window.localStorage) window.localStorage.setItem(k, v); },
|
|
44
|
+
removeItem: async (k: string) => { if (typeof window !== 'undefined' && window.localStorage) window.localStorage.removeItem(k); },
|
|
45
|
+
};
|
|
85
46
|
};
|
|
86
47
|
|
|
87
|
-
// TODO: Integrate with backend API for history storage
|
|
88
|
-
// Currently uses local storage only. Should fetch from backend API and sync across devices.
|
|
89
|
-
// Load history from storage
|
|
90
48
|
React.useEffect(() => {
|
|
91
|
-
const
|
|
49
|
+
const load = async () => {
|
|
92
50
|
try {
|
|
93
51
|
setIsLoading(true);
|
|
94
52
|
const storage = await getStorage();
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const parsed = JSON.parse(stored);
|
|
100
|
-
setHistory(parsed.map((item: any) => ({
|
|
101
|
-
...item,
|
|
102
|
-
timestamp: new Date(item.timestamp),
|
|
103
|
-
})));
|
|
104
|
-
} else {
|
|
105
|
-
setHistory([]);
|
|
106
|
-
}
|
|
107
|
-
} catch (error) {
|
|
108
|
-
setHistory([]);
|
|
109
|
-
} finally {
|
|
110
|
-
setIsLoading(false);
|
|
111
|
-
}
|
|
53
|
+
const stored = await storage.getItem(`history_${user?.id || 'guest'}`);
|
|
54
|
+
if (stored) { const parsed = JSON.parse(stored); setHistory(parsed.map((i: HistoryItem) => ({ ...i, timestamp: new Date(i.timestamp) }))); }
|
|
55
|
+
else setHistory([]);
|
|
56
|
+
} catch { setHistory([]); } finally { setIsLoading(false); }
|
|
112
57
|
};
|
|
113
|
-
|
|
114
|
-
loadHistory();
|
|
58
|
+
load();
|
|
115
59
|
}, [user?.id]);
|
|
116
60
|
|
|
117
61
|
const handleDeleteLast15Minutes = useCallback(async () => {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
// Save to storage
|
|
129
|
-
const storage = await getStorage();
|
|
130
|
-
const historyKey = `history_${user?.id || 'guest'}`;
|
|
131
|
-
await storage.setItem(historyKey, JSON.stringify(filtered));
|
|
132
|
-
|
|
133
|
-
toast.success(t('history.deleteLast15Minutes.success') || 'Last 15 minutes deleted');
|
|
134
|
-
} catch (error) {
|
|
135
|
-
if (__DEV__) {
|
|
136
|
-
console.error('Failed to delete history:', error);
|
|
137
|
-
}
|
|
138
|
-
toast.error(t('history.deleteLast15Minutes.error') || 'Failed to delete history');
|
|
139
|
-
} finally {
|
|
140
|
-
setIsDeleting(false);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
);
|
|
62
|
+
try {
|
|
63
|
+
setIsDeleting(true);
|
|
64
|
+
const cutoff = new Date(Date.now() - 15 * 60 * 1000);
|
|
65
|
+
const filtered = history.filter(item => item.timestamp < cutoff);
|
|
66
|
+
setHistory(filtered);
|
|
67
|
+
const storage = await getStorage();
|
|
68
|
+
await storage.setItem(`history_${user?.id || 'guest'}`, JSON.stringify(filtered));
|
|
69
|
+
toast.success(t('history.deleteLast15Minutes.success') || 'Last 15 minutes deleted');
|
|
70
|
+
} catch (e) { if (__DEV__) console.error('Failed to delete history:', e); toast.error(t('history.deleteLast15Minutes.error') || 'Failed to delete history'); }
|
|
71
|
+
finally { setIsDeleting(false); }
|
|
144
72
|
}, [history, user?.id, t]);
|
|
145
73
|
|
|
146
74
|
const handleClearAll = useCallback(async () => {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
// Clear from storage
|
|
155
|
-
const storage = await getStorage();
|
|
156
|
-
const historyKey = `history_${user?.id || 'guest'}`;
|
|
157
|
-
await storage.removeItem(historyKey);
|
|
158
|
-
|
|
159
|
-
toast.success(t('history.clearAll.success') || 'History cleared');
|
|
160
|
-
} catch (error) {
|
|
161
|
-
if (__DEV__) {
|
|
162
|
-
console.error('Failed to clear history:', error);
|
|
163
|
-
}
|
|
164
|
-
toast.error(t('history.clearAll.error') || 'Failed to clear history');
|
|
165
|
-
} finally {
|
|
166
|
-
setIsDeleting(false);
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
);
|
|
75
|
+
try {
|
|
76
|
+
setIsDeleting(true); setHistory([]);
|
|
77
|
+
const storage = await getStorage();
|
|
78
|
+
await storage.removeItem(`history_${user?.id || 'guest'}`);
|
|
79
|
+
toast.success(t('history.clearAll.success') || 'History cleared');
|
|
80
|
+
} catch (e) { if (__DEV__) console.error('Failed to clear history:', e); toast.error(t('history.clearAll.error') || 'Failed to clear history'); }
|
|
81
|
+
finally { setIsDeleting(false); }
|
|
170
82
|
}, [user?.id, t]);
|
|
171
83
|
|
|
172
84
|
const formatTime = (date: Date) => {
|
|
173
|
-
const
|
|
174
|
-
const diff =
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if (minutes < 1) return t('history.justNow') || 'Just now';
|
|
180
|
-
if (minutes < 60) return `${minutes} ${t('history.minutesAgo') || 'minutes ago'}`;
|
|
181
|
-
if (hours < 24) return `${hours} ${t('history.hoursAgo') || 'hours ago'}`;
|
|
85
|
+
const diff = new Date().getTime() - date.getTime();
|
|
86
|
+
const min = Math.floor(diff / 60000); const hrs = Math.floor(min / 60); const days = Math.floor(hrs / 24);
|
|
87
|
+
if (min < 1) return t('history.justNow') || 'Just now';
|
|
88
|
+
if (min < 60) return `${min} ${t('history.minutesAgo') || 'minutes ago'}`;
|
|
89
|
+
if (hrs < 24) return `${hrs} ${t('history.hoursAgo') || 'hours ago'}`;
|
|
182
90
|
if (days < 7) return `${days} ${t('history.daysAgo') || 'days ago'}`;
|
|
183
91
|
return date.toLocaleDateString();
|
|
184
92
|
};
|
|
185
93
|
|
|
186
94
|
return (
|
|
187
95
|
<View style={[styles.container, { backgroundColor: bloomTheme.colors.background }]}>
|
|
188
|
-
<Header
|
|
189
|
-
title={t('history.title') || 'History'}
|
|
190
|
-
onBack={goBack || onClose}
|
|
191
|
-
variant="minimal"
|
|
192
|
-
elevation="subtle"
|
|
193
|
-
/>
|
|
194
|
-
|
|
96
|
+
<Header title={t('history.title') || 'History'} onBack={goBack || onClose} variant="minimal" elevation="subtle" />
|
|
195
97
|
<ScrollView style={styles.content}>
|
|
196
|
-
{
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
iconColor: themeColors.iconStorage,
|
|
204
|
-
title: t('history.deleteLast15Minutes.title') || 'Delete Last 15 Minutes',
|
|
205
|
-
subtitle: t('history.deleteLast15Minutes.subtitle') || 'Remove recent history entries',
|
|
206
|
-
onPress: handleDeleteLast15Minutes,
|
|
207
|
-
disabled: isDeleting || history.length === 0,
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
id: 'clear-all',
|
|
211
|
-
icon: 'delete-outline',
|
|
212
|
-
iconColor: themeColors.iconSharing,
|
|
213
|
-
title: t('history.clearAll.title') || 'Clear All History',
|
|
214
|
-
subtitle: t('history.clearAll.subtitle') || 'Remove all history entries',
|
|
215
|
-
onPress: handleClearAll,
|
|
216
|
-
disabled: isDeleting || history.length === 0,
|
|
217
|
-
},
|
|
218
|
-
]}
|
|
219
|
-
|
|
98
|
+
<SettingsListGroup title={t('history.actions') || 'Actions'}>
|
|
99
|
+
<SettingsListItem
|
|
100
|
+
icon={<SettingsIcon name="clock-outline" color={themeColors.iconStorage} />}
|
|
101
|
+
title={t('history.deleteLast15Minutes.title') || 'Delete Last 15 Minutes'}
|
|
102
|
+
description={t('history.deleteLast15Minutes.subtitle') || 'Remove recent history entries'}
|
|
103
|
+
onPress={() => deleteLast15Prompt.open()}
|
|
104
|
+
disabled={isDeleting || history.length === 0}
|
|
220
105
|
/>
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
id: item.id,
|
|
239
|
-
icon: item.type === 'search' ? 'search' : 'globe',
|
|
240
|
-
iconColor: item.type === 'search' ? themeColors.iconSecurity : themeColors.iconPersonalInfo,
|
|
241
|
-
title: item.query,
|
|
242
|
-
subtitle: formatTime(item.timestamp),
|
|
243
|
-
}))}
|
|
106
|
+
<SettingsListItem
|
|
107
|
+
icon={<SettingsIcon name="delete-outline" color={themeColors.iconSharing} />}
|
|
108
|
+
title={t('history.clearAll.title') || 'Clear All History'}
|
|
109
|
+
description={t('history.clearAll.subtitle') || 'Remove all history entries'}
|
|
110
|
+
onPress={() => clearAllPrompt.open()}
|
|
111
|
+
disabled={isDeleting || history.length === 0}
|
|
112
|
+
/>
|
|
113
|
+
</SettingsListGroup>
|
|
114
|
+
<SettingsListGroup title={t('history.recent') || 'Recent History'}>
|
|
115
|
+
{isLoading ? <LoadingState message={t('history.loading') || 'Loading history...'} color={bloomTheme.colors.text} />
|
|
116
|
+
: history.length === 0 ? <EmptyState message={t('history.empty') || 'No history yet'} textColor={bloomTheme.colors.text} />
|
|
117
|
+
: history.map(item => (
|
|
118
|
+
<SettingsListItem
|
|
119
|
+
key={item.id}
|
|
120
|
+
icon={<SettingsIcon name={item.type === 'search' ? 'magnify' : 'earth'} color={item.type === 'search' ? themeColors.iconSecurity : themeColors.iconPersonalInfo} />}
|
|
121
|
+
title={item.query}
|
|
122
|
+
description={formatTime(item.timestamp)}
|
|
244
123
|
/>
|
|
245
|
-
)}
|
|
246
|
-
</
|
|
124
|
+
))}
|
|
125
|
+
</SettingsListGroup>
|
|
247
126
|
</ScrollView>
|
|
127
|
+
<Prompt.Basic control={deleteLast15Prompt} title={t('history.deleteLast15Minutes.title') || 'Delete Last 15 Minutes'} description={t('history.deleteLast15Minutes.confirm') || 'Delete last 15 minutes of history?'} onConfirm={handleDeleteLast15Minutes} confirmButtonCta={t('common.actions.delete') || 'Delete'} confirmButtonColor="negative" />
|
|
128
|
+
<Prompt.Basic control={clearAllPrompt} title={t('history.clearAll.title') || 'Clear All History'} description={t('history.clearAll.confirm') || 'Clear all history? This cannot be undone.'} onConfirm={handleClearAll} confirmButtonCta={t('history.clearAll.title') || 'Clear All'} confirmButtonColor="negative" />
|
|
248
129
|
</View>
|
|
249
130
|
);
|
|
250
131
|
};
|
|
251
132
|
|
|
252
|
-
const styles = StyleSheet.create({
|
|
253
|
-
container: {
|
|
254
|
-
flex: 1,
|
|
255
|
-
},
|
|
256
|
-
content: {
|
|
257
|
-
flex: 1,
|
|
258
|
-
padding: 16,
|
|
259
|
-
},
|
|
260
|
-
});
|
|
133
|
+
const styles = StyleSheet.create({ container: { flex: 1 }, content: { flex: 1, padding: 16 } });
|
|
261
134
|
|
|
262
135
|
export default React.memo(HistoryViewScreen);
|
|
263
|
-
|
|
@@ -12,7 +12,8 @@ import { useTheme } from '@oxyhq/bloom/theme';
|
|
|
12
12
|
import { normalizeTheme } from '../utils/themeUtils';
|
|
13
13
|
import { Ionicons } from '@expo/vector-icons';
|
|
14
14
|
import { toast } from '../../lib/sonner';
|
|
15
|
-
import { Header
|
|
15
|
+
import { Header } from '../components';
|
|
16
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
16
17
|
import { useI18n } from '../hooks/useI18n';
|
|
17
18
|
import { SUPPORTED_LANGUAGES } from '@oxyhq/core';
|
|
18
19
|
import { useOxy } from '../context/OxyContext';
|
|
@@ -98,18 +99,17 @@ const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
|
|
|
98
99
|
return {
|
|
99
100
|
id: language.id,
|
|
100
101
|
title: language.name,
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
description: language.nativeName,
|
|
103
|
+
icon: (
|
|
103
104
|
<View style={[styles.languageFlag, { backgroundColor: `${language.color}15` }]}>
|
|
104
105
|
<Text style={styles.flagEmoji}>{language.flag}</Text>
|
|
105
106
|
</View>
|
|
106
107
|
),
|
|
107
|
-
iconColor: language.color,
|
|
108
|
-
selected: isSelected,
|
|
109
108
|
onPress: () => handleLanguageSelect(language.id),
|
|
110
|
-
|
|
109
|
+
rightElement: isSelected ? (
|
|
111
110
|
<Ionicons name="checkmark-circle" size={24} color={bloomTheme.colors.primary} />
|
|
112
111
|
) : undefined,
|
|
112
|
+
showChevron: false,
|
|
113
113
|
};
|
|
114
114
|
}),
|
|
115
115
|
[currentLanguage, handleLanguageSelect, bloomTheme]
|
|
@@ -150,7 +150,19 @@ const LanguageSelectorScreen: React.FC<LanguageSelectorScreenProps> = ({
|
|
|
150
150
|
<View style={[styles.materialCard, {
|
|
151
151
|
backgroundColor: bloomTheme.colors.card,
|
|
152
152
|
}]}>
|
|
153
|
-
<
|
|
153
|
+
<SettingsListGroup>
|
|
154
|
+
{languageItems.map(item => (
|
|
155
|
+
<SettingsListItem
|
|
156
|
+
key={item.id}
|
|
157
|
+
icon={item.icon}
|
|
158
|
+
title={item.title}
|
|
159
|
+
description={item.description}
|
|
160
|
+
onPress={item.onPress}
|
|
161
|
+
rightElement={item.rightElement}
|
|
162
|
+
showChevron={false}
|
|
163
|
+
/>
|
|
164
|
+
))}
|
|
165
|
+
</SettingsListGroup>
|
|
154
166
|
</View>
|
|
155
167
|
</View>
|
|
156
168
|
</ScrollView>
|
|
@@ -7,7 +7,9 @@ import {
|
|
|
7
7
|
} from 'react-native';
|
|
8
8
|
import type { BaseScreenProps } from '../types/navigation';
|
|
9
9
|
import { toast } from '../../lib/sonner';
|
|
10
|
-
import { Header,
|
|
10
|
+
import { Header, LoadingState } from '../components';
|
|
11
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
12
|
+
import { SettingsIcon } from '../components/SettingsIcon';
|
|
11
13
|
import { useI18n } from '../hooks/useI18n';
|
|
12
14
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
13
15
|
import { useColorScheme } from '../hooks/useColorScheme';
|
|
@@ -121,69 +123,50 @@ const LegalDocumentsScreen: React.FC<BaseScreenProps> = ({
|
|
|
121
123
|
/>
|
|
122
124
|
|
|
123
125
|
<ScrollView style={styles.content}>
|
|
124
|
-
<
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
iconColor: themeColors.iconPersonalInfo,
|
|
131
|
-
title: t('legal.privacyPolicy.title') || 'Privacy Policy',
|
|
132
|
-
subtitle: t('legal.privacyPolicy.subtitle') || 'How we handle your data',
|
|
133
|
-
onPress: handleOpenPolicy('privacy'),
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
id: 'terms-of-service',
|
|
137
|
-
icon: 'file-document',
|
|
138
|
-
iconColor: themeColors.iconSecurity,
|
|
139
|
-
title: t('legal.termsOfService.title') || 'Terms of Service',
|
|
140
|
-
subtitle: t('legal.termsOfService.subtitle') || 'Terms and conditions of use',
|
|
141
|
-
onPress: handleOpenPolicy('terms'),
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
id: 'community-guidelines',
|
|
145
|
-
icon: 'account-group',
|
|
146
|
-
iconColor: themeColors.iconData,
|
|
147
|
-
title: t('legal.communityGuidelines.title') || 'Community Guidelines',
|
|
148
|
-
subtitle: t('legal.communityGuidelines.subtitle') || 'Rules and expectations for our community',
|
|
149
|
-
onPress: handleOpenPolicy('community'),
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
id: 'data-retention',
|
|
153
|
-
icon: 'clock',
|
|
154
|
-
iconColor: themeColors.iconStorage,
|
|
155
|
-
title: t('legal.dataRetention.title') || 'Data Retention Policy',
|
|
156
|
-
subtitle: t('legal.dataRetention.subtitle') || 'How long we keep your data',
|
|
157
|
-
onPress: handleOpenPolicy('dataRetention'),
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
id: 'content-moderation',
|
|
161
|
-
icon: 'eye',
|
|
162
|
-
iconColor: themeColors.iconSharing,
|
|
163
|
-
title: t('legal.contentModeration.title') || 'Content Moderation Policy',
|
|
164
|
-
subtitle: t('legal.contentModeration.subtitle') || 'How we moderate content',
|
|
165
|
-
onPress: handleOpenPolicy('contentModeration'),
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
id: 'child-safety',
|
|
169
|
-
icon: 'heart',
|
|
170
|
-
iconColor: '#FF2D55',
|
|
171
|
-
title: t('legal.childSafety.title') || 'Child Safety Policy',
|
|
172
|
-
subtitle: t('legal.childSafety.subtitle') || 'Protecting minors on our platform',
|
|
173
|
-
onPress: handleOpenPolicy('childSafety'),
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
id: 'cookie-policy',
|
|
177
|
-
icon: 'cookie',
|
|
178
|
-
iconColor: '#8E8E93',
|
|
179
|
-
title: t('legal.cookiePolicy.title') || 'Cookie Policy',
|
|
180
|
-
subtitle: t('legal.cookiePolicy.subtitle') || 'How we use cookies and similar technologies',
|
|
181
|
-
onPress: handleOpenPolicy('cookie'),
|
|
182
|
-
},
|
|
183
|
-
]}
|
|
184
|
-
|
|
126
|
+
<SettingsListGroup title={t('legal.policies') || 'Policies & Guidelines'}>
|
|
127
|
+
<SettingsListItem
|
|
128
|
+
icon={<SettingsIcon name="shield-check" color={themeColors.iconPersonalInfo} />}
|
|
129
|
+
title={t('legal.privacyPolicy.title') || 'Privacy Policy'}
|
|
130
|
+
description={t('legal.privacyPolicy.subtitle') || 'How we handle your data'}
|
|
131
|
+
onPress={handleOpenPolicy('privacy')}
|
|
185
132
|
/>
|
|
186
|
-
|
|
133
|
+
<SettingsListItem
|
|
134
|
+
icon={<SettingsIcon name="file-document" color={themeColors.iconSecurity} />}
|
|
135
|
+
title={t('legal.termsOfService.title') || 'Terms of Service'}
|
|
136
|
+
description={t('legal.termsOfService.subtitle') || 'Terms and conditions of use'}
|
|
137
|
+
onPress={handleOpenPolicy('terms')}
|
|
138
|
+
/>
|
|
139
|
+
<SettingsListItem
|
|
140
|
+
icon={<SettingsIcon name="account-group" color={themeColors.iconData} />}
|
|
141
|
+
title={t('legal.communityGuidelines.title') || 'Community Guidelines'}
|
|
142
|
+
description={t('legal.communityGuidelines.subtitle') || 'Rules and expectations for our community'}
|
|
143
|
+
onPress={handleOpenPolicy('community')}
|
|
144
|
+
/>
|
|
145
|
+
<SettingsListItem
|
|
146
|
+
icon={<SettingsIcon name="clock" color={themeColors.iconStorage} />}
|
|
147
|
+
title={t('legal.dataRetention.title') || 'Data Retention Policy'}
|
|
148
|
+
description={t('legal.dataRetention.subtitle') || 'How long we keep your data'}
|
|
149
|
+
onPress={handleOpenPolicy('dataRetention')}
|
|
150
|
+
/>
|
|
151
|
+
<SettingsListItem
|
|
152
|
+
icon={<SettingsIcon name="eye" color={themeColors.iconSharing} />}
|
|
153
|
+
title={t('legal.contentModeration.title') || 'Content Moderation Policy'}
|
|
154
|
+
description={t('legal.contentModeration.subtitle') || 'How we moderate content'}
|
|
155
|
+
onPress={handleOpenPolicy('contentModeration')}
|
|
156
|
+
/>
|
|
157
|
+
<SettingsListItem
|
|
158
|
+
icon={<SettingsIcon name="heart" color="#FF2D55" />}
|
|
159
|
+
title={t('legal.childSafety.title') || 'Child Safety Policy'}
|
|
160
|
+
description={t('legal.childSafety.subtitle') || 'Protecting minors on our platform'}
|
|
161
|
+
onPress={handleOpenPolicy('childSafety')}
|
|
162
|
+
/>
|
|
163
|
+
<SettingsListItem
|
|
164
|
+
icon={<SettingsIcon name="cookie" color="#8E8E93" />}
|
|
165
|
+
title={t('legal.cookiePolicy.title') || 'Cookie Policy'}
|
|
166
|
+
description={t('legal.cookiePolicy.subtitle') || 'How we use cookies and similar technologies'}
|
|
167
|
+
onPress={handleOpenPolicy('cookie')}
|
|
168
|
+
/>
|
|
169
|
+
</SettingsListGroup>
|
|
187
170
|
</ScrollView>
|
|
188
171
|
</View>
|
|
189
172
|
);
|
|
@@ -11,7 +11,8 @@ import {
|
|
|
11
11
|
import type { BaseScreenProps } from '../types/navigation';
|
|
12
12
|
import { useThemeColors } from '../styles';
|
|
13
13
|
import { normalizeTheme } from '../utils/themeUtils';
|
|
14
|
-
import
|
|
14
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
15
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
15
16
|
import { useI18n } from '../hooks/useI18n';
|
|
16
17
|
import QRCode from 'react-native-qrcode-svg';
|
|
17
18
|
|
|
@@ -184,17 +185,15 @@ const PaymentGatewayScreen: React.FC<PaymentGatewayScreenProps> = (props) => {
|
|
|
184
185
|
return (
|
|
185
186
|
<View style={styles.errorContainer}>
|
|
186
187
|
<Text style={styles.errorText}>{t('payment.errors.invalidAmount')}</Text>
|
|
187
|
-
<
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
colors={colors}
|
|
197
|
-
/>
|
|
188
|
+
<Button
|
|
189
|
+
variant="primary"
|
|
190
|
+
onPress={handleClose}
|
|
191
|
+
size="small"
|
|
192
|
+
icon={<Ionicons name="close" size={16} />}
|
|
193
|
+
iconPosition="right"
|
|
194
|
+
>
|
|
195
|
+
{t('payment.actions.close')}
|
|
196
|
+
</Button>
|
|
198
197
|
</View>
|
|
199
198
|
);
|
|
200
199
|
}
|