Skip to content

Commit

Permalink
Autoformat
Browse files Browse the repository at this point in the history
  • Loading branch information
Rocky43007 committed Jan 10, 2025
1 parent 0eb91a5 commit 7262544
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 13 deletions.
8 changes: 4 additions & 4 deletions apps/desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ sd-prisma = { path = "../../../crates/prisma" }
# Workspace dependencies
axum = { workspace = true, features = ["query"] }
axum-extra = { workspace = true, features = ["typed-header"] }
base64 = { workspace = true }
futures = { workspace = true }
http = { workspace = true }
hyper = { workspace = true }
Expand All @@ -32,25 +33,24 @@ thiserror = { workspace = true }
tokio = { workspace = true, features = ["sync"] }
tracing = { workspace = true }
uuid = { workspace = true, features = ["serde"] }
base64 = { workspace = true }

# Specific Desktop dependencies
# WARNING: Do NOT enable default features, as that vendors dbus (see below)
drag = { git = "https://github.com/spacedriveapp/drag-rs", rev = "157b2cd9" }
opener = { version = "0.7.1", features = ["reveal"], default-features = false }
specta-typescript = "=0.0.7"
tauri-plugin-clipboard-manager = "=2.0.1"
tauri-plugin-cors-fetch = { path = "../../../crates/tauri-plugin-cors-fetch" }
tauri-plugin-deep-link = "=2.0.1"
tauri-plugin-dialog = "=2.0.3"
tauri-plugin-drag = "2.0.0"
tauri-plugin-http = "=2.0.3"
tauri-plugin-os = "=2.0.1"
tauri-plugin-shell = "=2.0.2"
tauri-plugin-updater = "=2.0.2"
tauri-plugin-drag = "2.0.0"
drag = { git = "https://github.com/spacedriveapp/drag-rs", rev = "157b2cd9" }

# memory allocator
mimalloc = { workspace = true }
mimalloc = { workspace = true }

[dependencies.tauri]
features = ["linux-libxdo", "macos-private-api", "native-tls-vendored", "unstable"]
Expand Down
4 changes: 3 additions & 1 deletion apps/desktop/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@
"plugins": {
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEZBMURCMkU5NEU3NDAyOEMKUldTTUFuUk82YklkK296dlkxUGkrTXhCT3ZMNFFVOWROcXNaS0RqWU1kMUdRV2tDdFdIS0Y3YUsK",
"endpoints": ["https://spacedrive.com/api/releases/tauri/{{version}}/{{target}}/{{arch}}"]
"endpoints": [
"https://spacedrive.com/api/releases/tauri/{{version}}/{{target}}/{{arch}}"
]
},
"deep-link": {
"mobile": [],
Expand Down
7 changes: 5 additions & 2 deletions apps/desktop/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ function useDragAndDrop() {
}

const file_path =
'path' in data ? data.path : await libraryClient.query(['files.getPath', data.id]);
'path' in data
? data.path
: await libraryClient.query(['files.getPath', data.id]);

console.log('Resolved file path:', file_path);
return {
Expand Down Expand Up @@ -386,7 +388,8 @@ function AppInner() {
new Promise((res) => {
startTransition(() => {
setTabs((tabs) => {
const { pathname, search } = selectedTab.router.state.location;
const { pathname, search } =
selectedTab.router.state.location;
const newTab = createTab({ pathname, search });
const newTabs = [...tabs, newTab];

Expand Down
13 changes: 10 additions & 3 deletions interface/app/$libraryId/Explorer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,18 @@ export default function Explorer(props: PropsWithChildren<Props>) {
contextMenu={props.contextMenu ? props.contextMenu() : <ContextMenu />}
emptyNotice={
props.emptyNotice ?? (
<EmptyNotice icon={FolderNotchOpen} message="This folder is empty" />
<EmptyNotice
icon={FolderNotchOpen}
message="This folder is empty"
/>
)
}
listViewOptions={{ hideHeaderBorder: true }}
scrollPadding={{
top: topBar.topBarHeight,
bottom: showPathBar ? PATH_BAR_HEIGHT + (showTagBar ? TAG_BAR_HEIGHT : 0) : undefined
bottom: showPathBar
? PATH_BAR_HEIGHT + (showTagBar ? TAG_BAR_HEIGHT : 0)
: undefined
}}
/>
</div>
Expand All @@ -142,7 +147,9 @@ export default function Explorer(props: PropsWithChildren<Props>) {
)}
style={{
paddingTop: topBar.topBarHeight + 12,
bottom: showPathBar ? PATH_BAR_HEIGHT + (showTagBar ? TAG_BAR_HEIGHT : 0) : 0
bottom: showPathBar
? PATH_BAR_HEIGHT + (showTagBar ? TAG_BAR_HEIGHT : 0)
: 0
}}
/>
)}
Expand Down
7 changes: 5 additions & 2 deletions interface/app/$libraryId/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ const Layout = () => {
'flex h-screen select-none overflow-hidden text-ink',
os === 'macOS' && [
'has-blur-effects',
!windowState.isFullScreen && 'frame rounded-[10px] border border-transparent'
!windowState.isFullScreen &&
'frame rounded-[10px] border border-transparent'
]
)}
onContextMenu={(e) => {
Expand All @@ -90,7 +91,9 @@ const Layout = () => {
{library ? (
<QuickPreviewContextProvider>
<LibraryContextProvider library={library}>
<Suspense fallback={<div className="h-screen w-screen bg-app" />}>
<Suspense
fallback={<div className="h-screen w-screen bg-app" />}
>
<Outlet />
<CMDK />
<DragOverlay />
Expand Down
5 changes: 4 additions & 1 deletion interface/hooks/useFileDropEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export const useFileDropEventHandler = (libraryId?: string) => {
const paths = e.detail.paths;

if (libraryId && path) {
libraryClient.mutation(['ephemeralFiles.cutFiles', { sources: paths, target_dir: path! }]);
libraryClient.mutation([
'ephemeralFiles.cutFiles',
{ sources: paths, target_dir: path! }
]);
} else if (libraryId) {
// Get Materialized Path using the location id
const locationId = id;
Expand Down

0 comments on commit 7262544

Please sign in to comment.