From eeac8d25d51f1360024ddbbbea416a2d1f1d2d4a Mon Sep 17 00:00:00 2001
From: divanshu-go
Date: Mon, 23 Dec 2024 21:09:42 +0530
Subject: [PATCH 1/6] fix: use lang: powershell on windows
---
screenpipe-app-tauri/components/cli-command-dialog.tsx | 6 +++++-
screenpipe-app-tauri/components/dev-mode-settings.tsx | 2 +-
.../components/onboarding/dev-configuration.tsx | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/screenpipe-app-tauri/components/cli-command-dialog.tsx b/screenpipe-app-tauri/components/cli-command-dialog.tsx
index 01c661203..580aab414 100644
--- a/screenpipe-app-tauri/components/cli-command-dialog.tsx
+++ b/screenpipe-app-tauri/components/cli-command-dialog.tsx
@@ -9,6 +9,7 @@ import {
DialogTitle,
} from "./ui/dialog";
import { CodeBlock } from "./ui/codeblock";
+import { platform } from "@tauri-apps/plugin-os";
import { useCopyToClipboard } from "@/lib/hooks/use-copy-to-clipboard";
import { useToast } from "@/components/ui/use-toast";
import { IconCode } from "./ui/icons";
@@ -138,7 +139,10 @@ export function CliCommandDialog({ settings }: CliCommandDialogProps) {
-
+
diff --git a/screenpipe-app-tauri/components/dev-mode-settings.tsx b/screenpipe-app-tauri/components/dev-mode-settings.tsx
index f932d1036..02570be97 100644
--- a/screenpipe-app-tauri/components/dev-mode-settings.tsx
+++ b/screenpipe-app-tauri/components/dev-mode-settings.tsx
@@ -270,7 +270,7 @@ export const DevModeSettings = ({ localDataDir }: { localDataDir: string }) => {
thru CLI 👇
diff --git a/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx b/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx
index d20530e93..9b97df260 100644
--- a/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx
+++ b/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx
@@ -125,7 +125,7 @@ const OnboardingDevConfig: React.FC = ({
From d3413412aebdb8041a623a08833c64f45a0a8629 Mon Sep 17 00:00:00 2001
From: Divanshu Grover
Date: Sat, 28 Dec 2024 18:02:51 +0530
Subject: [PATCH 2/6] Create use-platform.tsx
---
screenpipe-app-tauri/lib/hooks/use-platform.tsx | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 screenpipe-app-tauri/lib/hooks/use-platform.tsx
diff --git a/screenpipe-app-tauri/lib/hooks/use-platform.tsx b/screenpipe-app-tauri/lib/hooks/use-platform.tsx
new file mode 100644
index 000000000..c02cf2f4f
--- /dev/null
+++ b/screenpipe-app-tauri/lib/hooks/use-platform.tsx
@@ -0,0 +1,17 @@
+import { useState, useEffect } from 'react';
+import { platform } from '@tauri-apps/plugin-os';
+
+const usePlatform = () => {
+ const [os, setOs] = useState(null);
+
+ useEffect(() => {
+ (async () => {
+ const osPlatform = await platform();
+ setOs(osPlatform);
+ })();
+ }, []);
+
+ return os;
+};
+
+export default usePlatform;
From ae7820088ae9e4937a591c4f756d158d7599dad3 Mon Sep 17 00:00:00 2001
From: Divanshu Grover
Date: Sat, 28 Dec 2024 18:07:53 +0530
Subject: [PATCH 3/6] Update cli-command-dialog.tsx
---
screenpipe-app-tauri/components/cli-command-dialog.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/screenpipe-app-tauri/components/cli-command-dialog.tsx b/screenpipe-app-tauri/components/cli-command-dialog.tsx
index 580aab414..0453a7995 100644
--- a/screenpipe-app-tauri/components/cli-command-dialog.tsx
+++ b/screenpipe-app-tauri/components/cli-command-dialog.tsx
@@ -9,7 +9,7 @@ import {
DialogTitle,
} from "./ui/dialog";
import { CodeBlock } from "./ui/codeblock";
-import { platform } from "@tauri-apps/plugin-os";
+import usePlatform from '@/lib/hooks/usePlatform';
import { useCopyToClipboard } from "@/lib/hooks/use-copy-to-clipboard";
import { useToast } from "@/components/ui/use-toast";
import { IconCode } from "./ui/icons";
@@ -140,7 +140,7 @@ export function CliCommandDialog({ settings }: CliCommandDialogProps) {
From dd030c65908ac7a3d7fcec6381115be51174f254 Mon Sep 17 00:00:00 2001
From: Divanshu Grover
Date: Sat, 28 Dec 2024 18:10:06 +0530
Subject: [PATCH 4/6] Update dev-mode-settings.tsx
---
screenpipe-app-tauri/components/dev-mode-settings.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/screenpipe-app-tauri/components/dev-mode-settings.tsx b/screenpipe-app-tauri/components/dev-mode-settings.tsx
index 02570be97..04b9e5aae 100644
--- a/screenpipe-app-tauri/components/dev-mode-settings.tsx
+++ b/screenpipe-app-tauri/components/dev-mode-settings.tsx
@@ -3,6 +3,7 @@ import React, { useState } from "react";
import { CodeBlock } from "@/components/ui/codeblock";
import { platform } from "@tauri-apps/plugin-os";
+import usePlatform from '@/lib/hooks/usePlatform';
import { Label } from "./ui/label";
import { Switch } from "./ui/switch";
import { useSettings } from "@/lib/hooks/use-settings";
@@ -270,7 +271,7 @@ export const DevModeSettings = ({ localDataDir }: { localDataDir: string }) => {
thru CLI 👇
From 2815847287ef28f21a1f68b91197a59caf5ca424 Mon Sep 17 00:00:00 2001
From: Divanshu Grover
Date: Sat, 28 Dec 2024 18:10:59 +0530
Subject: [PATCH 5/6] Update dev-configuration.tsx
---
.../components/onboarding/dev-configuration.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx b/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx
index 9b97df260..ff97b2452 100644
--- a/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx
+++ b/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from "react";
import { ArrowUpRight } from "lucide-react";
import { open } from "@tauri-apps/plugin-shell";
import { platform } from "@tauri-apps/plugin-os";
+import usePlatform from '@/lib/hooks/usePlatform';
import { CodeBlock } from "@/components/onboarding/single-codeblock";
import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
import OnboardingNavigation from "@/components/onboarding/navigation";
@@ -125,7 +126,7 @@ const OnboardingDevConfig: React.FC = ({
From c5005ad6b143ec84a1b29269dd9d6e0b042d9e51 Mon Sep 17 00:00:00 2001
From: divanshu-go
Date: Sun, 29 Dec 2024 18:48:55 +0530
Subject: [PATCH 6/6] fix: use cmd
Signed-off-by: divanshu-go
---
screenpipe-app-tauri/components/cli-command-dialog.tsx | 4 ++--
screenpipe-app-tauri/components/dev-mode-settings.tsx | 4 ++--
.../components/onboarding/dev-configuration.tsx | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/screenpipe-app-tauri/components/cli-command-dialog.tsx b/screenpipe-app-tauri/components/cli-command-dialog.tsx
index 0453a7995..d377bf45b 100644
--- a/screenpipe-app-tauri/components/cli-command-dialog.tsx
+++ b/screenpipe-app-tauri/components/cli-command-dialog.tsx
@@ -9,7 +9,7 @@ import {
DialogTitle,
} from "./ui/dialog";
import { CodeBlock } from "./ui/codeblock";
-import usePlatform from '@/lib/hooks/usePlatform';
+import usePlatform from '@/lib/hooks/use-platform';
import { useCopyToClipboard } from "@/lib/hooks/use-copy-to-clipboard";
import { useToast } from "@/components/ui/use-toast";
import { IconCode } from "./ui/icons";
@@ -140,7 +140,7 @@ export function CliCommandDialog({ settings }: CliCommandDialogProps) {
diff --git a/screenpipe-app-tauri/components/dev-mode-settings.tsx b/screenpipe-app-tauri/components/dev-mode-settings.tsx
index 04b9e5aae..15b793507 100644
--- a/screenpipe-app-tauri/components/dev-mode-settings.tsx
+++ b/screenpipe-app-tauri/components/dev-mode-settings.tsx
@@ -3,7 +3,7 @@ import React, { useState } from "react";
import { CodeBlock } from "@/components/ui/codeblock";
import { platform } from "@tauri-apps/plugin-os";
-import usePlatform from '@/lib/hooks/usePlatform';
+import usePlatform from '@/lib/hooks/use-platform';
import { Label } from "./ui/label";
import { Switch } from "./ui/switch";
import { useSettings } from "@/lib/hooks/use-settings";
@@ -271,7 +271,7 @@ export const DevModeSettings = ({ localDataDir }: { localDataDir: string }) => {
thru CLI 👇
diff --git a/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx b/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx
index ff97b2452..2ed987b07 100644
--- a/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx
+++ b/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
import { ArrowUpRight } from "lucide-react";
import { open } from "@tauri-apps/plugin-shell";
import { platform } from "@tauri-apps/plugin-os";
-import usePlatform from '@/lib/hooks/usePlatform';
+import usePlatform from '@/lib/hooks/use-platform';
import { CodeBlock } from "@/components/onboarding/single-codeblock";
import { DialogHeader, DialogTitle } from "@/components/ui/dialog";
import OnboardingNavigation from "@/components/onboarding/navigation";
@@ -126,7 +126,7 @@ const OnboardingDevConfig: React.FC = ({