File tree Expand file tree Collapse file tree 5 files changed +13
-14
lines changed
components/interface/navigation Expand file tree Collapse file tree 5 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ function MenuPanel({ children }: { children?: React.ReactNode }) {
7979 </ motion . div >
8080 ) : (
8181 < motion . div
82- className = "absolute z-50 h-full w-full md:hidden"
82+ className = "absolute top-0 left-0 z-50 h-full w-full md:hidden safe-area-padding "
8383 initial = { {
8484 y : "-100vh" ,
8585 } }
Original file line number Diff line number Diff line change 11import { PlatformEnum } from "@/lib/enums" ;
22import { useEffect , useState } from "react" ;
33import { AbstractPlatformAPI } from "../platform-api/abstract-platform-api" ;
4- import { CapacitorAPI } from "../platform-api/capacitor/capacitor-api" ;
54import { CloudAPI } from "../platform-api/cloud/cloud-api" ;
65import { ElectronAPI } from "../platform-api/electron/electron-api" ;
76import { getPlatform } from "../platform-api/platform-checker" ;
@@ -31,7 +30,8 @@ export function usePlatformApi() {
3130 const platform = getPlatform ( ) ;
3231
3332 if ( platform === PlatformEnum . Capacitor ) {
34- return new CapacitorAPI ( ) ;
33+ // return new CapacitorAPI();
34+ return new CloudAPI ( workspace ) ;
3535 } else if ( platform === PlatformEnum . Electron ) {
3636 return new ElectronAPI ( ) ;
3737 } else if (
Original file line number Diff line number Diff line change 11import { EditorContext } from "@/components/providers/editor-context-provider" ;
2- import { PlatformEnum } from "@/lib/enums" ;
32import { useContext } from "react" ;
43import useSWR from "swr" ;
54import { AbstractPlatformAPI } from "../platform-api/abstract-platform-api" ;
6- import { getPlatform } from "../platform-api/platform-checker" ;
75import { fetchAPI } from "../pulse-editor-website/backend" ;
86import { RemoteWorkspace } from "../types" ;
97import { useAuth } from "./use-auth" ;
@@ -48,13 +46,6 @@ export function useWorkspace() {
4846 ) {
4947 if ( ! editorContext ) {
5048 throw new Error ( "Editor context is not available" ) ;
51- } else if (
52- getPlatform ( ) !== PlatformEnum . Web &&
53- getPlatform ( ) !== PlatformEnum . WebMobile
54- ) {
55- throw new Error (
56- "Workspace creation is only supported on the web platform." ,
57- ) ;
5849 } else if ( ! session ) {
5950 throw new Error ( "User is not authenticated." ) ;
6051 }
Original file line number Diff line number Diff line change @@ -4,12 +4,17 @@ import {
44 PersistentSettings ,
55 ProjectInfo ,
66} from "@/lib/types" ;
7- import { AbstractPlatformAPI } from "../abstract-platform-api" ;
87import { Directory , Encoding , Filesystem } from "@capacitor/filesystem" ;
98import { FilePicker } from "@capawesome/capacitor-file-picker" ;
109import ignore from "ignore" ;
1110import path from "path" ;
11+ import { AbstractPlatformAPI } from "../abstract-platform-api" ;
1212
13+ /**
14+ * @deprecated Android implementation is no longer supported due to
15+ * file access restrictions. Instead, use cloud managed workspaces,
16+ * or use self-hosted workspace backend in `remote-workspace/`
17+ */
1318export class CapacitorAPI extends AbstractPlatformAPI {
1419 constructor ( ) {
1520 super ( ) ;
Original file line number Diff line number Diff line change @@ -53,7 +53,10 @@ export async function fetchAPI(
5353 `${ url } . \n\nRequest header: ${ JSON . stringify ( headerObj ) } \n\nNative response: ${ JSON . stringify ( nativeResponse ) } \n\nCookie: ${ document . cookie } ` ,
5454 ) ;
5555
56- const data = JSON . stringify ( nativeResponse . data ) ;
56+ const data =
57+ typeof nativeResponse . data === "string"
58+ ? nativeResponse . data
59+ : JSON . stringify ( nativeResponse . data ) ;
5760
5861 // Convert CapacitorHttpResponse to Fetch Response
5962 const fetchResponse = new Response ( data , {
You can’t perform that action at this time.
0 commit comments