diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index fc5640e..c2c8aef 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,7 +10,7 @@ assignees: '' -> What version of Laravel are you using? (nothing lower than v5.4). +> What version of Laravel are you using? (nothing lower than v6). ... diff --git a/README.md b/README.md index 77abe2b..90d6868 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@

Laravel Media Manager
+ Browser Status Latest Stable Version Total Downloads
@@ -24,14 +25,6 @@ - `composer require ctf0/media-manager` -- (Laravel < 5.5) add the service provider to `config/app.php` - - ```php - 'providers' => [ - ctf0\MediaManager\MediaManagerServiceProvider::class, - ] - ``` - - publish the package assets with `php artisan vendor:publish --provider="ctf0\MediaManager\MediaManagerServiceProvider"` @@ -43,7 +36,7 @@ - [install dependencies](https://github.com/ctf0/Laravel-Media-Manager/wiki/Packages-In-Use) ```bash - yarn add vue vue-ls vue-infinite-loading vue-image-compare2 vue-tippy@v2 vue2-filters vue-input-autowidth vue-notif vue-clipboard2 vue-awesome@v2 vue-touch@next vue-focuspoint-component axios dropzone cropperjs keycode lottie-web plyr fuse.js music-metadata-browser idb-keyval + yarn add vue vue-ls vue-infinite-loading vue-image-compare2 vue-tippy@v2 vue2-filters vue-input-autowidth vue-notif vue-clipboard2 vue-awesome@v2 vue-touch@next vue-focuspoint-component axios dropzone cropperjs keycode lottie-web plyr fuse.js music-metadata-browser idb-keyval annyang yarn add worker-loader --dev ``` @@ -54,10 +47,7 @@ // app.js window.Vue = require('vue') - // Laravel < v5.7 - require('../vendor/MediaManager/js/manager') - // Laravel > v5.7 - // require('../assets/vendor/MediaManager/js/manager') + require('../assets/vendor/MediaManager/js/manager') new Vue({ el: '#app' diff --git a/composer.json b/composer.json index f28d476..8c9bbf7 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ ], "require": { "php": "~7.0", - "illuminate/support": "^5.4 || ^6.0 || ^7.0", + "illuminate/support": "^6.0 || ^7.0", "maennchen/zipstream-php": "~1.0", "ctf0/package-changelog": "*", "jhofm/flysystem-iterator": "^2.2" diff --git a/logs/v3.6.6.txt b/logs/v3.6.6.txt deleted file mode 100644 index b3eb104..0000000 --- a/logs/v3.6.6.txt +++ /dev/null @@ -1,3 +0,0 @@ -- use restrict from modal "issues/139" -- fix not updating the page url on manager startup -- update wiki diff --git a/logs/v3.7.0.txt b/logs/v3.7.0.txt new file mode 100644 index 0000000..615b540 --- /dev/null +++ b/logs/v3.7.0.txt @@ -0,0 +1,9 @@ +- add voice search, plz test and reply back +- add new npm-dep "annyang" +- fix not able to scroll the files container on touch screen +- fix timestamp issue for cloud disks "https://github.com/ctf0/Laravel-Media-Manager/issues/143" +- fix url update "https://github.com/ctf0/Laravel-Media-Manager/issues/142" +- make sure all tooltips have the same styles +- hide folder info if 'get_folder_info' is false +- stop supporting laravel v5 +- some cleanups diff --git a/src/App/Controllers/MediaController.php b/src/App/Controllers/MediaController.php index 56bd4ad..18cf571 100755 --- a/src/App/Controllers/MediaController.php +++ b/src/App/Controllers/MediaController.php @@ -61,8 +61,8 @@ public function __construct() $this->storageDiskInfo = app('config')->get("filesystems.disks.{$this->fileSystem}"); $this->baseUrl = $this->storageDisk->url('/'); $this->db = app('db') - ->connection($config['database_connection'] ?? 'mediamanager') - ->table($config['table_locked'] ?? 'locked'); + ->connection($config['database_connection']) + ->table($config['table_locked']); $this->storageDisk->addPlugin(new IteratorPlugin()); } diff --git a/src/App/Controllers/Modules/GetContent.php b/src/App/Controllers/Modules/GetContent.php index dd7aab8..90a095c 100644 --- a/src/App/Controllers/Modules/GetContent.php +++ b/src/App/Controllers/Modules/GetContent.php @@ -47,24 +47,20 @@ protected function getData($dir) $dirList = $this->getFolderContent($dir); $storageFolders = $this->getFolderListByType($dirList, 'dir'); $storageFiles = $this->getFolderListByType($dirList, 'file'); - $pattern = $this->ignoreFiles; // folders foreach ($storageFolders as $folder) { $path = $folder['path']; - $time = $folder['timestamp']; - - if ($this->GFI) { - $info = $this->getFolderInfoFromList($this->getFolderContent($path, true)); - } + $time = $folder['timestamp'] ?? null; + $info = $this->GFI ? $this->getFolderInfoFromList($this->getFolderContent($path, true)) : []; $list[] = [ 'name' => $folder['basename'], 'type' => 'folder', + 'size' => $info['size'] ?? 0, + 'count' => $info['count'] ?? 0, 'path' => $this->resolveUrl($path), 'storage_path' => $path, - 'size' => isset($info) ? $info['size'] : 0, - 'count' => isset($info) ? $info['count'] : 0, 'last_modified' => $time, 'last_modified_formated' => $this->getItemTime($time), ]; @@ -73,15 +69,15 @@ protected function getData($dir) // files foreach ($storageFiles as $file) { $path = $file['path']; - $time = $file['timestamp']; + $time = $file['timestamp'] ?? null; $list[] = [ 'name' => $file['basename'], 'type' => $file['mimetype'], - 'path' => $this->resolveUrl($path), - 'storage_path' => $path, 'size' => $file['size'], 'visibility' => $file['visibility'], + 'path' => $this->resolveUrl($path), + 'storage_path' => $path, 'last_modified' => $time, 'last_modified_formated' => $this->getItemTime($time), ]; diff --git a/src/App/Controllers/Modules/Utils.php b/src/App/Controllers/Modules/Utils.php index accf584..cc62448 100644 --- a/src/App/Controllers/Modules/Utils.php +++ b/src/App/Controllers/Modules/Utils.php @@ -59,7 +59,7 @@ protected function filePattern($item) protected function getItemTime($time) { - return Carbon::createFromTimestamp($time)->{$this->LMF}(); + return $time ? Carbon::createFromTimestamp($time)->{$this->LMF}() : null; } /** diff --git a/src/config/mediaManager.php b/src/config/mediaManager.php index 41fcefe..7b099b7 100644 --- a/src/config/mediaManager.php +++ b/src/config/mediaManager.php @@ -35,6 +35,7 @@ * white space * * to add & nest folders in one go add '\/' + * avoid using '#' as browser interpret it as an anchor */ 'allowed_folderNames_chars' => '_\-\s', diff --git a/src/resources/assets/js/components/globalSearch/button.vue b/src/resources/assets/js/components/globalSearch/button.vue index efe280c..669a449 100644 --- a/src/resources/assets/js/components/globalSearch/button.vue +++ b/src/resources/assets/js/components/globalSearch/button.vue @@ -1,5 +1,5 @@