From e9989123532befdb7d8a3bbd7bc21649e9a07500 Mon Sep 17 00:00:00 2001 From: LukeGus Date: Mon, 3 Nov 2025 15:21:43 -0600 Subject: [PATCH] fix: Electron API and terminal websocket issues --- src/ui/desktop/admin/AdminSettings.tsx | 5 +++++ src/ui/desktop/apps/terminal/Terminal.tsx | 1 + src/ui/desktop/authentication/Auth.tsx | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/ui/desktop/admin/AdminSettings.tsx b/src/ui/desktop/admin/AdminSettings.tsx index 45a3e4dc..f520d6fe 100644 --- a/src/ui/desktop/admin/AdminSettings.tsx +++ b/src/ui/desktop/admin/AdminSettings.tsx @@ -402,6 +402,7 @@ export function AdminSettings({ setExportLoading(true); try { const isDev = + !isElectron() && process.env.NODE_ENV === "development" && (window.location.port === "3000" || window.location.port === "5173" || @@ -472,6 +473,7 @@ export function AdminSettings({ setImportLoading(true); try { const isDev = + !isElectron() && process.env.NODE_ENV === "development" && (window.location.port === "3000" || window.location.port === "5173" || @@ -564,6 +566,7 @@ export function AdminSettings({ setSessionsLoading(true); try { const isDev = + !isElectron() && process.env.NODE_ENV === "development" && (window.location.port === "3000" || window.location.port === "5173" || @@ -610,6 +613,7 @@ export function AdminSettings({ async () => { try { const isDev = + !isElectron() && process.env.NODE_ENV === "development" && (window.location.port === "3000" || window.location.port === "5173" || @@ -660,6 +664,7 @@ export function AdminSettings({ async () => { try { const isDev = + !isElectron() && process.env.NODE_ENV === "development" && (window.location.port === "3000" || window.location.port === "5173" || diff --git a/src/ui/desktop/apps/terminal/Terminal.tsx b/src/ui/desktop/apps/terminal/Terminal.tsx index 6b111d10..4a35f9f8 100644 --- a/src/ui/desktop/apps/terminal/Terminal.tsx +++ b/src/ui/desktop/apps/terminal/Terminal.tsx @@ -418,6 +418,7 @@ export const Terminal = forwardRef( isConnectingRef.current = true; const isDev = + !isElectron() && process.env.NODE_ENV === "development" && (window.location.port === "3000" || window.location.port === "5173" || diff --git a/src/ui/desktop/authentication/Auth.tsx b/src/ui/desktop/authentication/Auth.tsx index 9976095f..9dd827a9 100644 --- a/src/ui/desktop/authentication/Auth.tsx +++ b/src/ui/desktop/authentication/Auth.tsx @@ -37,6 +37,7 @@ interface AuthProps extends React.ComponentProps<"div"> { loggedIn: boolean; authLoading: boolean; setDbError: (error: string | null) => void; + dbError?: string | null; onAuthSuccess: (authData: { isAdmin: boolean; username: string | null; @@ -53,6 +54,7 @@ export function Auth({ loggedIn, authLoading, setDbError, + dbError, onAuthSuccess, ...props }: AuthProps) {