@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
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
StyleSheet,
|
|
8
8
|
ActivityIndicator,
|
|
9
9
|
ScrollView,
|
|
10
|
-
Alert,
|
|
11
10
|
Platform,
|
|
12
11
|
Image,
|
|
13
12
|
Dimensions,
|
|
@@ -17,11 +16,14 @@ import type { ClientSession } from '@oxyhq/core';
|
|
|
17
16
|
import { fontFamilies } from '../styles/fonts';
|
|
18
17
|
import type { User } from '@oxyhq/core';
|
|
19
18
|
import { toast } from '../../lib/sonner';
|
|
20
|
-
import
|
|
19
|
+
import * as Prompt from '@oxyhq/bloom/prompt';
|
|
20
|
+
import { usePromptControl } from '@oxyhq/bloom/prompt';
|
|
21
21
|
import OxyIcon from '../components/icon/OxyIcon';
|
|
22
22
|
import { Ionicons } from '@expo/vector-icons';
|
|
23
23
|
import Avatar from '../components/Avatar';
|
|
24
|
-
import { Header,
|
|
24
|
+
import { Header, LoadingState } from '../components';
|
|
25
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
26
|
+
import { SettingsIcon } from '../components/SettingsIcon';
|
|
25
27
|
import { useI18n } from '../hooks/useI18n';
|
|
26
28
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
27
29
|
import { useOxy } from '../context/OxyContext';
|
|
@@ -77,6 +79,16 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
77
79
|
const [remotingLogoutSessionId, setRemoteLogoutSessionId] = useState<string | null>(null);
|
|
78
80
|
const [loggingOutAllDevices, setLoggingOutAllDevices] = useState(false);
|
|
79
81
|
|
|
82
|
+
// Pending state for prompts
|
|
83
|
+
const [pendingRemoveSession, setPendingRemoveSession] = useState<{ sessionId: string; displayName: string } | null>(null);
|
|
84
|
+
const [pendingRemoteLogout, setPendingRemoteLogout] = useState<{ sessionId: string; deviceName: string } | null>(null);
|
|
85
|
+
|
|
86
|
+
// Prompt controls
|
|
87
|
+
const removeSessionPrompt = usePromptControl();
|
|
88
|
+
const logoutAllPrompt = usePromptControl();
|
|
89
|
+
const remoteLogoutPrompt = usePromptControl();
|
|
90
|
+
const logoutAllDevicesPrompt = usePromptControl();
|
|
91
|
+
|
|
80
92
|
const screenWidth = Dimensions.get('window').width;
|
|
81
93
|
const { t } = useI18n();
|
|
82
94
|
|
|
@@ -171,47 +183,48 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
171
183
|
}
|
|
172
184
|
}, [activeSessionId, switchSession, onClose, t, switchingToUserId]);
|
|
173
185
|
|
|
174
|
-
const
|
|
175
|
-
if (removingUserId) return;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
setRemovingUserId(null);
|
|
191
|
-
}
|
|
186
|
+
const confirmRemoveSession = useCallback((sessionId: string, displayName: string) => {
|
|
187
|
+
if (removingUserId) return;
|
|
188
|
+
setPendingRemoveSession({ sessionId, displayName });
|
|
189
|
+
removeSessionPrompt.open();
|
|
190
|
+
}, [removingUserId, removeSessionPrompt]);
|
|
191
|
+
|
|
192
|
+
const handleRemoveSession = useCallback(async () => {
|
|
193
|
+
if (!pendingRemoveSession) return;
|
|
194
|
+
const { sessionId } = pendingRemoveSession;
|
|
195
|
+
setRemovingUserId(sessionId);
|
|
196
|
+
try {
|
|
197
|
+
await removeSession(sessionId);
|
|
198
|
+
toast.success(t('accountSwitcher.toasts.removeSuccess') || 'Account removed successfully!');
|
|
199
|
+
} catch (error) {
|
|
200
|
+
if (__DEV__) {
|
|
201
|
+
console.error('Remove session failed:', error);
|
|
192
202
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
211
|
-
toast.error(t('accountSwitcher.toasts.signOutAllFailed', { error: errorMessage }) || `There was a problem signing out: ${errorMessage}`);
|
|
212
|
-
}
|
|
203
|
+
toast.error(t('accountSwitcher.toasts.removeFailed') || 'There was a problem removing the account. Please try again.');
|
|
204
|
+
} finally {
|
|
205
|
+
setRemovingUserId(null);
|
|
206
|
+
setPendingRemoveSession(null);
|
|
207
|
+
}
|
|
208
|
+
}, [pendingRemoveSession, removeSession, t]);
|
|
209
|
+
|
|
210
|
+
const confirmLogoutAll = useCallback(() => {
|
|
211
|
+
logoutAllPrompt.open();
|
|
212
|
+
}, [logoutAllPrompt]);
|
|
213
|
+
|
|
214
|
+
const handleLogoutAll = useCallback(async () => {
|
|
215
|
+
try {
|
|
216
|
+
await logoutAll();
|
|
217
|
+
toast.success(t('accountSwitcher.toasts.signOutAllSuccess') || 'All accounts signed out successfully!');
|
|
218
|
+
if (onClose) {
|
|
219
|
+
onClose();
|
|
213
220
|
}
|
|
214
|
-
)
|
|
221
|
+
} catch (error) {
|
|
222
|
+
if (__DEV__) {
|
|
223
|
+
console.error('Logout all failed:', error);
|
|
224
|
+
}
|
|
225
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
|
|
226
|
+
toast.error(t('accountSwitcher.toasts.signOutAllFailed', { error: errorMessage }) || `There was a problem signing out: ${errorMessage}`);
|
|
227
|
+
}
|
|
215
228
|
}, [logoutAll, onClose, t]);
|
|
216
229
|
|
|
217
230
|
const handleSwitchToManagedAccount = useCallback(async (accountId: string) => {
|
|
@@ -257,30 +270,32 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
257
270
|
}
|
|
258
271
|
}, [oxyServices, activeSessionId, t]);
|
|
259
272
|
|
|
260
|
-
const
|
|
261
|
-
if (remotingLogoutSessionId) return;
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
setRemoteLogoutSessionId(null);
|
|
278
|
-
}
|
|
273
|
+
const confirmRemoteSessionLogout = useCallback((sessionId: string, deviceName: string) => {
|
|
274
|
+
if (remotingLogoutSessionId) return;
|
|
275
|
+
setPendingRemoteLogout({ sessionId, deviceName });
|
|
276
|
+
remoteLogoutPrompt.open();
|
|
277
|
+
}, [remotingLogoutSessionId, remoteLogoutPrompt]);
|
|
278
|
+
|
|
279
|
+
const handleRemoteSessionLogout = useCallback(async () => {
|
|
280
|
+
if (!pendingRemoteLogout) return;
|
|
281
|
+
const { sessionId } = pendingRemoteLogout;
|
|
282
|
+
setRemoteLogoutSessionId(sessionId);
|
|
283
|
+
try {
|
|
284
|
+
await oxyServices?.logoutSession((activeSessionId ?? null) || '', sessionId);
|
|
285
|
+
await loadAllDeviceSessions();
|
|
286
|
+
toast.success(t('accountSwitcher.toasts.remoteSignOutSuccess', { deviceName: pendingRemoteLogout.deviceName }) || `Signed out from ${pendingRemoteLogout.deviceName} successfully!`);
|
|
287
|
+
} catch (error) {
|
|
288
|
+
if (__DEV__) {
|
|
289
|
+
console.error('Remote logout failed:', error);
|
|
279
290
|
}
|
|
280
|
-
|
|
281
|
-
|
|
291
|
+
toast.error(t('accountSwitcher.toasts.remoteSignOutFailed') || 'There was a problem signing out from the device. Please try again.');
|
|
292
|
+
} finally {
|
|
293
|
+
setRemoteLogoutSessionId(null);
|
|
294
|
+
setPendingRemoteLogout(null);
|
|
295
|
+
}
|
|
296
|
+
}, [pendingRemoteLogout, activeSessionId, oxyServices, loadAllDeviceSessions, t]);
|
|
282
297
|
|
|
283
|
-
const
|
|
298
|
+
const confirmLogoutAllDevices = useCallback(() => {
|
|
284
299
|
const otherDevicesCount = deviceSessions.filter(session => !session.isCurrent).length;
|
|
285
300
|
|
|
286
301
|
if (otherDevicesCount === 0) {
|
|
@@ -288,27 +303,25 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
288
303
|
return;
|
|
289
304
|
}
|
|
290
305
|
|
|
291
|
-
if (loggingOutAllDevices) return;
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
}
|
|
305
|
-
toast.error(t('accountSwitcher.toasts.signOutOthersFailed') || 'There was a problem signing out from other devices. Please try again.');
|
|
306
|
-
} finally {
|
|
307
|
-
setLoggingOutAllDevices(false);
|
|
308
|
-
}
|
|
306
|
+
if (loggingOutAllDevices) return;
|
|
307
|
+
logoutAllDevicesPrompt.open();
|
|
308
|
+
}, [deviceSessions, loggingOutAllDevices, logoutAllDevicesPrompt, t]);
|
|
309
|
+
|
|
310
|
+
const handleLogoutAllDevices = useCallback(async () => {
|
|
311
|
+
setLoggingOutAllDevices(true);
|
|
312
|
+
try {
|
|
313
|
+
await oxyServices?.logoutAllDeviceSessions((activeSessionId ?? null) || '');
|
|
314
|
+
await loadAllDeviceSessions();
|
|
315
|
+
toast.success(t('accountSwitcher.toasts.signOutOthersSuccess') || 'Signed out from all other devices successfully!');
|
|
316
|
+
} catch (error) {
|
|
317
|
+
if (__DEV__) {
|
|
318
|
+
console.error('Logout all devices failed:', error);
|
|
309
319
|
}
|
|
310
|
-
|
|
311
|
-
|
|
320
|
+
toast.error(t('accountSwitcher.toasts.signOutOthersFailed') || 'There was a problem signing out from other devices. Please try again.');
|
|
321
|
+
} finally {
|
|
322
|
+
setLoggingOutAllDevices(false);
|
|
323
|
+
}
|
|
324
|
+
}, [activeSessionId, oxyServices, loadAllDeviceSessions, t]);
|
|
312
325
|
|
|
313
326
|
// Memoize filtered sessions for performance
|
|
314
327
|
const otherSessions = useMemo(
|
|
@@ -316,6 +329,11 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
316
329
|
[sessionsWithUsers, activeSessionId]
|
|
317
330
|
);
|
|
318
331
|
|
|
332
|
+
const otherDevicesCount = useMemo(
|
|
333
|
+
() => deviceSessions.filter(session => !session.isCurrent).length,
|
|
334
|
+
[deviceSessions]
|
|
335
|
+
);
|
|
336
|
+
|
|
319
337
|
return (
|
|
320
338
|
<View style={[styles.container, { backgroundColor: bloomTheme.colors.background }]}>
|
|
321
339
|
{/* Header */}
|
|
@@ -440,7 +458,7 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
440
458
|
</TouchableOpacity>
|
|
441
459
|
<TouchableOpacity
|
|
442
460
|
style={styles.removeButton}
|
|
443
|
-
onPress={() =>
|
|
461
|
+
onPress={() => confirmRemoveSession(sessionWithUser.sessionId, displayName)}
|
|
444
462
|
disabled={isSwitching || isRemoving}
|
|
445
463
|
>
|
|
446
464
|
{isRemoving ? (
|
|
@@ -603,38 +621,28 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
603
621
|
|
|
604
622
|
{/* Quick Actions */}
|
|
605
623
|
<View style={styles.section}>
|
|
606
|
-
<
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
}
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
icon: 'logout',
|
|
629
|
-
iconColor: '#FF3B30',
|
|
630
|
-
title: 'Sign Out All Accounts',
|
|
631
|
-
subtitle: 'Remove all accounts from this device',
|
|
632
|
-
onPress: handleLogoutAll,
|
|
633
|
-
disabled: sessionsWithUsers.length === 0,
|
|
634
|
-
},
|
|
635
|
-
]}
|
|
636
|
-
|
|
637
|
-
/>
|
|
624
|
+
<SettingsListGroup title="Quick Actions">
|
|
625
|
+
<SettingsListItem
|
|
626
|
+
icon={<SettingsIcon name="account-plus" color="#007AFF" />}
|
|
627
|
+
title="Add Another Account"
|
|
628
|
+
description="Sign in with a different account"
|
|
629
|
+
onPress={() => navigate?.('OxyAuth')}
|
|
630
|
+
/>
|
|
631
|
+
<SettingsListItem
|
|
632
|
+
icon={<SettingsIcon name="cellphone" color="#5856D6" />}
|
|
633
|
+
title={`${showDeviceManagement ? 'Hide' : 'Manage'} Device Sessions`}
|
|
634
|
+
description="View and manage sessions on other devices"
|
|
635
|
+
onPress={() => setShowDeviceManagement(!showDeviceManagement)}
|
|
636
|
+
/>
|
|
637
|
+
<SettingsListItem
|
|
638
|
+
icon={<SettingsIcon name="logout" color="#FF3B30" />}
|
|
639
|
+
title="Sign Out All Accounts"
|
|
640
|
+
description="Remove all accounts from this device"
|
|
641
|
+
onPress={confirmLogoutAll}
|
|
642
|
+
disabled={sessionsWithUsers.length === 0}
|
|
643
|
+
destructive={true}
|
|
644
|
+
/>
|
|
645
|
+
</SettingsListGroup>
|
|
638
646
|
</View>
|
|
639
647
|
|
|
640
648
|
{/* Device Management Section */}
|
|
@@ -643,62 +651,53 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
643
651
|
<Text style={styles.sectionTitle}>{t('accountSwitcher.sections.deviceSessions') || 'Device Sessions'}</Text>
|
|
644
652
|
|
|
645
653
|
{loadingDeviceSessions ? (
|
|
646
|
-
<
|
|
647
|
-
|
|
648
|
-
{
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
<ActivityIndicator size="small" color="#007AFF" style={{ marginRight: 16 }} />
|
|
657
|
-
),
|
|
658
|
-
},
|
|
659
|
-
]}
|
|
660
|
-
|
|
661
|
-
/>
|
|
654
|
+
<SettingsListGroup>
|
|
655
|
+
<SettingsListItem
|
|
656
|
+
icon={<SettingsIcon name="sync" color="#007AFF" />}
|
|
657
|
+
title={t('accountSwitcher.device.loadingTitle') || 'Loading device sessions...'}
|
|
658
|
+
description={t('accountSwitcher.device.loadingSubtitle') || 'Please wait while we fetch your device sessions'}
|
|
659
|
+
disabled={true}
|
|
660
|
+
rightElement={<ActivityIndicator size="small" color="#007AFF" />}
|
|
661
|
+
showChevron={false}
|
|
662
|
+
/>
|
|
663
|
+
</SettingsListGroup>
|
|
662
664
|
) : deviceSessions.length === 0 ? (
|
|
663
|
-
<
|
|
664
|
-
|
|
665
|
-
{
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
},
|
|
673
|
-
]}
|
|
674
|
-
|
|
675
|
-
/>
|
|
665
|
+
<SettingsListGroup>
|
|
666
|
+
<SettingsListItem
|
|
667
|
+
icon={<SettingsIcon name="cellphone" color="#ccc" />}
|
|
668
|
+
title={t('accountSwitcher.device.noneTitle') || 'No device sessions found'}
|
|
669
|
+
description={t('accountSwitcher.device.noneSubtitle') || 'Device session management not available'}
|
|
670
|
+
disabled={true}
|
|
671
|
+
showChevron={false}
|
|
672
|
+
/>
|
|
673
|
+
</SettingsListGroup>
|
|
676
674
|
) : (
|
|
677
|
-
<
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
675
|
+
<SettingsListGroup>
|
|
676
|
+
{deviceSessions.map((session) => (
|
|
677
|
+
<SettingsListItem
|
|
678
|
+
key={`device-session-${session.sessionId}`}
|
|
679
|
+
icon={<SettingsIcon name={session.isCurrent ? 'cellphone' : 'cellphone-basic'} color={session.isCurrent ? '#34C759' : '#8E8E93'} />}
|
|
680
|
+
title={`${session.deviceName} ${session.isCurrent ? `(${t('accountSwitcher.device.thisDevice') || 'This device'})` : ''}`}
|
|
681
|
+
description={t('accountSwitcher.device.lastActive', { date: new Date(session.lastActive).toLocaleDateString() }) || `Last active: ${new Date(session.lastActive).toLocaleDateString()}`}
|
|
682
|
+
onPress={session.isCurrent ? undefined : () => confirmRemoteSessionLogout(session.sessionId, session.deviceName)}
|
|
683
|
+
disabled={session.isCurrent || remotingLogoutSessionId === session.sessionId}
|
|
684
|
+
showChevron={false}
|
|
685
|
+
rightElement={!session.isCurrent ? (
|
|
686
|
+
<TouchableOpacity
|
|
687
|
+
style={styles.removeButton}
|
|
688
|
+
onPress={() => confirmRemoteSessionLogout(session.sessionId, session.deviceName)}
|
|
689
|
+
disabled={remotingLogoutSessionId === session.sessionId}
|
|
690
|
+
>
|
|
691
|
+
{remotingLogoutSessionId === session.sessionId ? (
|
|
692
|
+
<ActivityIndicator size="small" color="#FF3B30" />
|
|
693
|
+
) : (
|
|
694
|
+
<OxyIcon name="log-out" size={16} color="#FF3B30" />
|
|
695
|
+
)}
|
|
696
|
+
</TouchableOpacity>
|
|
697
|
+
) : undefined}
|
|
698
|
+
/>
|
|
699
|
+
))}
|
|
700
|
+
</SettingsListGroup>
|
|
702
701
|
)}
|
|
703
702
|
</View>
|
|
704
703
|
)}
|
|
@@ -706,39 +705,67 @@ const ModernAccountSwitcherScreen: React.FC<BaseScreenProps> = ({
|
|
|
706
705
|
{/* Empty State */}
|
|
707
706
|
{sessionsWithUsers.length === 0 && (
|
|
708
707
|
<View style={styles.section}>
|
|
709
|
-
<
|
|
710
|
-
|
|
711
|
-
{
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
<
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
},
|
|
734
|
-
]}
|
|
735
|
-
|
|
736
|
-
/>
|
|
708
|
+
<SettingsListGroup>
|
|
709
|
+
<SettingsListItem
|
|
710
|
+
icon={<SettingsIcon name="account-outline" color="#ccc" />}
|
|
711
|
+
title={t('accountSwitcher.empty.title') || 'No saved accounts'}
|
|
712
|
+
description={t('accountSwitcher.empty.subtitle') || 'Add another account to switch between them quickly'}
|
|
713
|
+
onPress={() => navigate?.('OxyAuth')}
|
|
714
|
+
rightElement={
|
|
715
|
+
<View style={styles.emptyStateContainer}>
|
|
716
|
+
<OxyIcon name="person-outline" size={48} color="#ccc" />
|
|
717
|
+
<Text style={styles.emptyStateTitle}>{t('accountSwitcher.empty.title') || 'No saved accounts'}</Text>
|
|
718
|
+
<Text style={styles.emptyStateDescription}>
|
|
719
|
+
{t('accountSwitcher.empty.subtitle') || 'Add another account to switch between them quickly'}
|
|
720
|
+
</Text>
|
|
721
|
+
<TouchableOpacity
|
|
722
|
+
style={styles.addAccountButton}
|
|
723
|
+
onPress={() => navigate?.('OxyAuth')}
|
|
724
|
+
>
|
|
725
|
+
<Text style={styles.addAccountButtonText}>{t('accountCenter.sections.addAccount') || 'Add Account'}</Text>
|
|
726
|
+
</TouchableOpacity>
|
|
727
|
+
</View>
|
|
728
|
+
}
|
|
729
|
+
showChevron={false}
|
|
730
|
+
/>
|
|
731
|
+
</SettingsListGroup>
|
|
737
732
|
</View>
|
|
738
733
|
)}
|
|
739
734
|
</>
|
|
740
735
|
)}
|
|
741
736
|
</ScrollView>
|
|
737
|
+
<Prompt.Basic
|
|
738
|
+
control={removeSessionPrompt}
|
|
739
|
+
title={t('accountSwitcher.confirms.removeTitle') || 'Remove Account'}
|
|
740
|
+
description={pendingRemoveSession ? (t('accountSwitcher.confirms.remove', { displayName: pendingRemoveSession.displayName }) || `Are you sure you want to remove ${pendingRemoveSession.displayName} from this device? You'll need to sign in again to access this account.`) : ''}
|
|
741
|
+
onConfirm={handleRemoveSession}
|
|
742
|
+
confirmButtonCta={t('common.remove') || 'Remove'}
|
|
743
|
+
confirmButtonColor='negative'
|
|
744
|
+
/>
|
|
745
|
+
<Prompt.Basic
|
|
746
|
+
control={logoutAllPrompt}
|
|
747
|
+
title={t('accountSwitcher.confirms.logoutAllTitle') || 'Sign Out All'}
|
|
748
|
+
description={t('accountSwitcher.confirms.logoutAll') || 'Are you sure you want to sign out of all accounts? This will remove all saved accounts from this device.'}
|
|
749
|
+
onConfirm={handleLogoutAll}
|
|
750
|
+
confirmButtonCta={t('common.signOutAll') || 'Sign Out All'}
|
|
751
|
+
confirmButtonColor='negative'
|
|
752
|
+
/>
|
|
753
|
+
<Prompt.Basic
|
|
754
|
+
control={remoteLogoutPrompt}
|
|
755
|
+
title={t('accountSwitcher.confirms.remoteLogoutTitle') || 'Remote Sign Out'}
|
|
756
|
+
description={pendingRemoteLogout ? (t('accountSwitcher.confirms.remoteLogout', { deviceName: pendingRemoteLogout.deviceName }) || `Are you sure you want to sign out from "${pendingRemoteLogout.deviceName}"? This will end the session on that device.`) : ''}
|
|
757
|
+
onConfirm={handleRemoteSessionLogout}
|
|
758
|
+
confirmButtonCta={t('common.signOut') || 'Sign Out'}
|
|
759
|
+
confirmButtonColor='negative'
|
|
760
|
+
/>
|
|
761
|
+
<Prompt.Basic
|
|
762
|
+
control={logoutAllDevicesPrompt}
|
|
763
|
+
title={t('accountSwitcher.confirms.logoutOthersTitle') || 'Sign Out Other Devices'}
|
|
764
|
+
description={t('accountSwitcher.confirms.logoutOthers', { count: otherDevicesCount }) || `Are you sure you want to sign out from all ${otherDevicesCount} other device(s)? This will end sessions on all other devices except this one.`}
|
|
765
|
+
onConfirm={handleLogoutAllDevices}
|
|
766
|
+
confirmButtonCta={t('common.signOutAll') || 'Sign Out All'}
|
|
767
|
+
confirmButtonColor='negative'
|
|
768
|
+
/>
|
|
742
769
|
</View>
|
|
743
770
|
);
|
|
744
771
|
};
|