diff --git a/Cargo.lock b/Cargo.lock index 4d851a338..752424b15 100644 Binary files a/Cargo.lock and b/Cargo.lock differ diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 09abe2252..6c3c84425 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -5,18 +5,18 @@ "license": "MIT", "private": true, "devDependencies": { - "@tauri-apps/cli": "^1.0.0-beta.6", + "@tauri-apps/cli": "^1.0.0-rc.8", "@types/babel-core": "^6.25.7", "@types/byte-size": "^8.1.0", - "@types/react": "^17.0.18", - "@types/react-dom": "^17.0.9", - "@types/react-router-dom": "^5.3.1", + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "@types/react-router-dom": "^5.3.3", "@types/react-virtualized-auto-sizer": "^1.0.1", "@types/react-window": "^1.8.5", - "@types/tailwindcss": "^2.2.1", - "concurrently": "^6.2.1", - "prettier": "^2.3.2", - "typescript": "^4.3.5" + "@types/tailwindcss": "^3.0.10", + "concurrently": "^7.1.0", + "prettier": "^2.6.2", + "typescript": "^4.6.3" }, "scripts": { "vite": "vite", @@ -28,46 +28,46 @@ "react-virtualized": "patch:react-virtualized@9.22.3#./path/to/react-virtualized-9.22.3.patch" }, "dependencies": { - "@apollo/client": "^3.4.7", - "@headlessui/react": "^1.4.0", - "@heroicons/react": "^1.0.4", - "@radix-ui/react-dialog": "^0.1.5", + "@apollo/client": "^3.5.10", + "@headlessui/react": "^1.5.0", + "@heroicons/react": "^1.0.6", + "@radix-ui/react-dialog": "^0.1.7", "@radix-ui/react-slider": "^0.1.4", - "@sd/core": "*", - "@sd/client": "*", - "@sd/ui": "*", - "@tauri-apps/api": "^1.0.0-beta.5", + "@sd/client": "workspace:*", + "@sd/core": "workspace:*", + "@sd/ui": "workspace:*", + "@tauri-apps/api": "^1.0.0-rc.3", "@types/pretty-bytes": "^5.2.0", - "@types/react-table": "^7.7.6", - "@types/react-virtualized": "^9.21.14", + "@types/react-table": "^7.7.10", + "@types/react-virtualized": "^9.21.21", "@vitejs/plugin-react-refresh": "^1.3.6", - "autoprefixer": "^9", + "autoprefixer": "^10.4.4", "byte-size": "^8.1.0", "clsx": "^1.1.1", "immer": "^9.0.12", - "jotai": "^1.6.0", - "moment": "^2.29.1", - "phosphor-react": "^1.3.1", - "pretty-bytes": "^5.6.0", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "react-dropzone": "^11.3.4", - "react-error-boundary": "^3.1.3", + "jotai": "^1.6.2", + "moment": "^2.29.2", + "phosphor-react": "^1.4.1", + "pretty-bytes": "^6.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "react-dropzone": "^12.0.4", + "react-error-boundary": "^3.1.4", "react-hotkeys-hook": "^3.4.4", "react-json-view": "^1.21.3", - "react-portal": "^4.2.1", - "react-query": "^3.34.16", - "react-router": "6.2.1", - "react-router-dom": "6.2.1", + "react-portal": "^4.2.2", + "react-query": "^3.34.19", + "react-router": "6.3.0", + "react-router-dom": "6.3.0", "react-spline": "^1.2.1", "react-transition-group": "^4.4.2", - "react-virtuoso": "^2.2.6", - "rooks": "^5.7.1", - "tailwindcss": "^3.0.7", - "vite": "^2.4.4", + "react-virtuoso": "^2.9.0", + "rooks": "^5.11.0", + "tailwindcss": "^3.0.23", + "vite": "^2.9.1", "vite-plugin-filter-replace": "^0.1.9", "vite-plugin-react-svg": "^0.2.0", - "vite-tsconfig-paths": "^3.3.13", - "zustand": "^3.7.1" + "vite-tsconfig-paths": "^3.4.1", + "zustand": "^3.7.2" } } diff --git a/apps/desktop/src-tauri/src/main.rs b/apps/desktop/src-tauri/src/main.rs index 42a1a4bfb..27ed97faf 100644 --- a/apps/desktop/src-tauri/src/main.rs +++ b/apps/desktop/src-tauri/src/main.rs @@ -5,8 +5,6 @@ use tauri::api::path; use tauri::Manager; mod menu; -use window_shadows::set_shadow; - #[tauri::command(async)] async fn client_query_transport( core: tauri::State<'_, CoreController>, @@ -55,11 +53,14 @@ async fn main() { .setup(|app| { let app = app.handle(); - app.windows().iter().for_each(|(_, window)| { - set_shadow(&window, true).unwrap_or(()); + #[cfg(not(target_os = "linux"))] + { + app.windows().iter().for_each(|(_, window)| { + window_shadows::set_shadow(&window, true).unwrap_or(()); - window.start_dragging().unwrap_or(()); - }); + window.start_dragging().unwrap_or(()); + }); + } // core event transport tokio::spawn(async move { diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx index dda6242be..5bb519983 100644 --- a/apps/desktop/src/App.tsx +++ b/apps/desktop/src/App.tsx @@ -24,6 +24,7 @@ import LocationSettings from './screens/settings/LocationSettings'; import { RedirectPage } from './screens/Redirect'; import { QueryClient, QueryClientProvider } from 'react-query'; import { platform } from '@tauri-apps/api/os'; +import { ClientProvider } from '@sd/client'; const queryClient = new QueryClient(); @@ -83,6 +84,10 @@ function Router() { let location = useLocation(); let state = location.state as { backgroundLocation?: Location }; + useEffect(() => { + console.log({ url: location.pathname }); + }, [state]); + return ( <> @@ -91,7 +96,7 @@ function Router() { } /> } /> } /> - } /> + } /> } /> @@ -124,7 +129,6 @@ function ErrorFallback({ error, resetErrorBoundary }: FallbackProps) { function NotFound() { const navigate = useNavigate(); - return (
{ +// process.exit(); +// }); + function AppContainer() { useCoreEvents(); return ( @@ -152,10 +160,18 @@ function AppContainer() { } export default function App() { + // @ts-ignore: TODO: This is a hack and a better solution should probably be found. This exists so that the queryClient can be accessed within the subpackage '@sd/client'. Refer to for where this is used. + if (window.ReactQueryClient === undefined) { + // @ts-ignore + window.ReactQueryClient = queryClient; + } + return ( {}}> - - + + + + ); diff --git a/apps/desktop/src/components/primitive/Button.tsx b/apps/desktop/src/components/primitive/Button.tsx index 735461d87..25746ad55 100644 --- a/apps/desktop/src/components/primitive/Button.tsx +++ b/apps/desktop/src/components/primitive/Button.tsx @@ -86,14 +86,14 @@ export interface ButtonProps extends React.ButtonHTMLAttributes = ({ loading, ...props }) => { +export const Button: React.FC = ({ loading, justifyLeft, ...props }) => { return (