@oxyhq/services 5.12.8 → 5.12.10
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/OxyServices.js +67 -44
- package/lib/commonjs/core/OxyServices.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAssets.js +6 -3
- package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +10 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +7 -0
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/core/OxyServices.js +67 -44
- package/lib/module/core/OxyServices.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/module/ui/components/internal/TextField.js.map +1 -1
- package/lib/module/ui/hooks/useAssets.js +6 -3
- package/lib/module/ui/hooks/useAssets.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +10 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +7 -0
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/typescript/core/OxyServices.d.ts +27 -15
- package/lib/typescript/core/OxyServices.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +21 -0
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/package.json +31 -17
- package/src/core/OxyServices.ts +69 -44
- package/src/index.ts +4 -1
- package/src/models/interfaces.ts +25 -0
- package/src/ui/components/StepBasedScreen.tsx +4 -3
- package/src/ui/components/internal/TextField.tsx +1 -1
- package/src/ui/hooks/useAssets.ts +8 -3
- package/src/ui/screens/AccountSettingsScreen.tsx +11 -1
- package/src/ui/screens/WelcomeNewUserScreen.tsx +33 -13
- package/lib/typescript/types/shims.d.ts +0 -24
- package/src/types/shims.d.ts +0 -24
|
@@ -42,17 +42,21 @@ const WelcomeNewUserScreen: React.FC<BaseScreenProps & { newUser?: any }> = ({
|
|
|
42
42
|
: (t('welcomeNew.welcome.title') || 'Welcome 👋');
|
|
43
43
|
const steps: Array<{ key: string; title: string; bullets?: string[]; body?: string; showAvatar?: boolean; }> = [
|
|
44
44
|
{ key: 'welcome', title: welcomeTitle, body: t('welcomeNew.welcome.body') || "You just created an account in a calm, ethical space. A few quick things — then you're in." },
|
|
45
|
-
{
|
|
46
|
-
t('welcomeNew.account.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
t('welcomeNew.principles.
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
{
|
|
46
|
+
key: 'account', title: t('welcomeNew.account.title') || 'One Account. Simple.', bullets: [
|
|
47
|
+
t('welcomeNew.account.bullets.0') || 'One identity across everything',
|
|
48
|
+
t('welcomeNew.account.bullets.1') || 'No re‑signing in all the time',
|
|
49
|
+
t('welcomeNew.account.bullets.2') || 'Your preferences stay with you',
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: 'principles', title: t('welcomeNew.principles.title') || 'What We Stand For', bullets: [
|
|
54
|
+
t('welcomeNew.principles.bullets.0') || 'Privacy by default',
|
|
55
|
+
t('welcomeNew.principles.bullets.1') || 'No manipulative feeds',
|
|
56
|
+
t('welcomeNew.principles.bullets.2') || 'You decide what to share',
|
|
57
|
+
t('welcomeNew.principles.bullets.3') || 'No selling your data',
|
|
58
|
+
]
|
|
59
|
+
},
|
|
56
60
|
{ key: 'karma', title: t('welcomeNew.karma.title') || 'Karma = Trust & Growth', body: t('welcomeNew.karma.body') || 'Oxy Karma is a points system that reacts to what you do. Helpful, respectful, constructive actions earn it. Harmful or low‑effort stuff chips it away. More karma can unlock benefits; low karma can limit features. It keeps things fair and rewards real contribution.' },
|
|
57
61
|
{ key: 'avatar', title: t('welcomeNew.avatar.title') || 'Make It Yours', body: t('welcomeNew.avatar.body') || 'Add an avatar so people recognize you. It will show anywhere you show up here. Skip if you want — you can add it later.', showAvatar: true },
|
|
58
62
|
{ key: 'ready', title: t('welcomeNew.ready.title') || "You're Ready", body: t('welcomeNew.ready.body') || 'Explore. Contribute. Earn karma. Stay in control.' }
|
|
@@ -82,8 +86,24 @@ const WelcomeNewUserScreen: React.FC<BaseScreenProps & { newUser?: any }> = ({
|
|
|
82
86
|
disabledMimeTypes: ['video/', 'audio/', 'application/pdf'],
|
|
83
87
|
afterSelect: 'back',
|
|
84
88
|
onSelect: async (file: any) => {
|
|
85
|
-
if (!file.contentType.startsWith('image/')) {
|
|
86
|
-
|
|
89
|
+
if (!file.contentType.startsWith('image/')) {
|
|
90
|
+
toast.error(t('editProfile.toasts.selectImage') || 'Please select an image file');
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
// Update file visibility to public for avatar
|
|
95
|
+
try {
|
|
96
|
+
await oxyServices.assetUpdateVisibility(file.id, 'public');
|
|
97
|
+
console.log('[WelcomeNewUser] Avatar visibility updated to public');
|
|
98
|
+
} catch (visError) {
|
|
99
|
+
console.warn('[WelcomeNewUser] Failed to update avatar visibility, continuing anyway:', visError);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
await updateUser({ avatar: file.id }, oxyServices);
|
|
103
|
+
toast.success(t('editProfile.toasts.avatarUpdated') || 'Avatar updated');
|
|
104
|
+
} catch (e: any) {
|
|
105
|
+
toast.error(e.message || t('editProfile.toasts.updateAvatarFailed') || 'Failed to update avatar');
|
|
106
|
+
}
|
|
87
107
|
}
|
|
88
108
|
});
|
|
89
109
|
}, [navigate, updateUser, oxyServices]);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare module 'react-native-gesture-handler';
|
|
2
|
-
declare module 'react-native-safe-area-context';
|
|
3
|
-
declare module 'react-native-svg';
|
|
4
|
-
|
|
5
|
-
declare module 'react-native-reanimated' {
|
|
6
|
-
export type SharedValue<T = any> = any;
|
|
7
|
-
export const withTiming: any,
|
|
8
|
-
withSpring: any,
|
|
9
|
-
withSequence: any,
|
|
10
|
-
withDelay: any,
|
|
11
|
-
useSharedValue: any,
|
|
12
|
-
useAnimatedStyle: any,
|
|
13
|
-
runOnJS: any,
|
|
14
|
-
interpolate: any,
|
|
15
|
-
interpolateColor: any,
|
|
16
|
-
Easing: any;
|
|
17
|
-
const _d: any;
|
|
18
|
-
export default _d;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare type SharedValue<T = any> = any;
|
|
22
|
-
declare namespace Animated {
|
|
23
|
-
type SharedValue<T = any> = any;
|
|
24
|
-
}
|
package/src/types/shims.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare module 'react-native-gesture-handler';
|
|
2
|
-
declare module 'react-native-safe-area-context';
|
|
3
|
-
declare module 'react-native-svg';
|
|
4
|
-
|
|
5
|
-
declare module 'react-native-reanimated' {
|
|
6
|
-
export type SharedValue<T = any> = any;
|
|
7
|
-
export const withTiming: any,
|
|
8
|
-
withSpring: any,
|
|
9
|
-
withSequence: any,
|
|
10
|
-
withDelay: any,
|
|
11
|
-
useSharedValue: any,
|
|
12
|
-
useAnimatedStyle: any,
|
|
13
|
-
runOnJS: any,
|
|
14
|
-
interpolate: any,
|
|
15
|
-
interpolateColor: any,
|
|
16
|
-
Easing: any;
|
|
17
|
-
const _d: any;
|
|
18
|
-
export default _d;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
declare type SharedValue<T = any> = any;
|
|
22
|
-
declare namespace Animated {
|
|
23
|
-
type SharedValue<T = any> = any;
|
|
24
|
-
}
|