File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,18 @@ export async function handleDrop(
3030 item :
3131 | ItemReference
3232 | Context
33- | { type : "trash" | "notebooks" | "favorites" | undefined }
33+ | { type : "trash" | "notebooks" | "favorites" | "archive" | undefined }
3434) {
3535 if ( ! item . type ) return ;
3636
3737 const noteIds = getDragData ( dataTransfer , "note" ) ;
3838 const notebookIds = getDragData ( dataTransfer , "notebook" ) ;
39- const { setColor, favorite, delete : trashNotes } = useNoteStore . getState ( ) ;
39+ const {
40+ setColor,
41+ favorite,
42+ delete : trashNotes ,
43+ archive
44+ } = useNoteStore . getState ( ) ;
4045 switch ( item . type ) {
4146 case "notebook" :
4247 if ( noteIds . length > 0 ) {
@@ -83,5 +88,8 @@ export async function handleDrop(
8388 await useNoteStore . getState ( ) . refresh ( ) ;
8489 }
8590 break ;
91+ case "archive" :
92+ archive ( true , ...noteIds ) ;
93+ break ;
8694 }
8795}
Original file line number Diff line number Diff line change @@ -506,6 +506,8 @@ function RouteItem({
506506 ? "trash"
507507 : item . path === "/favorites"
508508 ? "favorites"
509+ : item . path == "/archive"
510+ ? "archive"
509511 : undefined
510512 } ) ;
511513 } }
You can’t perform that action at this time.
0 commit comments