diff --git a/frontend/apps/editor2d/src/app/pages/main/index.tsx b/frontend/apps/editor2d/src/app/pages/main/index.tsx index 85eefa14e0..c9cf0c0738 100644 --- a/frontend/apps/editor2d/src/app/pages/main/index.tsx +++ b/frontend/apps/editor2d/src/app/pages/main/index.tsx @@ -1,6 +1,7 @@ import { useParams } from "react-router-dom"; import { withProtectionRoute } from "~/components/hoc"; import { useRenderCounter } from "~/hooks/useRenderCounter"; +import { Resource, invoke } from '@tauri-apps/api/core'; // Components of the page import { ToolbarUserProfile } from "~/components/features"; @@ -26,6 +27,11 @@ import { } from "@fortawesome/pro-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +export const isTauri = (): boolean => { + console.log(window.__TAURI_INTERNALS__); + return window.__TAURI_INTERNALS__; +}; + export const Main = withProtectionRoute(() => { // This is a hook that will log the number of times the component has rerendered // Let's make sure we only log once @@ -40,7 +46,7 @@ export const Main = withProtectionRoute(() => { const realtimeEngineRef = useRef(null); const generationEngineRef = useRef(null); const [firstTimeDialogOpen, setFirstTimeDialogOpen] = useState(true); - + const [signinDialogOpen, setSigninDialogOpen] = useState(false); const appModeValue = appMode.value; let childView; @@ -97,7 +103,7 @@ export const Main = withProtectionRoute(() => { }} className="max-w-5xl" > -
+

{

+ {/* + */}
diff --git a/script/desktop/launch_desktop_2d.sh b/script/desktop/launch_desktop_2d.sh index ad3e25b157..3800f40160 100755 --- a/script/desktop/launch_desktop_2d.sh +++ b/script/desktop/launch_desktop_2d.sh @@ -5,12 +5,20 @@ set -euxo pipefail # Tauri doesn't let you configure the frontend project directory statically, though they do provide an # environment variable to pass it to the CLI. Without doing this, the tauri cli randomly walks the # filesystem and finds the wrong frontend code. - +# Kill any process running on port 5741 +if lsof -i tcp:5741 &>/dev/null; then + lsof -i tcp:5741 -t | xargs kill -9 + echo "Killed process running on port 5741" +else + echo "No process running on port 5741" +fi # TODO(bt,2025-02-13): This is not the correct way to get the root dir +brew install pkg-config pixman cairo pango libpng jpeg giflib librsvg root_dir=$(pwd) frontend_path="${root_dir}/frontend" pushd "${frontend_path}" + #nvm use stable npm install popd