copy files
This commit is contained in:
18
frontend/stores/copy.ts
Normal file
18
frontend/stores/copy.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
export const useCopyStore = defineStore('file-copy', {
|
||||
state: () => ({
|
||||
file: null as { warrenId: string; path: string; name: string } | null,
|
||||
}),
|
||||
actions: {
|
||||
copyFile(warrenId: string, filePath: string, fileName: string) {
|
||||
this.file = {
|
||||
warrenId,
|
||||
path: filePath,
|
||||
name: fileName,
|
||||
};
|
||||
},
|
||||
/** Removes the current file from the "clipboard" */
|
||||
clearFile() {
|
||||
this.file = null;
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user