mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +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;
|
||||
|
||||
@@ -77,6 +77,7 @@ export const ServerContext = createContextStore<ServerStore>({
|
||||
state.databases.data = [];
|
||||
state.subusers.data = [];
|
||||
state.files.directory = '/';
|
||||
state.files.selectedFiles = [];
|
||||
state.backups.data = [];
|
||||
state.schedules.data = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user