From f86cf3b0a18ff71745da9cc343fc823a068aba17 Mon Sep 17 00:00:00 2001 From: ARCANEDEV Date: Sun, 12 Feb 2017 16:26:32 +0000 Subject: [PATCH] Updating the Media Manager --- config/media.php | 28 +++- resources/assets/js/Helpers/Errors.vue | 23 +++ resources/assets/js/MediaManager.vue | 9 +- .../assets/js/Modals/CreateFolderModal.vue | 46 +++--- .../assets/js/Modals/DeleteMediaModal.vue | 38 +++-- .../assets/js/Modals/RenameMediaModal.vue | 3 +- .../assets/js/Modals/UploadMediaModal.vue | 6 +- src/Contracts/Media.php | 40 ++++- src/Entities/DirectoryCollection.php | 22 ++- src/Entities/FileCollection.php | 23 ++- src/Exceptions/AccessNotAllowed.php | 9 + src/Exceptions/DirectoryNotFound.php | 9 + src/Exceptions/MediaException.php | 9 + src/Helpers/ExcludePattern.php | 36 ++++ .../Controllers/Admin/MediasController.php | 3 +- src/Media.php | 156 +++++++++++++++--- 16 files changed, 375 insertions(+), 85 deletions(-) create mode 100644 resources/assets/js/Helpers/Errors.vue create mode 100644 src/Exceptions/AccessNotAllowed.php create mode 100644 src/Exceptions/DirectoryNotFound.php create mode 100644 src/Exceptions/MediaException.php create mode 100644 src/Helpers/ExcludePattern.php diff --git a/config/media.php b/config/media.php index 499eb1f..6e52afc 100644 --- a/config/media.php +++ b/config/media.php @@ -1,9 +1,9 @@ [ 'default' => 'media', @@ -17,11 +17,31 @@ ], ], - /* ------------------------------------------------------------------------------------------------ + /* ----------------------------------------------------------------- | Route - | ------------------------------------------------------------------------------------------------ + | ----------------------------------------------------------------- */ 'route' => [ 'prefix' => 'media', ], + + /* ----------------------------------------------------------------- + | Directories + | ----------------------------------------------------------------- + */ + 'directories' => [ + 'excluded' => [ + // + ], + ], + + /* ----------------------------------------------------------------- + | Files + | ----------------------------------------------------------------- + */ + 'files' => [ + 'excluded' => [ + '.gitignore', + ], + ], ]; diff --git a/resources/assets/js/Helpers/Errors.vue b/resources/assets/js/Helpers/Errors.vue new file mode 100644 index 0000000..8fbc0d4 --- /dev/null +++ b/resources/assets/js/Helpers/Errors.vue @@ -0,0 +1,23 @@ + + + diff --git a/resources/assets/js/MediaManager.vue b/resources/assets/js/MediaManager.vue index e5d508d..646e8d6 100644 --- a/resources/assets/js/MediaManager.vue +++ b/resources/assets/js/MediaManager.vue @@ -86,8 +86,7 @@