diff --git a/resources/assets/scripts/components/server/components/filemanager/FileContextMenu.vue b/resources/assets/scripts/components/server/components/filemanager/FileContextMenu.vue index cb541d33b..f808fc22e 100644 --- a/resources/assets/scripts/components/server/components/filemanager/FileContextMenu.vue +++ b/resources/assets/scripts/components/server/components/filemanager/FileContextMenu.vue @@ -27,7 +27,7 @@
-
+
@@ -73,6 +73,11 @@ this.$emit('close'); }, + openNewFileModal: function () { + window.events.$emit('server:files:open-new-file-modal'); + this.$emit('close'); + }, + triggerAction: function (action: string) { this.$emit(`action:${action}`); } diff --git a/resources/assets/scripts/components/server/components/filemanager/modals/NewFileModal.vue b/resources/assets/scripts/components/server/components/filemanager/modals/NewFileModal.vue new file mode 100644 index 000000000..2ca754e22 --- /dev/null +++ b/resources/assets/scripts/components/server/components/filemanager/modals/NewFileModal.vue @@ -0,0 +1,43 @@ + + + diff --git a/resources/assets/scripts/components/server/subpages/FileManager.vue b/resources/assets/scripts/components/server/subpages/FileManager.vue index 42c2e7972..4d17bc383 100644 --- a/resources/assets/scripts/components/server/subpages/FileManager.vue +++ b/resources/assets/scripts/components/server/subpages/FileManager.vue @@ -48,10 +48,11 @@ New Folder
- New File + New File
+
@@ -64,6 +65,7 @@ import CreateFolderModal from '../components/filemanager/modals/CreateFolderModal.vue'; import DeleteFileModal from '../components/filemanager/modals/DeleteFileModal.vue'; import {DirectoryContentObject} from "@/api/server/types"; + import NewFileModal from "@/components/server/components/filemanager/modals/NewFileModal.vue"; type DataStructure = { loading: boolean, @@ -76,7 +78,7 @@ export default Vue.extend({ name: 'FileManager', - components: {CreateFolderModal, DeleteFileModal, FileRow}, + components: {CreateFolderModal, DeleteFileModal, FileRow, NewFileModal}, computed: { /** @@ -178,6 +180,10 @@ window.events.$emit('server:files:open-directory-modal'); }, + openNewFileModal: function () { + window.events.$emit('server:files:open-new-file-modal'); + }, + fileRowDeleted: function (file: DirectoryContentObject, directory: boolean) { if (directory) { this.directories = this.directories.filter(data => data !== file);