Skip to content

Commit

Permalink
add placeholder logic
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianWhitneyAI committed Oct 28, 2024
1 parent e159438 commit 8c810a6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/core/state/interaction/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -715,9 +715,6 @@ export interface MoveFilesAction {
}

export function moveFiles(fileDetails: FileDetail[], target: string): MoveFilesAction {
console.log(
`Moving ${fileDetails.length} files ${target === "ON_TO_NAS" ? "onto" : "off of"} NAS.`
);
return {
type: MOVE_FILES,
payload: {
Expand Down
16 changes: 16 additions & 0 deletions packages/core/state/interaction/logics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ import {
SetIsSmallScreenAction,
setVisibleModal,
hideVisibleModal,
MoveFilesAction,
MOVE_FILES,
} from "./actions";
import * as interactionSelectors from "./selectors";
import { DownloadResolution, FileInfo } from "../../services/FileDownloadService";
Expand Down Expand Up @@ -575,6 +577,19 @@ const setIsSmallScreen = createLogic({
type: SET_IS_SMALL_SCREEN,
});

/**
* Interceptor responsible for handling the MOVE_FILES action.
* Logs the target location for file movement in the console.
*/
const moveFilesLogic = createLogic({
type: MOVE_FILES,
process(deps, dispatch, done) {
const action = deps.action as MoveFilesAction;
console.log(`Moving files to location: ${action.payload.target}`);
done();
},
});

export default [
initializeApp,
downloadManifest,
Expand All @@ -586,4 +601,5 @@ export default [
showContextMenu,
refresh,
setIsSmallScreen,
moveFilesLogic,
];

0 comments on commit 8c810a6

Please sign in to comment.