mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-10-18 07:03:06 -04:00
add frontend ground work for cut/copy actions
This commit is contained in:
1 parent
e376a2a46a
commit
712442b415
6 files changed
+274
-1
No files matched your search
@@ -2,6 +2,7 @@ use crate::{
|
||||
invalidate_query,
|
||||
job::Job,
|
||||
object::fs::{
|
||||
copy::{FileCopierJob, FileCopierJobInit},
|
||||
decrypt::{FileDecryptorJob, FileDecryptorJobInit},
|
||||
delete::{FileDeleterJob, FileDeleterJobInit},
|
||||
duplicate::{FileDuplicatorJob, FileDuplicatorJobInit},
|
||||
@@ -133,6 +134,14 @@ pub(crate) fn mount() -> RouterBuilder {
|
||||
.await;
|
||||
invalidate_query!(library, "locations.getExplorerData");
|
||||
|
||||
Ok(())
|
||||
})
|
||||
})
|
||||
.library_mutation("copyFiles", |t| {
|
||||
t(|_, args: FileCopierJobInit, library| async move {
|
||||
library.spawn_job(Job::new(args, FileCopierJob {})).await;
|
||||
invalidate_query!(library, "locations.getExplorerData");
|
||||
|
||||
Ok(())
|
||||
})
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user