diff --git a/apps/mobile/app.json b/apps/mobile/app.json
index 532c876..0e46326 100644
--- a/apps/mobile/app.json
+++ b/apps/mobile/app.json
@@ -33,12 +33,21 @@
[
"expo-image-picker",
{
- "photosPermission": "Rakazo uses your photo library so you can attach images to a bot message.",
+ "photosPermission": "Rakazo uses your photo library so you can attach images and turn your photos and videos into projects.",
"cameraPermission": "Rakazo uses the camera so you can attach photos to a bot message.",
"microphonePermission": false
}
],
"expo-sharing",
+ [
+ "expo-media-library",
+ {
+ "photosPermission": "Rakazo uses your photo library so you can attach images and turn your photos and videos into projects.",
+ "savePhotosPermission": false,
+ "isAccessMediaLocationEnabled": true,
+ "granularPermissions": ["photo", "video"]
+ }
+ ],
"./plugins/with-worklets-headers",
"./plugins/with-scene-lifecycle"
],
@@ -52,7 +61,7 @@
},
"infoPlist": {
"NSCameraUsageDescription": "Rakazo uses the camera so you can attach photos to a bot message.",
- "NSPhotoLibraryUsageDescription": "Rakazo uses your photo library so you can attach images to a bot message.",
+ "NSPhotoLibraryUsageDescription": "Rakazo uses your photo library so you can attach images and turn your photos and videos into projects.",
"NSLocalNetworkUsageDescription": "Rakazo connects to a self-hosted Rakazo server on your local network.",
"NSAppTransportSecurity": {
"NSAllowsLocalNetworking": true
diff --git a/apps/mobile/app/_layout.tsx b/apps/mobile/app/_layout.tsx
index dcd75f3..5f886b9 100644
--- a/apps/mobile/app/_layout.tsx
+++ b/apps/mobile/app/_layout.tsx
@@ -13,10 +13,16 @@ import {
configureForegroundNotifications,
resumeLiveNotifications,
} from "../lib/live-notifications";
+import { useMediaNotificationRouting } from "../lib/media-api";
import { native, useResolvedAppearance } from "../lib/native";
configureForegroundNotifications();
+function MediaNotificationRouting() {
+ useMediaNotificationRouting();
+ return null;
+}
+
export default function Layout() {
const { t } = useI18n();
const [ready, setReady] = useState(false);
@@ -121,8 +127,12 @@ export default function Layout() {
+
+
+
+
) : (
diff --git a/apps/mobile/app/account.tsx b/apps/mobile/app/account.tsx
index 7c10439..41e6073 100644
--- a/apps/mobile/app/account.tsx
+++ b/apps/mobile/app/account.tsx
@@ -44,6 +44,7 @@ import {
openPromotedNotificationSettings,
setLiveNotificationSettings,
} from "../lib/live-notifications";
+import { useMediaAvailable } from "../lib/media-api";
import { presentMessageActionSheet } from "../lib/message-action-sheet";
import { native, useResolvedAppearance, useThemedStyles } from "../lib/native";
import { registerPushToken } from "../lib/push";
@@ -55,6 +56,7 @@ export default function Account() {
const { t, locale } = useI18n();
const colorScheme = useResolvedAppearance();
const router = useRouter();
+ const mediaAvailable = useMediaAvailable();
const { focus } = useLocalSearchParams<{ focus?: string }>();
const [me, setMe] = useState(null);
const [password, setPassword] = useState("");
@@ -424,6 +426,18 @@ export default function Account() {
›
+ {mediaAvailable ? (
+ router.push("/media")}
+ style={({ pressed }) => [styles.settingsButton, pressed && styles.pressed]}
+ >
+ {t("Media")}
+ ›
+
+ ) : null}
+
= {
"{name} (permission denied)": "{name} (в разрешении отказано)",
"{name} (unsupported type)": "{name} (неподдерживаемый тип)",
"Saved {name} locally": "{name} сохранен локально.",
+ "Allow photo access": "Разрешить доступ к фото",
+ Approve: "Утвердить",
+ Blocked: "Заблокировано",
+ "Choose photos and videos": "Выбрать фото и видео",
+ "Edit on web or desktop.": "Редактируйте в веб-версии или на компьютере.",
+ Media: "Медиа",
+ "No sessions yet": "Сессий пока нет",
+ "Open Settings": "Открыть настройки",
+ Projects: "Проекты",
+ "Rendering {percent}%": "Рендеринг {percent}%",
+ Sessions: "Сессии",
+ "Upload and create project": "Загрузить и создать проект",
+ Upload: "Загрузить",
+ "Uploading {percent}%": "Загрузка {percent}%",
+ "{count} items could not be uploaded.": "Не удалось загрузить элементов: {count}.",
+ "{count} items": "Элементов: {count}",
};
diff --git a/apps/mobile/lib/locales/zh.ts b/apps/mobile/lib/locales/zh.ts
index 4b17aa4..f0f6ca4 100644
--- a/apps/mobile/lib/locales/zh.ts
+++ b/apps/mobile/lib/locales/zh.ts
@@ -584,4 +584,20 @@ export const ZH_MESSAGES: Record = {
"Extra high": "超高",
Low: "低",
High: "高",
+ "Allow photo access": "允许访问照片",
+ Approve: "批准",
+ Blocked: "已阻止",
+ "Choose photos and videos": "选择照片和视频",
+ "Edit on web or desktop.": "请在网页版或桌面版中编辑。",
+ Media: "媒体",
+ "No sessions yet": "暂无会话",
+ "Open Settings": "打开设置",
+ Projects: "项目",
+ "Rendering {percent}%": "正在渲染 {percent}%",
+ Sessions: "会话",
+ "Upload and create project": "上传并创建项目",
+ Upload: "上传",
+ "Uploading {percent}%": "正在上传 {percent}%",
+ "{count} items could not be uploaded.": "{count} 个项目无法上传。",
+ "{count} items": "{count} 个项目",
};