@oxyhq/services 5.17.18 → 5.18.0
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/core/mixins/OxyServices.features.js +372 -0
- package/lib/commonjs/core/mixins/OxyServices.features.js.map +1 -0
- package/lib/commonjs/core/mixins/index.js +3 -2
- package/lib/commonjs/core/mixins/index.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +11 -1
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/SettingRow.js +17 -4
- package/lib/commonjs/ui/components/SettingRow.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/FormInput.js +72 -0
- package/lib/commonjs/ui/components/feedback/FormInput.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/ProgressIndicator.js +33 -0
- package/lib/commonjs/ui/components/feedback/ProgressIndicator.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/constants.js +59 -0
- package/lib/commonjs/ui/components/feedback/constants.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js +262 -0
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/index.js +54 -0
- package/lib/commonjs/ui/components/feedback/index.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/types.js +6 -0
- package/lib/commonjs/ui/components/feedback/types.js.map +1 -0
- package/lib/commonjs/ui/components/feedback/useFeedbackForm.js +52 -0
- package/lib/commonjs/ui/components/feedback/useFeedbackForm.js.map +1 -0
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +282 -0
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -0
- package/lib/commonjs/ui/components/modals/index.js +14 -0
- package/lib/commonjs/ui/components/modals/index.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +309 -0
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +79 -0
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +108 -0
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +79 -0
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +176 -0
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -0
- package/lib/commonjs/ui/components/payment/constants.js +53 -0
- package/lib/commonjs/ui/components/payment/constants.js.map +1 -0
- package/lib/commonjs/ui/components/payment/index.js +80 -0
- package/lib/commonjs/ui/components/payment/index.js.map +1 -0
- package/lib/commonjs/ui/components/payment/paymentStyles.js +409 -0
- package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -0
- package/lib/commonjs/ui/components/payment/types.js +6 -0
- package/lib/commonjs/ui/components/payment/types.js.map +1 -0
- package/lib/commonjs/ui/hooks/index.js +26 -0
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAsyncAction.js +95 -0
- package/lib/commonjs/ui/hooks/useAsyncAction.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSettingToggle.js +126 -0
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -0
- package/lib/commonjs/ui/navigation/routes.js +1 -0
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +4 -2
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +33 -30
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +315 -0
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FeedbackScreen.js +73 -590
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +8 -7
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +67 -1395
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +13 -5
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +16 -10
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +23 -11
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.features.js +369 -0
- package/lib/module/core/mixins/OxyServices.features.js.map +1 -0
- package/lib/module/core/mixins/index.js +3 -2
- package/lib/module/core/mixins/index.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +11 -1
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/SettingRow.js +17 -4
- package/lib/module/ui/components/SettingRow.js.map +1 -1
- package/lib/module/ui/components/feedback/FormInput.js +67 -0
- package/lib/module/ui/components/feedback/FormInput.js.map +1 -0
- package/lib/module/ui/components/feedback/ProgressIndicator.js +28 -0
- package/lib/module/ui/components/feedback/ProgressIndicator.js.map +1 -0
- package/lib/module/ui/components/feedback/constants.js +55 -0
- package/lib/module/ui/components/feedback/constants.js.map +1 -0
- package/lib/module/ui/components/feedback/feedbackStyles.js +257 -0
- package/lib/module/ui/components/feedback/feedbackStyles.js.map +1 -0
- package/lib/module/ui/components/feedback/index.js +8 -0
- package/lib/module/ui/components/feedback/index.js.map +1 -0
- package/lib/module/ui/components/feedback/types.js +4 -0
- package/lib/module/ui/components/feedback/types.js.map +1 -0
- package/lib/module/ui/components/feedback/useFeedbackForm.js +47 -0
- package/lib/module/ui/components/feedback/useFeedbackForm.js.map +1 -0
- package/lib/module/ui/components/modals/DeleteAccountModal.js +276 -0
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -0
- package/lib/module/ui/components/modals/index.js +4 -0
- package/lib/module/ui/components/modals/index.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +303 -0
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentMethodStep.js +73 -0
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentReviewStep.js +102 -0
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +73 -0
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -0
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +170 -0
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -0
- package/lib/module/ui/components/payment/constants.js +47 -0
- package/lib/module/ui/components/payment/constants.js.map +1 -0
- package/lib/module/ui/components/payment/index.js +10 -0
- package/lib/module/ui/components/payment/index.js.map +1 -0
- package/lib/module/ui/components/payment/paymentStyles.js +404 -0
- package/lib/module/ui/components/payment/paymentStyles.js.map +1 -0
- package/lib/module/ui/components/payment/types.js +4 -0
- package/lib/module/ui/components/payment/types.js.map +1 -0
- package/lib/module/ui/hooks/index.js +2 -0
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js +89 -0
- package/lib/module/ui/hooks/useAsyncAction.js.map +1 -0
- package/lib/module/ui/hooks/useSettingToggle.js +120 -0
- package/lib/module/ui/hooks/useSettingToggle.js.map +1 -0
- package/lib/module/ui/navigation/routes.js +1 -0
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +4 -2
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +33 -30
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +310 -0
- package/lib/module/ui/screens/FAQScreen.js.map +1 -0
- package/lib/module/ui/screens/FeedbackScreen.js +64 -581
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +8 -7
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +67 -1397
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +13 -5
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +16 -10
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +23 -11
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.features.d.ts +229 -0
- package/lib/typescript/core/mixins/OxyServices.features.d.ts.map +1 -0
- package/lib/typescript/core/mixins/index.d.ts +71 -1
- package/lib/typescript/core/mixins/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts +5 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/ui/components/SettingRow.d.ts +6 -0
- package/lib/typescript/ui/components/SettingRow.d.ts.map +1 -1
- package/lib/typescript/ui/components/feedback/FormInput.d.ts +20 -0
- package/lib/typescript/ui/components/feedback/FormInput.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/ProgressIndicator.d.ts +11 -0
- package/lib/typescript/ui/components/feedback/ProgressIndicator.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/constants.d.ts +5 -0
- package/lib/typescript/ui/components/feedback/constants.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/feedbackStyles.d.ts +280 -0
- package/lib/typescript/ui/components/feedback/feedbackStyles.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/index.d.ts +7 -0
- package/lib/typescript/ui/components/feedback/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/types.d.ts +46 -0
- package/lib/typescript/ui/components/feedback/types.d.ts.map +1 -0
- package/lib/typescript/ui/components/feedback/useFeedbackForm.d.ts +9 -0
- package/lib/typescript/ui/components/feedback/useFeedbackForm.d.ts.map +1 -0
- package/lib/typescript/ui/components/modals/DeleteAccountModal.d.ts +19 -0
- package/lib/typescript/ui/components/modals/DeleteAccountModal.d.ts.map +1 -0
- package/lib/typescript/ui/components/modals/index.d.ts +2 -0
- package/lib/typescript/ui/components/modals/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentDetailsStep.d.ts +21 -0
- package/lib/typescript/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentMethodStep.d.ts +14 -0
- package/lib/typescript/ui/components/payment/PaymentMethodStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentReviewStep.d.ts +16 -0
- package/lib/typescript/ui/components/payment/PaymentReviewStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentSuccessStep.d.ts +10 -0
- package/lib/typescript/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/PaymentSummaryStep.d.ts +15 -0
- package/lib/typescript/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/constants.d.ts +7 -0
- package/lib/typescript/ui/components/payment/constants.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/index.d.ts +9 -0
- package/lib/typescript/ui/components/payment/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/paymentStyles.d.ts +396 -0
- package/lib/typescript/ui/components/payment/paymentStyles.d.ts.map +1 -0
- package/lib/typescript/ui/components/payment/types.d.ts +40 -0
- package/lib/typescript/ui/components/payment/types.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/index.d.ts +2 -0
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useAsyncAction.d.ts +51 -0
- package/lib/typescript/ui/hooks/useAsyncAction.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useSettingToggle.d.ts +55 -0
- package/lib/typescript/ui/hooks/useSettingToggle.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FAQScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/FAQScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +3 -15
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/mixins/OxyServices.features.ts +428 -0
- package/src/core/mixins/index.ts +20 -17
- package/src/ui/components/GroupedItem.tsx +19 -1
- package/src/ui/components/SettingRow.tsx +26 -4
- package/src/ui/components/feedback/FormInput.tsx +84 -0
- package/src/ui/components/feedback/ProgressIndicator.tsx +35 -0
- package/src/ui/components/feedback/constants.ts +22 -0
- package/src/ui/components/feedback/feedbackStyles.ts +247 -0
- package/src/ui/components/feedback/index.ts +6 -0
- package/src/ui/components/feedback/types.ts +52 -0
- package/src/ui/components/feedback/useFeedbackForm.ts +44 -0
- package/src/ui/components/modals/DeleteAccountModal.tsx +294 -0
- package/src/ui/components/modals/index.ts +1 -0
- package/src/ui/components/payment/PaymentDetailsStep.tsx +222 -0
- package/src/ui/components/payment/PaymentMethodStep.tsx +89 -0
- package/src/ui/components/payment/PaymentReviewStep.tsx +126 -0
- package/src/ui/components/payment/PaymentSuccessStep.tsx +71 -0
- package/src/ui/components/payment/PaymentSummaryStep.tsx +159 -0
- package/src/ui/components/payment/constants.ts +39 -0
- package/src/ui/components/payment/index.ts +9 -0
- package/src/ui/components/payment/paymentStyles.ts +397 -0
- package/src/ui/components/payment/types.ts +45 -0
- package/src/ui/hooks/index.ts +3 -1
- package/src/ui/hooks/useAsyncAction.ts +129 -0
- package/src/ui/hooks/useSettingToggle.ts +147 -0
- package/src/ui/navigation/routes.ts +2 -0
- package/src/ui/screens/AccountCenterScreen.tsx +2 -2
- package/src/ui/screens/AccountOverviewScreen.tsx +35 -37
- package/src/ui/screens/FAQScreen.tsx +332 -0
- package/src/ui/screens/FeedbackScreen.tsx +91 -626
- package/src/ui/screens/HelpSupportScreen.tsx +7 -5
- package/src/ui/screens/PaymentGatewayScreen.tsx +96 -1275
- package/src/ui/screens/ProfileScreen.tsx +11 -6
- package/src/ui/screens/SavesCollectionsScreen.tsx +19 -10
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +10 -10
|
@@ -77,7 +77,7 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
77
77
|
setIsLoading(true);
|
|
78
78
|
setError(null);
|
|
79
79
|
|
|
80
|
-
// Load user profile
|
|
80
|
+
// Load user profile, karma total, and stats
|
|
81
81
|
Promise.all([
|
|
82
82
|
oxyServices.getUserById(userId).catch((err: unknown) => {
|
|
83
83
|
// If this is the current user and the API call fails, use current user data as fallback
|
|
@@ -92,9 +92,14 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
92
92
|
oxyServices.getUserKarmaTotal(userId).catch(() => {
|
|
93
93
|
return { total: undefined };
|
|
94
94
|
}) :
|
|
95
|
-
Promise.resolve({ total: undefined })
|
|
95
|
+
Promise.resolve({ total: undefined }),
|
|
96
|
+
oxyServices.getUserStats ?
|
|
97
|
+
oxyServices.getUserStats(userId).catch(() => {
|
|
98
|
+
return { postCount: 0, commentCount: 0 };
|
|
99
|
+
}) :
|
|
100
|
+
Promise.resolve({ postCount: 0, commentCount: 0 })
|
|
96
101
|
])
|
|
97
|
-
.then(([profileRes, karmaRes]) => {
|
|
102
|
+
.then(([profileRes, karmaRes, statsRes]) => {
|
|
98
103
|
if (!profileRes) {
|
|
99
104
|
setError('Profile data is not available');
|
|
100
105
|
setIsLoading(false);
|
|
@@ -135,9 +140,9 @@ const ProfileScreen: React.FC<ProfileScreenProps> = ({ userId, username, theme,
|
|
|
135
140
|
|
|
136
141
|
// Follower/following counts are managed by the `useFollow` hook.
|
|
137
142
|
|
|
138
|
-
//
|
|
139
|
-
setPostsCount(
|
|
140
|
-
setCommentsCount(
|
|
143
|
+
// User stats from API
|
|
144
|
+
setPostsCount(statsRes?.postCount ?? 0);
|
|
145
|
+
setCommentsCount(statsRes?.commentCount ?? 0);
|
|
141
146
|
})
|
|
142
147
|
.catch((err: unknown) => {
|
|
143
148
|
logger.error('Profile loading error', err instanceof Error ? err : new Error(String(err)), { component: 'ProfileScreen' });
|
|
@@ -49,21 +49,30 @@ const SavesCollectionsScreen: React.FC<BaseScreenProps> = ({
|
|
|
49
49
|
const tabActiveColor = themeStyles.colors.iconSecurity;
|
|
50
50
|
const tabInactiveColor = themeStyles.isDarkTheme ? '#888888' : '#666666';
|
|
51
51
|
|
|
52
|
-
//
|
|
53
|
-
// Currently sets empty arrays. Should fetch from oxyServices.getSavedItems() and oxyServices.getCollections()
|
|
54
|
-
// Load saved items and collections
|
|
52
|
+
// Load saved items and collections from API
|
|
55
53
|
useEffect(() => {
|
|
56
54
|
const loadData = async () => {
|
|
57
55
|
try {
|
|
58
56
|
setIsLoading(true);
|
|
59
57
|
if (user?.id && oxyServices) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
58
|
+
const [saved, cols] = await Promise.all([
|
|
59
|
+
oxyServices.getSavedItems(user.id),
|
|
60
|
+
oxyServices.getCollections(user.id),
|
|
61
|
+
]);
|
|
62
|
+
setSavedItems(saved.map((item: any) => ({
|
|
63
|
+
id: item.id,
|
|
64
|
+
title: item.title,
|
|
65
|
+
type: item.itemType === 'post' ? 'post' : 'collection',
|
|
66
|
+
savedAt: new Date(item.createdAt),
|
|
67
|
+
url: item.url,
|
|
68
|
+
})));
|
|
69
|
+
setCollections(cols.map((col: any) => ({
|
|
70
|
+
id: col.id,
|
|
71
|
+
name: col.name,
|
|
72
|
+
description: col.description,
|
|
73
|
+
itemCount: col.itemCount,
|
|
74
|
+
createdAt: col.createdAt ? new Date(col.createdAt) : undefined,
|
|
75
|
+
})));
|
|
67
76
|
}
|
|
68
77
|
} catch (error) {
|
|
69
78
|
toast.error(t('saves.loadError') || 'Failed to load saved items');
|
|
@@ -36,6 +36,8 @@ const KarmaCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
36
36
|
const themeStyles = useThemeStyles(theme || 'light', colorScheme);
|
|
37
37
|
// Override primaryColor for Karma screens (purple instead of blue)
|
|
38
38
|
const primaryColor = '#d169e5';
|
|
39
|
+
const dangerColor = themeStyles.dangerColor || '#D32F2F';
|
|
40
|
+
const mutedTextColor = themeStyles.isDarkTheme ? '#BBBBBB' : '#888888';
|
|
39
41
|
|
|
40
42
|
// Icon colors from theme
|
|
41
43
|
const iconLeaderboard = themeStyles.colors.iconPayments;
|
|
@@ -92,19 +94,19 @@ const KarmaCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
92
94
|
<View style={[styles.actionIcon, { backgroundColor: iconLeaderboard }]}>
|
|
93
95
|
<Ionicons name="trophy-outline" size={28} color={darkenColor(iconLeaderboard)} />
|
|
94
96
|
</View>
|
|
95
|
-
<Text style={styles.actionLabel}>{t('karma.center.actions.leaderboard') || 'Leaderboard'}</Text>
|
|
97
|
+
<Text style={[styles.actionLabel, { color: mutedTextColor }]}>{t('karma.center.actions.leaderboard') || 'Leaderboard'}</Text>
|
|
96
98
|
</TouchableOpacity>
|
|
97
99
|
<TouchableOpacity style={styles.actionIconWrapper} onPress={() => navigate && navigate('KarmaRules')}>
|
|
98
100
|
<View style={[styles.actionIcon, { backgroundColor: iconRules }]}>
|
|
99
101
|
<Ionicons name="document-text-outline" size={28} color={darkenColor(iconRules)} />
|
|
100
102
|
</View>
|
|
101
|
-
<Text style={styles.actionLabel}>{t('karma.center.actions.rules') || 'Rules'}</Text>
|
|
103
|
+
<Text style={[styles.actionLabel, { color: mutedTextColor }]}>{t('karma.center.actions.rules') || 'Rules'}</Text>
|
|
102
104
|
</TouchableOpacity>
|
|
103
105
|
<TouchableOpacity style={styles.actionIconWrapper} onPress={() => navigate && navigate('AboutKarma')}>
|
|
104
106
|
<View style={[styles.actionIcon, { backgroundColor: iconAbout }]}>
|
|
105
107
|
<Ionicons name="star-outline" size={28} color={darkenColor(iconAbout)} />
|
|
106
108
|
</View>
|
|
107
|
-
<Text style={styles.actionLabel}>{t('karma.center.actions.about') || 'About'}</Text>
|
|
109
|
+
<Text style={[styles.actionLabel, { color: mutedTextColor }]}>{t('karma.center.actions.about') || 'About'}</Text>
|
|
108
110
|
</TouchableOpacity>
|
|
109
111
|
</View>
|
|
110
112
|
<View style={styles.actionRow}>
|
|
@@ -112,17 +114,17 @@ const KarmaCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
112
114
|
<View style={[styles.actionIcon, { backgroundColor: iconRewards }]}>
|
|
113
115
|
<Ionicons name="gift-outline" size={28} color={darkenColor(iconRewards)} />
|
|
114
116
|
</View>
|
|
115
|
-
<Text style={styles.actionLabel}>{t('karma.center.actions.rewards') || 'Rewards'}</Text>
|
|
117
|
+
<Text style={[styles.actionLabel, { color: mutedTextColor }]}>{t('karma.center.actions.rewards') || 'Rewards'}</Text>
|
|
116
118
|
</TouchableOpacity>
|
|
117
119
|
<TouchableOpacity style={styles.actionIconWrapper} onPress={() => navigate && navigate('KarmaFAQ')}>
|
|
118
120
|
<View style={[styles.actionIcon, { backgroundColor: iconFAQ }]}>
|
|
119
121
|
<Ionicons name="help-circle-outline" size={28} color={darkenColor(iconFAQ)} />
|
|
120
122
|
</View>
|
|
121
|
-
<Text style={styles.actionLabel}>{t('karma.center.actions.faq') || 'FAQ'}</Text>
|
|
123
|
+
<Text style={[styles.actionLabel, { color: mutedTextColor }]}>{t('karma.center.actions.faq') || 'FAQ'}</Text>
|
|
122
124
|
</TouchableOpacity>
|
|
123
125
|
</View>
|
|
124
126
|
</View>
|
|
125
|
-
<Text style={styles.infoText}>
|
|
127
|
+
<Text style={[styles.infoText, { color: mutedTextColor }]}>
|
|
126
128
|
{t('karma.center.info') || 'Karma can only be earned by positive actions in the Oxy Ecosystem. It cannot be sent or received directly.'}
|
|
127
129
|
</Text>
|
|
128
130
|
</View>
|
|
@@ -137,7 +139,7 @@ const KarmaCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
137
139
|
) : (
|
|
138
140
|
karmaHistory.map((entry: any) => (
|
|
139
141
|
<View key={entry.id} style={[styles.historyItem, { borderColor: themeStyles.borderColor }]}>
|
|
140
|
-
<Text style={[styles.historyPoints, { color: entry.points > 0 ? primaryColor :
|
|
142
|
+
<Text style={[styles.historyPoints, { color: entry.points > 0 ? primaryColor : dangerColor }]}>
|
|
141
143
|
{entry.points > 0 ? '+' : ''}{entry.points}
|
|
142
144
|
</Text>
|
|
143
145
|
<Text style={[styles.historyDesc, { color: themeStyles.textColor }]}>
|
|
@@ -150,7 +152,7 @@ const KarmaCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
150
152
|
))
|
|
151
153
|
)}
|
|
152
154
|
</View>
|
|
153
|
-
{error && <Text style={{ color:
|
|
155
|
+
{error && <Text style={{ color: dangerColor, marginTop: 16, textAlign: 'center' }}>{error}</Text>}
|
|
154
156
|
</ScrollView>
|
|
155
157
|
</View>
|
|
156
158
|
);
|
|
@@ -211,11 +213,9 @@ const styles = StyleSheet.create({
|
|
|
211
213
|
},
|
|
212
214
|
actionLabel: {
|
|
213
215
|
fontSize: 10,
|
|
214
|
-
color: '#888',
|
|
215
216
|
},
|
|
216
217
|
infoText: {
|
|
217
218
|
fontSize: 13,
|
|
218
|
-
color: '#888',
|
|
219
219
|
textAlign: 'center',
|
|
220
220
|
marginTop: 8,
|
|
221
221
|
marginBottom: 8,
|