From c68f28a88dbadb812fa3258ce0477f72abb95dad Mon Sep 17 00:00:00 2001 From: Ahmed Kandil Date: Mon, 24 Jun 2019 18:59:31 +0200 Subject: [PATCH 1/2] Extend settings Add and apply more settings (btnClasses, showFullScreen, showAbout, showDiskList, viewType, folderIcon, showProperties, showSize, canDownload, canManage) from outside the compiled fileusing var fmSettings = {settings key:value pairs}; --- INSTALL.md | 100 ++++++++++++++++++ src/components/blocks/InfoBlock.vue | 8 +- src/components/blocks/Navbar.vue | 60 +++++++---- .../blocks/mixins/contextMenuRules.js | 44 +++++--- src/components/manager/DiskList.vue | 6 +- src/components/manager/GridView.vue | 8 +- src/components/manager/TableView.vue | 12 ++- src/components/modals/views/Preview.vue | 6 +- src/init.js | 4 + src/store/settings/mutations.js | 9 ++ src/store/settings/store.js | 14 +++ 11 files changed, 226 insertions(+), 45 deletions(-) create mode 100644 INSTALL.md diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..9cf3a49 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,100 @@ +## Installation + +### Laravel +1. Create new laravel project + ``` + composer create-project --prefer-dist laravel/laravel fm + ``` + +2. Install file manager packend package + ``` + composer require alexusmai/laravel-file-manager + ``` + +3. Publish configuration file + ``` + php artisan vendor:publish --tag=fm-config + ``` + +4. Publish compiled and minimized js and css files + ``` + php artisan vendor:publish --tag=fm-assets + ``` + +5. Edit the content of `resources/views/welcome.blade.php` adding + ``` + + + + + + + + + .... + +
+
+
+
+
+
+
+ ... + + + ``` + +### NPM +1. Install node dependencies + ``` + npm install + ``` + +2. Install file manager frontend package + ``` + npm install laravel-file-manager --save + ``` + +3. Change the content of `resources/js/app.js` to + ``` + import Vue from 'vue'; + import Vuex from 'vuex'; + import FileManager from 'laravel-file-manager' + + Vue.use(Vuex); + + const store = new Vuex.Store(); + + Vue.use(FileManager, { + store + }); + + window.fm = new Vue({ + el: '#fm', + store, + template: '' + }); + ``` + +4. Edit the content of `resources/views/welcome.blade.php` replacing + ``` + + ``` + And + ``` + + ``` + With + ``` + + ``` + +5. Compile frontend package + ``` + npm run dev + ``` + +6. Work on frontend package at `node_modules/laravel-file-manager` doing the modifications needed. Would be better to track changes using git + +7. Compile again by `npm run production` then copy final `public/js/app.js` to your laravel app `public/js/file-manager.js` you don't need any css files as it is already included in the js file diff --git a/src/components/blocks/InfoBlock.vue b/src/components/blocks/InfoBlock.vue index a16d744..36551d4 100644 --- a/src/components/blocks/InfoBlock.vue +++ b/src/components/blocks/InfoBlock.vue @@ -3,12 +3,12 @@
{{ `${lang.info.selected} ${selectedCount}` }} - {{ `${lang.info.selectedSize} ${selectedFilesSize}` }} + {{ `${lang.info.selectedSize} ${selectedFilesSize}` }} {{ `${lang.info.directories} ${directoriesCount}` }} {{ `${lang.info.files} ${filesCount}` }} - {{ `${lang.info.size} ${filesSize}`}} + {{ `${lang.info.size} ${filesSize}`}}
@@ -42,6 +42,7 @@