• Stars
    star
    830
  • Rank 54,934 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 7 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A "Vuejs & Laravel" Media Manager With Tons of Features

Laravel Media Manager
Browser Status Latest Stable Version Total Downloads
Browser Status

main card


Installation

  • composer require ctf0/media-manager

  • publish the package assets with

    php artisan vendor:publish --provider="ctf0\MediaManager\MediaManagerServiceProvider"

  • after installation, run php artisan lmm:setup to add

    • package routes to routes/web.php
    • package assets compiling to webpack.mix.js
  • for lock/unlock item/s we use a db "sqlite" but if you prefer to use something else you should run the migration

    php artisan migrate
  • install dependencies

    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 vue-touch@next vue-focuspoint-component axios dropzone cropperjs keycode lottie-web plyr fuse.js music-metadata-browser idb-keyval annyang
    yarn add buffer process --dev
  • add this one liner to your main js file and run npm run watch to compile your js/css files.

    // app.js
    
    // mix v5
    window.Vue = require('vue')
    
    // mix v6
    import Vue from 'vue'
    
    require('../assets/vendor/MediaManager/js/manager')
    
    new Vue({
        el: '#app'
    })

Config


Features

  • image editor
  • multi
    • upload
    • move/copy
    • delete
  • upload by either
    • using the upload panel
    • drag & drop anywhere
    • click & hold on an empty area "items container"
    • from a url "images only"
  • preview files before uploading
  • toggle between random/original names for uploaded files
  • asynchronous Updates
  • bulk selection
  • bookmark visited directories for quicker navigation
  • change item/s visibility
  • update the page url on navigation
  • show audio files info "artist, album, year, etc.."
  • dynamically hide files / folders
  • restrict access to path
  • download selected "including bulk selection"
  • directly copy selected file link
  • use the manager
  • auto scroll to selected item using "left, up, right, down, home, end"
  • lock/unlock item/s.
  • search in the current directory or globally through the entire collection.
  • filter by
    • folder
    • image
    • audio
    • video
    • text/pdf
    • application/archive
    • locked items
    • selected items
  • sort by
    • name
    • size
    • last modified
  • items count for
    • all
    • selected
    • search found
  • contents ratio bar
  • protection against overwriting (files/folders)
  • file name sanitization for
    • upload
    • rename
    • new folder
  • disable/enable buttons depend on the usage to avoid noise & keep the user focused
  • shortcuts / gestures
    • if no more rows available, pressing down will go to the last item in the list "same as native file manager".
    • when viewing a audio/video file in the preview card, pressing space will play/pause the item instead of closing the modal.
    • dbl click/tap
      • any file of type audio/video when sidebar is hidden, will open it in the preview card "same as images".
      • any file of type application/archive will download it.
    • all the left/right gestures have their counterparts available as well.
    • pressing esc while using the image editor wont close the modal but you can dbl click/tap the modal background to do so. "to avoid accidentally canceling your changes".

- the info sidebar is only available on big screens "> 1023px".
- to stop interfering with other keydown events you can toggle the manager listener through
EventHub.fire('disable-global-keys', true/false).


navigation button keyboard click / tap touch
toggle upload panel (toolbar) u
refresh (toolbar) r hold "clear cache" pinch in (items container)
move/show movable list (toolbar) m / p
image editor (toolbar) e
delete (toolbar) d / del
lock/unlock (toolbar) l hold "anything but images"
change visibility (toolbar) v
toggle bulk selection (toolbar) b
(reset) bulk select all (toolbar) a
add to movable list (shopping cart) c / x *
move/show movable list (shopping cart) **
clear movable list (shopping cart) hold
toggle sidebar (path bar) t * swipe left/right (sidebar)
confirm (modal) enter
toggle preview image/pdf/text (item) space **
play/pause media (item) space **
hide (modal / upload-panel) esc
reset (search / bulk selection / filter / sorting) esc
reset upload showPreview esc
confirm upload showPreview enter
 
add to movable list (item) swipe up
delete (item) swipe down
rename (item) swipe left
image editor (item) hold
current ++ selected (item) shift + click
current + selected (item) alt/meta + click
create new folder ** (items container)
 
go to next "item" right * swipe left (preview)
go to prev "item" left * swipe right (preview)
go to first "item" home
go to last "item" end
go to next "row" down swipe up (preview)
go to prev "row" up swipe down (preview)
open folder enter **
go to prev "dir" folderName (path bar) backspace * swipe right (items container)

Events

type event-name description
JS
modal-show when modal is shown
modal-hide when modal is hidden
file_selected (when inside modal) get selected file url
multi_file_selected (when inside modal) get bulk selected files urls
folder_selected (when inside modal) get selected folder path
Laravel
MMFileUploaded($file_path, $mime_type, $options) get uploaded file storage path, mime type, custom options
MMFileSaved($file_path, $mime_type) get saved (edited/link) image full storage path, mime type
MMFileDeleted($file_path, $is_folder) get deleted file/folder storage path, if removed item is a folder
MMFileRenamed($old_path, $new_path) get renamed file/folder "old & new" storage path
MMFileMoved($old_path, $new_path) get moved file/folder "old & new" storage path

Usage

Wiki
Demo

  • visit localhost:8000/media

Security

If you discover any security-related issues, please email [email protected].

More Repositories

1

Seti_ST3

Seti_UI Port for ST3.
755
star
2

Lingo

A Gui To Manage Laravel Translation Files
Vue
99
star
3

laravel-mix-versionhash

Auto append hash to file instead of using virtual one
JavaScript
61
star
4

Odin

manage model revisions with ease
PHP
61
star
5

Seti_UX

Seti Improved Scheme/Syntax-HL for ST.
54
star
6

demos

20
star
7

SimpleMenu

create menus that support page (multiLocale "title, url, body, ...", nesting, template, static/dynamic data, roles & permissions).
Blade
19
star
8

OverSeer

preview your form data before submitting
Vue
17
star
9

PackageChangeLog

Show Package Changelog On Composer Install/update
PHP
16
star
10

EmailValidator

validation rule to validate email for Laravel
PHP
16
star
11

MysqlToMongoDb

a simple tool to migrate data from mysql to mongodb for Laravel
PHP
15
star
12

Tagos

A Gui To Manage Tags
Vue
14
star
13

Blazar

Pre-Render Pages on the Fly in Laravel
PHP
14
star
14

vue-multi-ref

JavaScript
12
star
15

vscode-save-editor-layout

TypeScript
11
star
16

vscode-terminal-themes

JavaScript
10
star
17

laravel-firebase-broadcast-driver

a firebase broadcast driver for laravel
PHP
7
star
18

laravel-goto-controller

TypeScript
7
star
19

anonymous-form-component

vuejs anonymous form component
Vue
6
star
20

laravel-goto-config

TypeScript
6
star
21

vscode-show-unsaved-changes

TypeScript
4
star
22

laravel-goto-env

TypeScript
4
star
23

laravel-goto-path

TypeScript
4
star
24

Laravel-Helper-Cmnds

Some Helper Console Cmnds For Laravel To Speedup The Usual Workflow
PHP
3
star
25

mailcheck-vue

https://github.com/mailcheck/mailcheck port for vue
Vue
3
star
26

Error-Views

generic error views
HTML
3
star
27

Yeti_ST3

Yeti_UI Port for ST3
3
star
28

laravel-goto-lang

TypeScript
3
star
29

AssetCacheBust

Automatic Assets CacheBust for Php
PHP
3
star
30

vue-notif

vuejs notification component which you can use either through js or html
Vue
3
star
31

vue-stagger

vue v2 Staggering-List-Transitions
Vue
3
star
32

vscode-php-class-generator

TypeScript
2
star
33

laravel-paymob

PHP
2
star
34

adonis-validation-messages

custom validation msgs instead of the hardcoded default
2
star
35

vscode-activitybar-separator

2
star
36

vscode-jump-to-line-number

TypeScript
2
star
37

Yeti_UX

Yeti Improved Scheme/Syntax-HL for ST
2
star
38

close-tabs-to-the-left

TypeScript
2
star
39

vscode-auto-comment-next-line

JavaScript
2
star
40

cordova-file-manager

a full file manager to "create/remove/rename/copy/move/download & save/list folder content"
JavaScript
2
star
41

laravel-pusher-sharedworkers

Vue
1
star
42

CheckIfUserIsOnlineMiddleware

check if logged user is online middleware
PHP
1
star
43

vscode-php-array-symbol-provider

TypeScript
1
star
44

env-symbol-provider

env-symbol-provider
TypeScript
1
star
45

Seti_UX-vscode

1
star
46

vscode-smart-delete

JavaScript
1
star
47

vue-list-rendered

a custom directive to check if last item in list was rendered
JavaScript
1
star
48

vue-bounty

https://github.com/coderitual/bounty port for vue
Vue
1
star
49

PreventBackHistoryMiddleware

Prevent Browser back button after Logout in Laravel 5.3
PHP
1
star
50

vscode-tabs-count-autowrap

TypeScript
1
star
51

vue-cordova-bb

Java
1
star
52

vscode-auto-surround

JavaScript
1
star
53

vscode-jump-to-last-cursor

JavaScript
1
star