Skip to content

Commit a2abe94

Browse files
authored
Merge pull request #65 from RonasIT/PRD-2436-fix-app-store-claims
PRD-2436: Fix app store claims
2 parents 08dc171 + 9c72efb commit a2abe94

20 files changed

Lines changed: 1455 additions & 856 deletions

File tree

apps/mobile/app.config.ts

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
2222
googleSignInRoute: process.env.GOOGLE_SIGN_IN_ROUTE,
2323
};
2424

25+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2526
return {
26-
name: process.env.EXPO_PUBLIC_APP_NAME as string,
27+
name: process.env.EXPO_PUBLIC_APP_NAME,
2728
slug: process.env.EXPO_PUBLIC_APP_SLUG as string,
2829
scheme: process.env.EXPO_PUBLIC_APP_SCHEME as string,
2930
owner: process.env.EXPO_PUBLIC_APP_OWNER as string,
30-
version: '1.4.0',
31+
version: '1.5.0',
3132
orientation: 'portrait',
3233
icon: './assets/icon.png',
33-
runtimeVersion: '1.4.0',
34+
runtimeVersion: '1.5.0',
3435
experiments: {
3536
reactCompiler: true,
3637
},
@@ -42,7 +43,7 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
4243
supportsTablet: false,
4344
buildNumber: appEnv.select({
4445
default: '18',
45-
production: '12',
46+
production: '24',
4647
}),
4748
config: {
4849
usesNonExemptEncryption: false,
@@ -52,7 +53,7 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
5253
package: appId,
5354
versionCode: appEnv.select({
5455
default: 15,
55-
production: 12,
56+
production: 24,
5657
}),
5758
adaptiveIcon: {
5859
foregroundImage: './assets/adaptive-icon.png',
@@ -81,15 +82,44 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
8182
[
8283
'expo-image-picker',
8384
{
84-
photosPermission: 'Allow Open MobileUI to access your photos.',
85-
cameraPermission: 'Allow Open MobileUI to access your camera.',
85+
photosPermission:
86+
'Open MobileUI uses your photo library to let you select and share images in chat conversations and set your profile picture.',
87+
cameraPermission:
88+
'Open MobileUI uses your camera to let you take photos and share them directly in chat conversations.',
8689
},
8790
],
8891
[
8992
'expo-media-library',
9093
{
91-
photosPermission: 'Allow Open MobileUI to access your photos.',
92-
savePhotosPermission: 'Allow Open MobileUI to save photos.',
94+
savePhotosPermission:
95+
'Open MobileUI saves photos to your library when you download images shared in chat conversations.',
96+
},
97+
],
98+
[
99+
'expo-audio',
100+
{
101+
microphonePermission:
102+
'Open MobileUI uses your microphone to let you record and send voice messages in chat conversations.',
103+
},
104+
],
105+
[
106+
'expo-build-properties',
107+
{
108+
android: {
109+
androidGradlePluginVersion: '8.3.2',
110+
compileSdkVersion: 35,
111+
targetSdkVersion: 35,
112+
buildToolsVersion: '35.0.0',
113+
ndkVersion: '27.1.12297006',
114+
packagingOptions: {
115+
jniLibs: {
116+
useLegacyPackaging: false,
117+
},
118+
},
119+
},
120+
ios: {
121+
useFrameworks: 'static',
122+
},
93123
},
94124
],
95125
googleAuthIosUrlScheme
@@ -100,10 +130,12 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
100130
},
101131
]
102132
: null,
133+
['./plugins/with-remove-media-playback-permission'],
103134
]),
104135
newArchEnabled: true,
105136
extra,
106-
};
137+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
138+
} as any;
107139
};
108140

109141
export default createConfig;

apps/mobile/package.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,30 @@
3737
"@tanstack/react-query-persist-client": "^5.87.4",
3838
"babel-plugin-module-resolver": "^5.0.2",
3939
"clsx": "^2.1.1",
40-
"expo": "^54.0.0",
41-
"expo-asset": "~12.0.11",
42-
"expo-audio": "~1.1.0",
40+
"expo": "~54.0.34",
41+
"expo-asset": "~12.0.13",
42+
"expo-audio": "~1.1.1",
43+
"expo-build-properties": "~1.0.10",
4344
"expo-clipboard": "~8.0.8",
44-
"expo-constants": "~18.0.12",
45-
"expo-crypto": "~15.0.8",
46-
"expo-dev-client": "~6.0.20",
45+
"expo-constants": "~18.0.13",
46+
"expo-crypto": "~15.0.9",
47+
"expo-dev-client": "~6.0.21",
4748
"expo-document-picker": "~14.0.8",
48-
"expo-file-system": "~19.0.21",
49+
"expo-file-system": "~19.0.22",
4950
"expo-haptics": "~15.0.8",
5051
"expo-image": "~3.0.11",
51-
"expo-image-picker": "~17.0.10",
52+
"expo-image-picker": "~17.0.11",
5253
"expo-insights": "~0.10.8",
5354
"expo-linear-gradient": "~15.0.8",
54-
"expo-linking": "~8.0.10",
55+
"expo-linking": "~8.0.12",
5556
"expo-localization": "~17.0.8",
5657
"expo-media-library": "~18.2.1",
57-
"expo-router": "~6.0.19",
58+
"expo-router": "~6.0.23",
5859
"expo-sharing": "~14.0.8",
5960
"expo-speech": "~14.0.8",
60-
"expo-splash-screen": "~31.0.12",
61+
"expo-splash-screen": "~31.0.13",
6162
"expo-status-bar": "~3.0.9",
62-
"expo-updates": "~29.0.15",
63+
"expo-updates": "~29.0.17",
6364
"immer": "^10.1.1",
6465
"lodash-es": "^4.17.21",
6566
"luxon": "^3.6.1",
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
const { withAndroidManifest } = require('@expo/config-plugins');
2+
3+
const withRemoveMediaPlaybackPermission = (config) =>
4+
withAndroidManifest(config, (config) => {
5+
const manifest = config.modResults;
6+
7+
if (!manifest.manifest.$['xmlns:tools']) {
8+
manifest.manifest.$['xmlns:tools'] = 'http://schemas.android.com/tools';
9+
}
10+
11+
const permissions = manifest.manifest['uses-permission'] ?? [];
12+
13+
const alreadyAdded = permissions.some(
14+
(p) => p.$['android:name'] === 'android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK',
15+
);
16+
17+
if (!alreadyAdded) {
18+
permissions.push({
19+
$: {
20+
'android:name': 'android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK',
21+
'tools:node': 'remove',
22+
},
23+
});
24+
}
25+
26+
manifest.manifest['uses-permission'] = permissions;
27+
28+
return config;
29+
});
30+
31+
module.exports = withRemoveMediaPlaybackPermission;

i18n/mobile/profile/en.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
"PROFILE": {
33
"PROFILE_MENU_SHEET": {
44
"TEXT_LOGOUT": "Logout",
5-
"TEXT_ARCHIVED_CHATS": "Archived Chats"
5+
"TEXT_ARCHIVED_CHATS": "Archived Chats",
6+
"TEXT_DELETE_ACCOUNT": "Delete Account",
7+
"TEXT_DELETE_ACCOUNT_TITLE": "Are you sure you want to delete your account?",
8+
"TEXT_DELETE_ACCOUNT_MESSAGE": "This action will result in permanent data loss if we don't hear from you in the next 30 days.",
9+
"BUTTON_DELETE_ACCOUNT": "Yes, delete my account",
10+
"BUTTON_DONT_DELETE": "Don't delete",
11+
"TEXT_ACCOUNT_DELETION_REQUEST": "Your account deletion request has been submitted."
612
}
713
}
814
}

libs/mobile/auth/features/email-sign-in-form/src/lib/component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { AppButton, View, FormFloatedLabelInput } from '@open-webui-react-native
77
import { FormValues } from '@open-webui-react-native/mobile/shared/utils/form';
88
import { appConfigurationApi, authApi } from '@open-webui-react-native/shared/data-access/api';
99
import { appStorageService } from '@open-webui-react-native/shared/data-access/storage';
10+
import { resolveApiUrl } from '@open-webui-react-native/shared/utils/config';
1011
import { FeatureID, isFeatureEnabled } from '@open-webui-react-native/shared/utils/feature-flag';
1112
import { useDebouncedQuery } from '@open-webui-react-native/shared/utils/use-debounced-query';
1213
import { UrlInputLoader } from './components';
@@ -64,7 +65,7 @@ export function EmailSignInForm({ onSuccess, onApiUrlChange }: EmailSignInFormPr
6465
useEffect(() => {
6566
const refetchConfig = async (): Promise<void> => {
6667
if (isUrlValid) {
67-
const res = await fetchWithUrl(debouncedQuery);
68+
const res = await fetchWithUrl(resolveApiUrl(debouncedQuery));
6869

6970
if (res?.name && res?.version) {
7071
appStorageService.apiUrl.set(debouncedQuery);

libs/mobile/auth/features/sign-in/src/lib/component.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ReactElement, useState } from 'react';
33
import { EmailSignInForm } from '@open-webui-react-native/mobile/auth/features/email-sign-in-form';
44
import { GoogleSignInForm } from '@open-webui-react-native/mobile/auth/features/google-sign-in-form';
55
import { AppText, View } from '@open-webui-react-native/mobile/shared/ui/ui-kit';
6-
import { ronasApiUrl } from '@open-webui-react-native/shared/utils/config';
6+
import { ronasApiUrl, testApiUrl } from '@open-webui-react-native/shared/utils/config';
77
import { ToastService } from '@open-webui-react-native/shared/utils/toast-service';
88

99
export interface SignInProps {
@@ -17,7 +17,8 @@ export function SignIn(props: SignInProps): ReactElement {
1717

1818
const normalizeUrl = (url?: string): string => (url ?? '').trim().replace(/\/+$/, '');
1919

20-
const showGoogleSignIn = normalizeUrl(apiUrlInput) === normalizeUrl(ronasApiUrl);
20+
const isTestApiUrl = normalizeUrl(apiUrlInput) === normalizeUrl(testApiUrl);
21+
const showGoogleSignIn = !isTestApiUrl && normalizeUrl(apiUrlInput) === normalizeUrl(ronasApiUrl);
2122

2223
const handleSuccess = (): void => {
2324
onSuccess();

libs/mobile/chat/features/archived-chats-filters-sheet/src/lib/hooks/use-search-filters.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ export const useSearchFilters = (): UseFiltersResult => {
5252
archivedChatsFilterState$.selectedFilter.set(filter);
5353
};
5454

55-
const resetFilter = (): void => archivedChatsFilterState$.selectedFilter.set(filters[0]);
55+
const resetFilter = (): void => {
56+
archivedChatsFilterState$.selectedFilter.set(filters[0]);
57+
};
5658

5759
return {
5860
filters,

libs/mobile/chat/features/attached-files-list/src/lib/component.tsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,25 @@ export function AttachedFilesList({
3030

3131
return (
3232
<View className='gap-8 mb-[8]'>
33-
{files?.map((file) => (
34-
<AttachedFileItem
33+
{files.flatMap((file) =>
34+
file ? [<AttachedFileItem
3535
key={file.id}
3636
file={file}
37-
onDeleteFilePress={onDeleteFilePress} />
38-
))}
37+
onDeleteFilePress={onDeleteFilePress} />] : [],
38+
)}
3939
<View className='gap-8 flex-row flex-wrap'>
40-
{images?.map((image, index) => (
41-
<AttachedImageItem
42-
key={image.uri}
43-
onImagePress={() => onImagePress(index)}
44-
onDeleteImagePress={onDeleteImagePress}
45-
image={image}
46-
/>
47-
))}
40+
{images.flatMap((image, index) =>
41+
image
42+
? [
43+
<AttachedImageItem
44+
key={image.uri}
45+
onImagePress={() => onImagePress(index)}
46+
onDeleteImagePress={onDeleteImagePress}
47+
image={image}
48+
/>,
49+
]
50+
: [],
51+
)}
4852
</View>
4953
</View>
5054
);

libs/mobile/chat/features/form-chat-input/src/lib/component.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,16 @@ export function FormChatInput<T extends FieldValues>({
8787

8888
const isInputEmpty = !field.value?.trim() && files.length === 0 && images.length === 0;
8989

90-
const imagesForPreview = images.map((image, index) => ({
91-
...new AttachedImage({ url: toDataUrl(image.base64) }),
92-
index,
93-
}));
90+
const imagesForPreview = images.flatMap((image, index) =>
91+
image
92+
? [
93+
{
94+
...new AttachedImage({ url: toDataUrl(image.base64) }),
95+
index,
96+
},
97+
]
98+
: [],
99+
);
94100

95101
const onVoiceModePress = async (): Promise<void> => {
96102
if (!modelId) {

libs/mobile/chat/features/source-citation-modal/src/lib/utils/get-relevance-color.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ export const getRelevanceColor = (percentage: number): string => {
33
if (percentage >= 60) return 'bg-status-warning-light text-status-warning';
44
if (percentage >= 40) return 'bg-status-warning-orange-light text-status-warning-orange';
55

6-
return 'bg-status-error-light text-status-error';
6+
return 'bg-status-danger-light text-status-danger';
77
};

0 commit comments

Comments
 (0)