@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useCallback, useEffect
|
|
1
|
+
import React, { useState, useCallback, useEffect } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
View,
|
|
4
4
|
Text,
|
|
@@ -8,7 +8,9 @@ import {
|
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import type { BaseScreenProps } from '../types/navigation';
|
|
10
10
|
import { toast } from '../../lib/sonner';
|
|
11
|
-
import { Header,
|
|
11
|
+
import { Header, Avatar, LoadingState, EmptyState } from '../components';
|
|
12
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
13
|
+
import { Switch } from '@oxyhq/bloom/switch';
|
|
12
14
|
import { useI18n } from '../hooks/useI18n';
|
|
13
15
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
14
16
|
import { useSettingToggles } from '../hooks/useSettingToggle';
|
|
@@ -197,71 +199,6 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
|
|
|
197
199
|
|
|
198
200
|
const bloomTheme = useTheme();
|
|
199
201
|
|
|
200
|
-
// Convert blocked users to GroupedSection items
|
|
201
|
-
const blockedUserItems = useMemo(() => {
|
|
202
|
-
return blockedUsers.map((blocked) => {
|
|
203
|
-
const { userId, username, avatar } = extractUserInfo(blocked, 'blockedId');
|
|
204
|
-
const avatarUri = avatar && oxyServices
|
|
205
|
-
? oxyServices.getFileDownloadUrl(avatar, 'thumb')
|
|
206
|
-
: undefined;
|
|
207
|
-
|
|
208
|
-
return {
|
|
209
|
-
id: userId,
|
|
210
|
-
title: username,
|
|
211
|
-
customIcon: (
|
|
212
|
-
<Avatar
|
|
213
|
-
uri={avatarUri}
|
|
214
|
-
name={username}
|
|
215
|
-
size={40}
|
|
216
|
-
/>
|
|
217
|
-
),
|
|
218
|
-
customContent: (
|
|
219
|
-
<TouchableOpacity
|
|
220
|
-
onPress={() => handleUnblock(userId)}
|
|
221
|
-
style={[styles.actionButton, { backgroundColor: bloomTheme.colors.backgroundSecondary }]}
|
|
222
|
-
>
|
|
223
|
-
<Text style={[styles.actionButtonText, { color: bloomTheme.colors.error }]}>
|
|
224
|
-
{t('privacySettings.unblock') || 'Unblock'}
|
|
225
|
-
</Text>
|
|
226
|
-
</TouchableOpacity>
|
|
227
|
-
),
|
|
228
|
-
};
|
|
229
|
-
});
|
|
230
|
-
}, [blockedUsers, oxyServices, bloomTheme, handleUnblock, t]);
|
|
231
|
-
|
|
232
|
-
// Convert restricted users to GroupedSection items
|
|
233
|
-
const restrictedUserItems = useMemo(() => {
|
|
234
|
-
return restrictedUsers.map((restricted) => {
|
|
235
|
-
const { userId, username, avatar } = extractUserInfo(restricted, 'restrictedId');
|
|
236
|
-
const avatarUri = avatar && oxyServices
|
|
237
|
-
? oxyServices.getFileDownloadUrl(avatar, 'thumb')
|
|
238
|
-
: undefined;
|
|
239
|
-
|
|
240
|
-
return {
|
|
241
|
-
id: userId,
|
|
242
|
-
title: username,
|
|
243
|
-
subtitle: t('privacySettings.restrictedDescription') || 'Limited interactions',
|
|
244
|
-
customIcon: (
|
|
245
|
-
<Avatar
|
|
246
|
-
uri={avatarUri}
|
|
247
|
-
name={username}
|
|
248
|
-
size={40}
|
|
249
|
-
/>
|
|
250
|
-
),
|
|
251
|
-
customContent: (
|
|
252
|
-
<TouchableOpacity
|
|
253
|
-
onPress={() => handleUnrestrict(userId)}
|
|
254
|
-
style={[styles.actionButton, { backgroundColor: bloomTheme.colors.backgroundSecondary }]}
|
|
255
|
-
>
|
|
256
|
-
<Text style={[styles.actionButtonText, { color: bloomTheme.colors.primary }]}>
|
|
257
|
-
{t('privacySettings.unrestrict') || 'Unrestrict'}
|
|
258
|
-
</Text>
|
|
259
|
-
</TouchableOpacity>
|
|
260
|
-
),
|
|
261
|
-
};
|
|
262
|
-
});
|
|
263
|
-
}, [restrictedUsers, oxyServices, bloomTheme, handleUnrestrict, t]);
|
|
264
|
-
|
|
265
202
|
if (isLoading) {
|
|
266
203
|
return (
|
|
267
204
|
<View style={[styles.container, { backgroundColor: bloomTheme.colors.background }]}>
|
|
@@ -287,183 +224,103 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
|
|
|
287
224
|
|
|
288
225
|
<ScrollView style={styles.content}>
|
|
289
226
|
{/* Account Privacy */}
|
|
290
|
-
<
|
|
291
|
-
<
|
|
227
|
+
<SettingsListGroup title={t('privacySettings.sections.account') || 'ACCOUNT PRIVACY'}>
|
|
228
|
+
<SettingsListItem
|
|
292
229
|
title={t('privacySettings.isPrivateAccount') || 'Private Account'}
|
|
293
230
|
description={t('privacySettings.isPrivateAccountDesc') || 'Only approved followers can see your posts'}
|
|
294
|
-
value={settings.isPrivateAccount}
|
|
295
|
-
onValueChange={() => toggle('isPrivateAccount')}
|
|
296
|
-
disabled={isSaving}
|
|
297
|
-
textColor={bloomTheme.colors.text}
|
|
298
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
299
|
-
borderColor={bloomTheme.colors.border}
|
|
231
|
+
rightElement={<Switch value={settings.isPrivateAccount} onValueChange={() => toggle('isPrivateAccount')} disabled={isSaving} />}
|
|
300
232
|
/>
|
|
301
|
-
<
|
|
233
|
+
<SettingsListItem
|
|
302
234
|
title={t('privacySettings.profileVisibility') || 'Profile Visibility'}
|
|
303
235
|
description={t('privacySettings.profileVisibilityDesc') || 'Control who can view your profile'}
|
|
304
|
-
value={settings.profileVisibility}
|
|
305
|
-
onValueChange={() => toggle('profileVisibility')}
|
|
306
|
-
disabled={isSaving}
|
|
307
|
-
textColor={bloomTheme.colors.text}
|
|
308
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
309
|
-
borderColor={bloomTheme.colors.border}
|
|
236
|
+
rightElement={<Switch value={settings.profileVisibility} onValueChange={() => toggle('profileVisibility')} disabled={isSaving} />}
|
|
310
237
|
/>
|
|
311
|
-
<
|
|
238
|
+
<SettingsListItem
|
|
312
239
|
title={t('privacySettings.hideOnlineStatus') || 'Hide Online Status'}
|
|
313
240
|
description={t('privacySettings.hideOnlineStatusDesc') || 'Don\'t show when you\'re online'}
|
|
314
|
-
value={settings.hideOnlineStatus}
|
|
315
|
-
onValueChange={() => toggle('hideOnlineStatus')}
|
|
316
|
-
disabled={isSaving}
|
|
317
|
-
textColor={bloomTheme.colors.text}
|
|
318
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
319
|
-
borderColor={bloomTheme.colors.border}
|
|
241
|
+
rightElement={<Switch value={settings.hideOnlineStatus} onValueChange={() => toggle('hideOnlineStatus')} disabled={isSaving} />}
|
|
320
242
|
/>
|
|
321
|
-
<
|
|
243
|
+
<SettingsListItem
|
|
322
244
|
title={t('privacySettings.hideLastSeen') || 'Hide Last Seen'}
|
|
323
245
|
description={t('privacySettings.hideLastSeenDesc') || 'Don\'t show when you were last active'}
|
|
324
|
-
value={settings.hideLastSeen}
|
|
325
|
-
onValueChange={() => toggle('hideLastSeen')}
|
|
326
|
-
disabled={isSaving}
|
|
327
|
-
textColor={bloomTheme.colors.text}
|
|
328
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
329
|
-
borderColor={bloomTheme.colors.border}
|
|
246
|
+
rightElement={<Switch value={settings.hideLastSeen} onValueChange={() => toggle('hideLastSeen')} disabled={isSaving} />}
|
|
330
247
|
/>
|
|
331
|
-
</
|
|
248
|
+
</SettingsListGroup>
|
|
332
249
|
|
|
333
250
|
{/* Interactions */}
|
|
334
|
-
<
|
|
335
|
-
<
|
|
251
|
+
<SettingsListGroup title={t('privacySettings.sections.interactions') || 'INTERACTIONS'}>
|
|
252
|
+
<SettingsListItem
|
|
336
253
|
title={t('privacySettings.allowTagging') || 'Allow Tagging'}
|
|
337
254
|
description={t('privacySettings.allowTaggingDesc') || 'Let others tag you in posts'}
|
|
338
|
-
value={settings.allowTagging}
|
|
339
|
-
onValueChange={() => toggle('allowTagging')}
|
|
340
|
-
disabled={isSaving}
|
|
341
|
-
textColor={bloomTheme.colors.text}
|
|
342
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
343
|
-
borderColor={bloomTheme.colors.border}
|
|
255
|
+
rightElement={<Switch value={settings.allowTagging} onValueChange={() => toggle('allowTagging')} disabled={isSaving} />}
|
|
344
256
|
/>
|
|
345
|
-
<
|
|
257
|
+
<SettingsListItem
|
|
346
258
|
title={t('privacySettings.allowMentions') || 'Allow Mentions'}
|
|
347
259
|
description={t('privacySettings.allowMentionsDesc') || 'Let others mention you'}
|
|
348
|
-
value={settings.allowMentions}
|
|
349
|
-
onValueChange={() => toggle('allowMentions')}
|
|
350
|
-
disabled={isSaving}
|
|
351
|
-
textColor={bloomTheme.colors.text}
|
|
352
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
353
|
-
borderColor={bloomTheme.colors.border}
|
|
260
|
+
rightElement={<Switch value={settings.allowMentions} onValueChange={() => toggle('allowMentions')} disabled={isSaving} />}
|
|
354
261
|
/>
|
|
355
|
-
<
|
|
262
|
+
<SettingsListItem
|
|
356
263
|
title={t('privacySettings.allowDirectMessages') || 'Allow Direct Messages'}
|
|
357
264
|
description={t('privacySettings.allowDirectMessagesDesc') || 'Let others send you direct messages'}
|
|
358
|
-
value={settings.allowDirectMessages}
|
|
359
|
-
onValueChange={() => toggle('allowDirectMessages')}
|
|
360
|
-
disabled={isSaving}
|
|
361
|
-
textColor={bloomTheme.colors.text}
|
|
362
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
363
|
-
borderColor={bloomTheme.colors.border}
|
|
265
|
+
rightElement={<Switch value={settings.allowDirectMessages} onValueChange={() => toggle('allowDirectMessages')} disabled={isSaving} />}
|
|
364
266
|
/>
|
|
365
|
-
<
|
|
267
|
+
<SettingsListItem
|
|
366
268
|
title={t('privacySettings.hideReadReceipts') || 'Hide Read Receipts'}
|
|
367
269
|
description={t('privacySettings.hideReadReceiptsDesc') || 'Don\'t show read receipts in messages'}
|
|
368
|
-
value={settings.hideReadReceipts}
|
|
369
|
-
onValueChange={() => toggle('hideReadReceipts')}
|
|
370
|
-
disabled={isSaving}
|
|
371
|
-
textColor={bloomTheme.colors.text}
|
|
372
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
373
|
-
borderColor={bloomTheme.colors.border}
|
|
270
|
+
rightElement={<Switch value={settings.hideReadReceipts} onValueChange={() => toggle('hideReadReceipts')} disabled={isSaving} />}
|
|
374
271
|
/>
|
|
375
|
-
</
|
|
272
|
+
</SettingsListGroup>
|
|
376
273
|
|
|
377
274
|
{/* Activity & Data */}
|
|
378
|
-
<
|
|
379
|
-
<
|
|
275
|
+
<SettingsListGroup title={t('privacySettings.sections.activity') || 'ACTIVITY & DATA'}>
|
|
276
|
+
<SettingsListItem
|
|
380
277
|
title={t('privacySettings.showActivity') || 'Show Activity Status'}
|
|
381
278
|
description={t('privacySettings.showActivityDesc') || 'Display your activity on your profile'}
|
|
382
|
-
value={settings.showActivity}
|
|
383
|
-
onValueChange={() => toggle('showActivity')}
|
|
384
|
-
disabled={isSaving}
|
|
385
|
-
textColor={bloomTheme.colors.text}
|
|
386
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
387
|
-
borderColor={bloomTheme.colors.border}
|
|
279
|
+
rightElement={<Switch value={settings.showActivity} onValueChange={() => toggle('showActivity')} disabled={isSaving} />}
|
|
388
280
|
/>
|
|
389
|
-
<
|
|
281
|
+
<SettingsListItem
|
|
390
282
|
title={t('privacySettings.dataSharing') || 'Data Sharing'}
|
|
391
283
|
description={t('privacySettings.dataSharingDesc') || 'Allow sharing data for personalization'}
|
|
392
|
-
value={settings.dataSharing}
|
|
393
|
-
onValueChange={() => toggle('dataSharing')}
|
|
394
|
-
disabled={isSaving}
|
|
395
|
-
textColor={bloomTheme.colors.text}
|
|
396
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
397
|
-
borderColor={bloomTheme.colors.border}
|
|
284
|
+
rightElement={<Switch value={settings.dataSharing} onValueChange={() => toggle('dataSharing')} disabled={isSaving} />}
|
|
398
285
|
/>
|
|
399
|
-
<
|
|
286
|
+
<SettingsListItem
|
|
400
287
|
title={t('privacySettings.locationSharing') || 'Location Sharing'}
|
|
401
288
|
description={t('privacySettings.locationSharingDesc') || 'Share your location'}
|
|
402
|
-
value={settings.locationSharing}
|
|
403
|
-
onValueChange={() => toggle('locationSharing')}
|
|
404
|
-
disabled={isSaving}
|
|
405
|
-
textColor={bloomTheme.colors.text}
|
|
406
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
407
|
-
borderColor={bloomTheme.colors.border}
|
|
289
|
+
rightElement={<Switch value={settings.locationSharing} onValueChange={() => toggle('locationSharing')} disabled={isSaving} />}
|
|
408
290
|
/>
|
|
409
|
-
<
|
|
291
|
+
<SettingsListItem
|
|
410
292
|
title={t('privacySettings.analyticsSharing') || 'Analytics Sharing'}
|
|
411
293
|
description={t('privacySettings.analyticsSharingDesc') || 'Allow analytics data collection'}
|
|
412
|
-
value={settings.analyticsSharing}
|
|
413
|
-
onValueChange={() => toggle('analyticsSharing')}
|
|
414
|
-
disabled={isSaving}
|
|
415
|
-
textColor={bloomTheme.colors.text}
|
|
416
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
417
|
-
borderColor={bloomTheme.colors.border}
|
|
294
|
+
rightElement={<Switch value={settings.analyticsSharing} onValueChange={() => toggle('analyticsSharing')} disabled={isSaving} />}
|
|
418
295
|
/>
|
|
419
|
-
</
|
|
296
|
+
</SettingsListGroup>
|
|
420
297
|
|
|
421
298
|
{/* Content & Safety */}
|
|
422
|
-
<
|
|
423
|
-
<
|
|
299
|
+
<SettingsListGroup title={t('privacySettings.sections.content') || 'CONTENT & SAFETY'}>
|
|
300
|
+
<SettingsListItem
|
|
424
301
|
title={t('privacySettings.sensitiveContent') || 'Show Sensitive Content'}
|
|
425
302
|
description={t('privacySettings.sensitiveContentDesc') || 'Allow sensitive or explicit content'}
|
|
426
|
-
value={settings.sensitiveContent}
|
|
427
|
-
onValueChange={() => toggle('sensitiveContent')}
|
|
428
|
-
disabled={isSaving}
|
|
429
|
-
textColor={bloomTheme.colors.text}
|
|
430
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
431
|
-
borderColor={bloomTheme.colors.border}
|
|
303
|
+
rightElement={<Switch value={settings.sensitiveContent} onValueChange={() => toggle('sensitiveContent')} disabled={isSaving} />}
|
|
432
304
|
/>
|
|
433
|
-
<
|
|
305
|
+
<SettingsListItem
|
|
434
306
|
title={t('privacySettings.autoFilter') || 'Auto Filter'}
|
|
435
307
|
description={t('privacySettings.autoFilterDesc') || 'Automatically filter inappropriate content'}
|
|
436
|
-
value={settings.autoFilter}
|
|
437
|
-
onValueChange={() => toggle('autoFilter')}
|
|
438
|
-
disabled={isSaving}
|
|
439
|
-
textColor={bloomTheme.colors.text}
|
|
440
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
441
|
-
borderColor={bloomTheme.colors.border}
|
|
308
|
+
rightElement={<Switch value={settings.autoFilter} onValueChange={() => toggle('autoFilter')} disabled={isSaving} />}
|
|
442
309
|
/>
|
|
443
|
-
<
|
|
310
|
+
<SettingsListItem
|
|
444
311
|
title={t('privacySettings.muteKeywords') || 'Mute Keywords'}
|
|
445
312
|
description={t('privacySettings.muteKeywordsDesc') || 'Hide posts containing muted keywords'}
|
|
446
|
-
value={settings.muteKeywords}
|
|
447
|
-
onValueChange={() => toggle('muteKeywords')}
|
|
448
|
-
disabled={isSaving}
|
|
449
|
-
textColor={bloomTheme.colors.text}
|
|
450
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
451
|
-
borderColor={bloomTheme.colors.border}
|
|
313
|
+
rightElement={<Switch value={settings.muteKeywords} onValueChange={() => toggle('muteKeywords')} disabled={isSaving} />}
|
|
452
314
|
/>
|
|
453
|
-
<
|
|
315
|
+
<SettingsListItem
|
|
454
316
|
title={t('privacySettings.blockScreenshots') || 'Block Screenshots'}
|
|
455
317
|
description={t('privacySettings.blockScreenshotsDesc') || 'Prevent screenshots of your content'}
|
|
456
|
-
value={settings.blockScreenshots}
|
|
457
|
-
onValueChange={() => toggle('blockScreenshots')}
|
|
458
|
-
disabled={isSaving}
|
|
459
|
-
textColor={bloomTheme.colors.text}
|
|
460
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
461
|
-
borderColor={bloomTheme.colors.border}
|
|
318
|
+
rightElement={<Switch value={settings.blockScreenshots} onValueChange={() => toggle('blockScreenshots')} disabled={isSaving} />}
|
|
462
319
|
/>
|
|
463
|
-
</
|
|
320
|
+
</SettingsListGroup>
|
|
464
321
|
|
|
465
322
|
{/* Blocked Users */}
|
|
466
|
-
<
|
|
323
|
+
<SettingsListGroup title={t('privacySettings.sections.blockedUsers') || 'BLOCKED USERS'}>
|
|
467
324
|
{isLoadingUsers ? (
|
|
468
325
|
<LoadingState color={bloomTheme.colors.text} size="small" />
|
|
469
326
|
) : blockedUsers.length === 0 ? (
|
|
@@ -472,12 +329,27 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
|
|
|
472
329
|
textColor={bloomTheme.colors.textSecondary}
|
|
473
330
|
/>
|
|
474
331
|
) : (
|
|
475
|
-
|
|
332
|
+
blockedUsers.map((blocked) => {
|
|
333
|
+
const { userId, username, avatar } = extractUserInfo(blocked, 'blockedId');
|
|
334
|
+
const avatarUri = avatar && oxyServices ? oxyServices.getFileDownloadUrl(avatar, 'thumb') : undefined;
|
|
335
|
+
return (
|
|
336
|
+
<SettingsListItem
|
|
337
|
+
key={userId}
|
|
338
|
+
icon={<Avatar uri={avatarUri} name={username} size={20} />}
|
|
339
|
+
title={username}
|
|
340
|
+
rightElement={
|
|
341
|
+
<TouchableOpacity onPress={() => handleUnblock(userId)} style={[styles.actionButton, { backgroundColor: bloomTheme.colors.backgroundSecondary }]}>
|
|
342
|
+
<Text style={[styles.actionButtonText, { color: bloomTheme.colors.error }]}>{t('privacySettings.unblock') || 'Unblock'}</Text>
|
|
343
|
+
</TouchableOpacity>
|
|
344
|
+
}
|
|
345
|
+
/>
|
|
346
|
+
);
|
|
347
|
+
})
|
|
476
348
|
)}
|
|
477
|
-
</
|
|
349
|
+
</SettingsListGroup>
|
|
478
350
|
|
|
479
351
|
{/* Restricted Users */}
|
|
480
|
-
<
|
|
352
|
+
<SettingsListGroup title={t('privacySettings.sections.restrictedUsers') || 'RESTRICTED USERS'}>
|
|
481
353
|
{isLoadingUsers ? (
|
|
482
354
|
<LoadingState color={bloomTheme.colors.text} size="small" />
|
|
483
355
|
) : restrictedUsers.length === 0 ? (
|
|
@@ -486,9 +358,25 @@ const PrivacySettingsScreen: React.FC<BaseScreenProps> = ({
|
|
|
486
358
|
textColor={bloomTheme.colors.textSecondary}
|
|
487
359
|
/>
|
|
488
360
|
) : (
|
|
489
|
-
|
|
361
|
+
restrictedUsers.map((restricted) => {
|
|
362
|
+
const { userId, username, avatar } = extractUserInfo(restricted, 'restrictedId');
|
|
363
|
+
const avatarUri = avatar && oxyServices ? oxyServices.getFileDownloadUrl(avatar, 'thumb') : undefined;
|
|
364
|
+
return (
|
|
365
|
+
<SettingsListItem
|
|
366
|
+
key={userId}
|
|
367
|
+
icon={<Avatar uri={avatarUri} name={username} size={20} />}
|
|
368
|
+
title={username}
|
|
369
|
+
description={t('privacySettings.restrictedDescription') || 'Limited interactions'}
|
|
370
|
+
rightElement={
|
|
371
|
+
<TouchableOpacity onPress={() => handleUnrestrict(userId)} style={[styles.actionButton, { backgroundColor: bloomTheme.colors.backgroundSecondary }]}>
|
|
372
|
+
<Text style={[styles.actionButtonText, { color: bloomTheme.colors.primary }]}>{t('privacySettings.unrestrict') || 'Unrestrict'}</Text>
|
|
373
|
+
</TouchableOpacity>
|
|
374
|
+
}
|
|
375
|
+
/>
|
|
376
|
+
);
|
|
377
|
+
})
|
|
490
378
|
)}
|
|
491
|
-
</
|
|
379
|
+
</SettingsListGroup>
|
|
492
380
|
</ScrollView>
|
|
493
381
|
</View>
|
|
494
382
|
);
|
|
@@ -8,7 +8,9 @@ import {
|
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import type { BaseScreenProps } from '../types/navigation';
|
|
10
10
|
import { toast } from '../../lib/sonner';
|
|
11
|
-
import { Header,
|
|
11
|
+
import { Header, LoadingState, EmptyState } from '../components';
|
|
12
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
13
|
+
import { SettingsIcon } from '../components/SettingsIcon';
|
|
12
14
|
import { useI18n } from '../hooks/useI18n';
|
|
13
15
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
14
16
|
import { useColorScheme } from '../hooks/useColorScheme';
|
|
@@ -156,17 +158,16 @@ const SavesCollectionsScreen: React.FC<BaseScreenProps> = ({
|
|
|
156
158
|
textColor={bloomTheme.colors.text}
|
|
157
159
|
/>
|
|
158
160
|
) : (
|
|
159
|
-
<
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
icon
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
</Section>
|
|
161
|
+
<SettingsListGroup title={t('saves.savedItems') || 'Saved Items'}>
|
|
162
|
+
{savedItems.map((item) => (
|
|
163
|
+
<SettingsListItem
|
|
164
|
+
key={item.id}
|
|
165
|
+
icon={<SettingsIcon name={item.type === 'post' ? 'file-document-outline' : 'folder'} color={item.type === 'post' ? themeColors.iconSecurity : themeColors.iconStorage} />}
|
|
166
|
+
title={item.title}
|
|
167
|
+
description={formatDate(item.savedAt)}
|
|
168
|
+
/>
|
|
169
|
+
))}
|
|
170
|
+
</SettingsListGroup>
|
|
170
171
|
)
|
|
171
172
|
) : (
|
|
172
173
|
collections.length === 0 ? (
|
|
@@ -175,17 +176,16 @@ const SavesCollectionsScreen: React.FC<BaseScreenProps> = ({
|
|
|
175
176
|
textColor={bloomTheme.colors.text}
|
|
176
177
|
/>
|
|
177
178
|
) : (
|
|
178
|
-
<
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
icon
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
</Section>
|
|
179
|
+
<SettingsListGroup title={t('saves.collections') || 'Collections'}>
|
|
180
|
+
{collections.map((collection) => (
|
|
181
|
+
<SettingsListItem
|
|
182
|
+
key={collection.id}
|
|
183
|
+
icon={<SettingsIcon name="folder" color={themeColors.iconStorage} />}
|
|
184
|
+
title={collection.name}
|
|
185
|
+
description={`${collection.itemCount || 0} items`}
|
|
186
|
+
/>
|
|
187
|
+
))}
|
|
188
|
+
</SettingsListGroup>
|
|
189
189
|
)
|
|
190
190
|
)}
|
|
191
191
|
</ScrollView>
|
|
@@ -5,7 +5,9 @@ import {
|
|
|
5
5
|
ScrollView,
|
|
6
6
|
} from 'react-native';
|
|
7
7
|
import type { BaseScreenProps } from '../types/navigation';
|
|
8
|
-
import { Header,
|
|
8
|
+
import { Header, LoadingState } from '../components';
|
|
9
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
10
|
+
import { Switch } from '@oxyhq/bloom/switch';
|
|
9
11
|
import { useI18n } from '../hooks/useI18n';
|
|
10
12
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
11
13
|
import { useSettingToggles } from '../hooks/useSettingToggle';
|
|
@@ -102,32 +104,22 @@ const SearchSettingsScreen: React.FC<BaseScreenProps> = ({
|
|
|
102
104
|
|
|
103
105
|
<ScrollView style={styles.content}>
|
|
104
106
|
{/* SafeSearch */}
|
|
105
|
-
<
|
|
106
|
-
<
|
|
107
|
+
<SettingsListGroup title={t('searchSettings.safeSearch.title') || 'SafeSearch'}>
|
|
108
|
+
<SettingsListItem
|
|
107
109
|
title={t('searchSettings.safeSearch.label') || 'Enable SafeSearch'}
|
|
108
110
|
description={t('searchSettings.safeSearch.description') || 'Filter out explicit content from search results'}
|
|
109
|
-
value={settings.safeSearch}
|
|
110
|
-
onValueChange={() => toggle('safeSearch')}
|
|
111
|
-
disabled={isSaving}
|
|
112
|
-
textColor={bloomTheme.colors.text}
|
|
113
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
114
|
-
borderColor={bloomTheme.colors.border}
|
|
111
|
+
rightElement={<Switch value={settings.safeSearch} onValueChange={() => toggle('safeSearch')} disabled={isSaving} />}
|
|
115
112
|
/>
|
|
116
|
-
</
|
|
113
|
+
</SettingsListGroup>
|
|
117
114
|
|
|
118
115
|
{/* Search Personalization */}
|
|
119
|
-
<
|
|
120
|
-
<
|
|
116
|
+
<SettingsListGroup title={t('searchSettings.personalization.title') || 'Search Personalization'}>
|
|
117
|
+
<SettingsListItem
|
|
121
118
|
title={t('searchSettings.personalization.label') || 'Personalized Search'}
|
|
122
119
|
description={t('searchSettings.personalization.description') || 'Use your activity to improve search results'}
|
|
123
|
-
value={settings.searchPersonalization}
|
|
124
|
-
onValueChange={() => toggle('searchPersonalization')}
|
|
125
|
-
disabled={isSaving}
|
|
126
|
-
textColor={bloomTheme.colors.text}
|
|
127
|
-
mutedTextColor={bloomTheme.colors.textSecondary}
|
|
128
|
-
borderColor={bloomTheme.colors.border}
|
|
120
|
+
rightElement={<Switch value={settings.searchPersonalization} onValueChange={() => toggle('searchPersonalization')} disabled={isSaving} />}
|
|
129
121
|
/>
|
|
130
|
-
</
|
|
122
|
+
</SettingsListGroup>
|
|
131
123
|
</ScrollView>
|
|
132
124
|
</View>
|
|
133
125
|
);
|
|
@@ -16,7 +16,9 @@ import { toast } from '../../lib/sonner';
|
|
|
16
16
|
import type { ClientSession } from '@oxyhq/core';
|
|
17
17
|
import * as Prompt from '@oxyhq/bloom/prompt';
|
|
18
18
|
import { usePromptControl } from '@oxyhq/bloom/prompt';
|
|
19
|
-
import { Header
|
|
19
|
+
import { Header } from '../components';
|
|
20
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
21
|
+
import { SettingsIcon } from '../components/SettingsIcon';
|
|
20
22
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
21
23
|
import { useOxy } from '../context/OxyContext';
|
|
22
24
|
import { useI18n } from '../hooks/useI18n';
|
|
@@ -328,11 +330,35 @@ const SessionManagementScreen: React.FC<BaseScreenProps> = ({
|
|
|
328
330
|
<Text style={[styles.metaText, { color: '#777', marginBottom: 6 }]}>{t('sessionManagement.lastRefreshed', { time: formatRelative(lastRefreshed.toISOString()) })}</Text>
|
|
329
331
|
)}
|
|
330
332
|
<View style={styles.fullBleed}>
|
|
331
|
-
<
|
|
333
|
+
<SettingsListGroup>
|
|
334
|
+
{sessionItems.map(item => (
|
|
335
|
+
<SettingsListItem
|
|
336
|
+
key={item.id}
|
|
337
|
+
icon={<SettingsIcon name={item.icon} color={item.iconColor} />}
|
|
338
|
+
title={item.title}
|
|
339
|
+
description={item.subtitle}
|
|
340
|
+
showChevron={false}
|
|
341
|
+
rightElement={item.customContentBelow}
|
|
342
|
+
/>
|
|
343
|
+
))}
|
|
344
|
+
</SettingsListGroup>
|
|
332
345
|
</View>
|
|
333
346
|
<View style={styles.sectionSpacer} />
|
|
334
347
|
<View style={styles.fullBleed}>
|
|
335
|
-
<
|
|
348
|
+
<SettingsListGroup>
|
|
349
|
+
{bulkItems.map(item => (
|
|
350
|
+
<SettingsListItem
|
|
351
|
+
key={item.id}
|
|
352
|
+
icon={<SettingsIcon name={item.icon} color={item.iconColor} />}
|
|
353
|
+
title={item.title}
|
|
354
|
+
description={item.subtitle}
|
|
355
|
+
onPress={item.onPress}
|
|
356
|
+
showChevron={false}
|
|
357
|
+
disabled={item.disabled}
|
|
358
|
+
rightElement={item.customContent}
|
|
359
|
+
/>
|
|
360
|
+
))}
|
|
361
|
+
</SettingsListGroup>
|
|
336
362
|
</View>
|
|
337
363
|
</>
|
|
338
364
|
) : (
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import { View,
|
|
3
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
2
|
+
import { View, StyleSheet, ScrollView, Linking } from 'react-native';
|
|
4
3
|
import type { BaseScreenProps } from '../types/navigation';
|
|
5
|
-
import { Header
|
|
4
|
+
import { Header } from '../components';
|
|
5
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
|
+
import { SettingsIcon } from '../components/SettingsIcon';
|
|
6
7
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
8
|
import { useI18n } from '../hooks/useI18n';
|
|
8
9
|
|
|
@@ -37,18 +38,6 @@ const UserLinksScreen: React.FC<UserLinksScreenProps> = ({
|
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
40
|
|
|
40
|
-
const groupedItems = links.map((link) => ({
|
|
41
|
-
id: link.id,
|
|
42
|
-
icon: link.image ? undefined : 'link',
|
|
43
|
-
iconColor: '#32D74B',
|
|
44
|
-
image: link.image || undefined,
|
|
45
|
-
imageSize: 40,
|
|
46
|
-
title: link.title || link.url,
|
|
47
|
-
subtitle: link.description || link.url,
|
|
48
|
-
onPress: () => handleLinkPress(link.url),
|
|
49
|
-
multiRow: true,
|
|
50
|
-
}));
|
|
51
|
-
|
|
52
41
|
return (
|
|
53
42
|
<View style={[styles.container, { backgroundColor: bloomTheme.colors.background }]}>
|
|
54
43
|
<Header
|
|
@@ -59,14 +48,17 @@ const UserLinksScreen: React.FC<UserLinksScreenProps> = ({
|
|
|
59
48
|
/>
|
|
60
49
|
|
|
61
50
|
<ScrollView style={styles.content}>
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
51
|
+
<SettingsListGroup title={t('userLinks.title')}>
|
|
52
|
+
{links.map((link) => (
|
|
53
|
+
<SettingsListItem
|
|
54
|
+
key={link.id}
|
|
55
|
+
icon={<SettingsIcon name="link" color="#32D74B" />}
|
|
56
|
+
title={link.title || link.url}
|
|
57
|
+
description={link.description || link.url}
|
|
58
|
+
onPress={() => handleLinkPress(link.url)}
|
|
59
|
+
/>
|
|
60
|
+
))}
|
|
61
|
+
</SettingsListGroup>
|
|
70
62
|
</ScrollView>
|
|
71
63
|
</View>
|
|
72
64
|
);
|
|
@@ -81,15 +73,6 @@ const styles = StyleSheet.create({
|
|
|
81
73
|
flex: 1,
|
|
82
74
|
padding: 16,
|
|
83
75
|
},
|
|
84
|
-
section: {
|
|
85
|
-
marginBottom: 24,
|
|
86
|
-
},
|
|
87
|
-
sectionTitle: {
|
|
88
|
-
fontSize: 16,
|
|
89
|
-
fontWeight: '600',
|
|
90
|
-
color: '#333',
|
|
91
|
-
marginBottom: 12,
|
|
92
|
-
},
|
|
93
76
|
});
|
|
94
77
|
|
|
95
78
|
export default UserLinksScreen;
|