From 960e7c4ef5b99210a704c218002fa096079a4e87 Mon Sep 17 00:00:00 2001 From: Arnab Chakraborty <11457760+Rocky43007@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:49:46 -0400 Subject: [PATCH] Autoformatting --- apps/desktop/src-tauri/Cargo.toml | 16 ++++++------- .../src-tauri/capabilities/default.json | 4 +--- apps/desktop/src-tauri/tauri.conf.json | 24 ++++--------------- .../src/components/overview/Devices.tsx | 4 ++-- apps/mobile/src/stores/userStore.ts | 6 ++--- core/prisma/migrations/migration_lock.toml | 2 +- .../Layout/Sidebar/sections/Devices/index.tsx | 6 ++++- .../settings/client/SpacedriveAccount.tsx | 2 +- interface/hooks/useDeeplinkEventHandler.ts | 4 +++- packages/ui/tsconfig.json | 2 +- 10 files changed, 29 insertions(+), 41 deletions(-) diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index e7a1b7fbc..ef5d46949 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -34,15 +34,15 @@ uuid = { workspace = true, features = ["serde"] } # Specific Desktop dependencies # WARNING: Do NOT enable default features, as that vendors dbus (see below) -opener = { version = "0.7.1", features = ["reveal"], default-features = false } -specta-typescript = "=0.0.7" -tauri-plugin-deep-link = "=2.0.1" +opener = { version = "0.7.1", features = ["reveal"], default-features = false } +specta-typescript = "=0.0.7" tauri-plugin-clipboard-manager = "=2.0.1" -tauri-plugin-dialog = "=2.0.1" -tauri-plugin-http = "=2.0.1" -tauri-plugin-os = "=2.0.1" -tauri-plugin-shell = "=2.0.1" -tauri-plugin-updater = "=2.0.2" +tauri-plugin-deep-link = "=2.0.1" +tauri-plugin-dialog = "=2.0.1" +tauri-plugin-http = "=2.0.1" +tauri-plugin-os = "=2.0.1" +tauri-plugin-shell = "=2.0.1" +tauri-plugin-updater = "=2.0.2" # memory allocator mimalloc = { workspace = true } diff --git a/apps/desktop/src-tauri/capabilities/default.json b/apps/desktop/src-tauri/capabilities/default.json index 62a572b16..5b68a580b 100644 --- a/apps/desktop/src-tauri/capabilities/default.json +++ b/apps/desktop/src-tauri/capabilities/default.json @@ -2,9 +2,7 @@ "$schema": "../gen/schemas/desktop-schema.json", "identifier": "default", "description": "Capability for the main window", - "windows": [ - "main" - ], + "windows": ["main"], "permissions": [ "core:app:default", "core:event:default", diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index f89f76850..1bf5fa3b9 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -29,9 +29,7 @@ "transparent": true, "center": true, "windowEffects": { - "effects": [ - "sidebar" - ], + "effects": ["sidebar"], "state": "followsWindowActiveState", "radius": 9 } @@ -48,11 +46,7 @@ }, "bundle": { "active": true, - "targets": [ - "deb", - "msi", - "dmg" - ], + "targets": ["deb", "msi", "dmg"], "publisher": "Spacedrive Technology Inc.", "copyright": "Spacedrive Technology Inc.", "category": "Productivity", @@ -71,20 +65,14 @@ "files": { "/usr/share/spacedrive/models/yolov8s.onnx": "../../.deps/models/yolov8s.onnx" }, - "depends": [ - "libc6", - "libxdo3", - "dbus" - ] + "depends": ["libc6", "libxdo3", "dbus"] } }, "macOS": { "minimumSystemVersion": "10.15", "exceptionDomain": null, "entitlements": null, - "frameworks": [ - "../../.deps/Spacedrive.framework" - ], + "frameworks": ["../../.deps/Spacedrive.framework"], "dmg": { "background": "dmg-background.png", "appPosition": { @@ -121,9 +109,7 @@ "deep-link": { "mobile": [], "desktop": { - "schemes": [ - "spacedrive" - ] + "schemes": ["spacedrive"] } } } diff --git a/apps/mobile/src/components/overview/Devices.tsx b/apps/mobile/src/components/overview/Devices.tsx index 5fba317ff..715d17bf4 100644 --- a/apps/mobile/src/components/overview/Devices.tsx +++ b/apps/mobile/src/components/overview/Devices.tsx @@ -117,8 +117,8 @@ const Devices = ({ node, stats }: Props) => { name={device.name} // TODO (Optional): Use Brand Type for Different Android Models/iOS Models using DeviceInfo.getBrand() icon={hardwareModelToIcon(device.hardware_model)} - totalSpace={"0"} - freeSpace={"0"} + totalSpace={'0'} + freeSpace={'0'} color="#0362FF" connectionType={'cloud'} /> diff --git a/apps/mobile/src/stores/userStore.ts b/apps/mobile/src/stores/userStore.ts index aeb3f85ed..8a1bfe6a7 100644 --- a/apps/mobile/src/stores/userStore.ts +++ b/apps/mobile/src/stores/userStore.ts @@ -1,5 +1,4 @@ -import {proxy, useSnapshot} from 'valtio'; - +import { proxy, useSnapshot } from 'valtio'; export type User = { id: string; @@ -12,10 +11,9 @@ const state = { userInfo: undefined as User | undefined }; - const store = proxy({ ...state -}) +}); // for reading export const useUserStore = () => useSnapshot(store); diff --git a/core/prisma/migrations/migration_lock.toml b/core/prisma/migrations/migration_lock.toml index e5e5c4705..6fcf33daf 100644 --- a/core/prisma/migrations/migration_lock.toml +++ b/core/prisma/migrations/migration_lock.toml @@ -1,3 +1,3 @@ # Please do not edit this file manually # It should be added in your version-control system (i.e. Git) -provider = "sqlite" \ No newline at end of file +provider = "sqlite" diff --git a/interface/app/$libraryId/Layout/Sidebar/sections/Devices/index.tsx b/interface/app/$libraryId/Layout/Sidebar/sections/Devices/index.tsx index 7a4d7a768..a4e9ccb09 100644 --- a/interface/app/$libraryId/Layout/Sidebar/sections/Devices/index.tsx +++ b/interface/app/$libraryId/Layout/Sidebar/sections/Devices/index.tsx @@ -15,7 +15,11 @@ export default function DevicesSection() { return (
{node && ( - + {node.device_model ? (
- {t('logged_in_as', "TODO")} + {t('logged_in_as', 'TODO')} ); } diff --git a/interface/hooks/useDeeplinkEventHandler.ts b/interface/hooks/useDeeplinkEventHandler.ts index 14f4f0a0b..11556ec66 100644 --- a/interface/hooks/useDeeplinkEventHandler.ts +++ b/interface/hooks/useDeeplinkEventHandler.ts @@ -17,7 +17,9 @@ export const useDeeplinkEventHandler = () => { const searchParamsObj = new URLSearchParams(searchParams); const searchParamsString = searchParamsObj.toString(); console.log('Navigating to', { - path, searchParamsString, hash + path, + searchParamsString, + hash }); navigate({ pathname: path, search: searchParamsString, hash }); diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json index 0c6521e2c..0ba317fbf 100644 --- a/packages/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -3,5 +3,5 @@ "compilerOptions": { "rootDir": "src", "declarationDir": "dist" - }, + } }