mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-22 16:23:45 +02:00
Mass actions for moving files, mostly working?
This commit is contained in:
@@ -3,15 +3,23 @@ import { cleanDirectoryPath } from '@/helpers';
|
||||
|
||||
export interface ServerFileStore {
|
||||
directory: string;
|
||||
selectedFiles: string[];
|
||||
|
||||
setDirectory: Action<ServerFileStore, string>;
|
||||
setSelectedFiles: Action<ServerFileStore, string[]>;
|
||||
}
|
||||
|
||||
const files: ServerFileStore = {
|
||||
directory: '/',
|
||||
selectedFiles: [],
|
||||
|
||||
setDirectory: action((state, payload) => {
|
||||
state.directory = cleanDirectoryPath(payload);
|
||||
}),
|
||||
|
||||
setSelectedFiles: action((state, payload) => {
|
||||
state.selectedFiles = payload;
|
||||
}),
|
||||
};
|
||||
|
||||
export default files;
|
||||
|
||||
Reference in New Issue
Block a user