Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit c96e640

Browse files
committed
v3.2.7
1 parent a5c3512 commit c96e640

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2340
-1217
lines changed

README.md

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
![Browser Status](https://badges.herokuapp.com/browsers?firefox=61&microsoftedge=17&googlechrome=51&safari=!?&iexplore=!?)
66

77
<p align="center">
8-
<img src="https://user-images.githubusercontent.com/7388088/45594529-90318000-b99c-11e8-9fce-07e3576ae0df.png">
9-
<img src="https://user-images.githubusercontent.com/7388088/45594564-6dec3200-b99d-11e8-8827-d9ba5337d46a.png">
8+
<img alt="main" src="https://user-images.githubusercontent.com/7388088/46004312-dda3a080-c0b2-11e8-92b4-294757b88653.jpg"/>
9+
<img alt="card" src="https://user-images.githubusercontent.com/7388088/46004310-dd0b0a00-c0b2-11e8-8f7a-12352e15f01b.jpg"/>
10+
<img alt="filter" src="https://user-images.githubusercontent.com/7388088/46004313-dda3a080-c0b2-11e8-814a-af5b3953846f.jpg"/>
11+
<img alt="diff" src="https://user-images.githubusercontent.com/7388088/46004311-dd0b0a00-c0b2-11e8-82f1-d6c75235690f.jpg"/>
1012
</p>
1113

1214
- to optimize uploaded files on the fly try [spatie](https://github.com/spatie/laravel-image-optimizer)
@@ -36,9 +38,9 @@
3638
- [install dependencies](https://github.com/ctf0/Laravel-Media-Manager/wiki/Packages-In-Use)
3739

3840
```bash
39-
yarn add vue vue-ls vue-async-computed vue-tippy@v1 vue2-filters vue-input-autowidth vue-notif vue-clipboard2 vue-awesome@v2 vue-touch@next idb-keyval axios dropzone cropperjs keycode date-fns lottie-web plyr fuse.js
41+
yarn add vue vue-ls vue-async-computed vue-list-rendered vue-image-compare2 vue-tippy@v1 vue2-filters vue-input-autowidth vue-notif vue-clipboard2 vue-awesome@v2 vue-touch@next idb-keyval axios dropzone cropperjs keycode date-fns lottie-web plyr fuse.js
4042
# or
41-
npm install vue vue-ls vue-async-computed vue-tippy@v1 vue2-filters vue-input-autowidth vue-notif vue-clipboard2 vue-awesome@v2 vue-touch@next idb-keyval axios dropzone cropperjs keycode date-fns lottie-web plyr fuse.js --save
43+
npm install vue vue-ls vue-async-computed vue-list-rendered vue-image-compare2 vue-tippy@v1 vue2-filters vue-input-autowidth vue-notif vue-clipboard2 vue-awesome@v2 vue-touch@next idb-keyval axios dropzone cropperjs keycode date-fns lottie-web plyr fuse.js --save
4244
```
4345

4446
- add this one liner to your main js file and run `npm run watch` to compile your `js/css` files.
@@ -115,47 +117,50 @@
115117

116118
>- the info sidebar is only available on big screens **"> 1087px"**.
117119
>- if no more **rows** available, pressing `down` will go to the last item in the list **"same as native finder"**.
118-
>- dbl click/tap any `audio/video` file on small screen, will open it in the preview card same as images **"because sidebar will be disabled"**.
120+
>- dbl click/tap
121+
> + any file type `audio/video` when sidebar is hidden, will open it in the preview card same as images.
122+
> + any file type `application/archive` will download it.
119123
>- to stop interfering with other `keydown` events you can toggle the manager listener through `EventHub.fire('disable-global-keys', true/false)`.
120-
>- when using [`__stack-files-reverse`](https://github.com/ctf0/Laravel-Media-Manager/wiki/Customization-&--Optimization#customization), the **left/right** gestures are also reversed.
121-
>- when previewing an item, you can use any of the navigation keys `left/up/right/down/home/end`
124+
>- all the **left/right** gestures have their counterparts available as well.
125+
>- while previewing an item, you can use any of the navigation keys `left/up/right/down/home/end` & `swipe left/right/up/down`.
126+
>- 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"**.
122127
123128
<br>
124129

125-
| navigation | button | keyboard | click / tap | touch |
126-
|-----------------------|---------------------------------------------|------------------|---------------------------|---------------------------------|
127-
| | toggle upload panel *(toolbar)* | u | * | |
128-
| | refresh *(toolbar)* | r | * / hold *(clear cache)* | pinch in *(items container)* |
129-
| | move *(toolbar)* | m | * | |
130-
| | image editor *(toolbar)* | e | * | |
131-
| | delete *(toolbar)* | d / del | * | |
132-
| | lock/unlock *(toolbar)* | l | * / hold *(folders only)* | |
133-
| | change visibility *(toolbar)* | v | * | |
134-
| | toggle bulk selection *(toolbar)* | b | * | |
135-
| | (reset) bulk select all *(toolbar)* | a | * | |
136-
| | toggle sidebar *(path bar)* | t | * | swipe left/right *(sidebar)* |
137-
| | confirm *(modal)* | enter | * | |
138-
| | toggle preview image/pdf/text *(item)* | space | ** | |
139-
| | play/pause media *(item)* | space | ** | |
140-
| | hide (modal / upload-panel / global-search) | esc | | |
141-
| | reset (search / bulk selection / filter) | esc | | |
142-
| | &nbsp; | | | |
143-
| | move *(item)* | | | swipe up |
144-
| | delete *(item)* | | | swipe down |
145-
| | rename *(item)* | | | swipe left |
146-
| | image editor *(item)* | | | hold |
147-
| | limit bulk select *(item)* | shift + click | | |
148-
| | current + next bulk select *(item)* | alt/meta + click | | |
149-
| | create new folder | | ** *(items container)* | |
150-
| | &nbsp; | | | |
151-
| select next *(item)* | | right | * | swipe left *(preview)* |
152-
| select prev *(item)* | | left | * | swipe right *(preview)* |
153-
| select first *(item)* | | home | | |
154-
| select last *(item)* | | end | | |
155-
| select next *(row)* | | down | | |
156-
| select prev *(row)* | | up | | |
157-
| open folder | | enter | ** | |
158-
| go to prev dir | folderName *(path bar)* | backspace | * | swipe right *(items container)* |
130+
| navigation | button | keyboard | click / tap | touch |
131+
|----------------------|---------------------------------------------|------------------|------------------------------|---------------------------------|
132+
| | toggle upload panel *(toolbar)* | u | | |
133+
| | refresh *(toolbar)* | r | hold *(clear cache)* | pinch in *(items container)* |
134+
| | move *(toolbar)* | m | | |
135+
| | image editor *(toolbar)* | e | | |
136+
| | delete *(toolbar)* | d / del | | |
137+
| | lock/unlock *(toolbar)* | l | hold *(anything but images)* | |
138+
| | change visibility *(toolbar)* | v | | |
139+
| | toggle bulk selection *(toolbar)* | b | | |
140+
| | (reset) bulk select all *(toolbar)* | a | | |
141+
| | toggle sidebar *(path bar)* | t | * | swipe left/right *(sidebar)* |
142+
| | confirm *(modal)* | enter | | |
143+
| | toggle preview image/pdf/text *(item)* | space | ** | |
144+
| | play/pause media *(item)* | space | ** | |
145+
| | hide (modal / upload-panel / global-search) | esc | | |
146+
| | reset (search / bulk selection / filter) | esc | | |
147+
| | &nbsp; | | | |
148+
| | move *(item)* | | | swipe up |
149+
| | delete *(item)* | | | swipe down |
150+
| | rename *(item)* | | | swipe left |
151+
| | image editor *(item)* | | hold | |
152+
| | limit bulk select *(item)* | shift + click | | |
153+
| | current + next bulk select *(item)* | alt/meta + click | | |
154+
| | create new folder | | ** *(items container)* | |
155+
| | &nbsp; | | | |
156+
| go to next *(item)* | | right | * | swipe left *(preview)* |
157+
| go to prev *(item)* | | left | * | swipe right *(preview)* |
158+
| go to first *(item)* | | home | | |
159+
| go to last *(item)* | | end | | |
160+
| go to next *(row)* | | down | | swipe up *(preview)* |
161+
| go to prev *(row)* | | up | | swipe down *(preview)* |
162+
| open folder | | enter | ** | |
163+
| go to prev *(dir)* | folderName *(path bar)* | backspace | * | swipe right *(items container)* |
159164

160165
- events
161166

@@ -203,9 +208,9 @@ return [
203208
'controller' => '\ctf0\MediaManager\Controllers\MediaController',
204209

205210
/*
206-
* remove any file special chars except (. _ -)
211+
* remove any file special chars except
207212
*/
208-
'allowed_fileNames_chars' => '.\_\-',
213+
'allowed_fileNames_chars' => '.\_\-\'\s\(\)\,',
209214

210215
/*
211216
* remove any folder special chars except (_ -)
@@ -214,7 +219,7 @@ return [
214219

215220
/*
216221
* disallow uploading files with the following mimetypes
217-
* https://www.iana.org/assignments/media-types/media-types.xhtml#text
222+
* https://www.iana.org/assignments/media-types/media-types.xhtml
218223
*/
219224
'unallowed_mimes' => ['php', 'java'],
220225

logs/v3.2.6.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

logs/v3.2.7.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
- cleanups/fixes & some UIs here and there
2+
- better performance “still need a way to orchestrate components animation”
3+
- more options to the default file char allowed
4+
- add more gestures “check rdme”
5+
- add support to show the image editor diff with support for “zoom & drag”
6+
- new npm dep “vue-image-compare vue-list-rendered”
7+
- changed filters +/- to range slider instead & a reset btn per filter
8+
- image editor will now have some ui even while processing

src/Controllers/Modules/Upload.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ public function uploadEditedImage(Request $request)
105105
if ($this->allowUpload()) {
106106
$type = $request->mime_type;
107107
$path = $request->path;
108-
$data = explode(',', $request->data)[1];
109108
$original = $request->name;
109+
$data = explode(',', $request->data)[1];
110+
110111
$name_only = pathinfo($original, PATHINFO_FILENAME) . '_' . $this->getRandomString();
111112
$ext_only = pathinfo($original, PATHINFO_EXTENSION);
112113
$file_name = "$name_only.$ext_only";

src/Controllers/Modules/Utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ protected function cleanName($text, $folder = false)
2626

2727
protected function filePattern($item)
2828
{
29-
return '/(script.*?\/script)|[^(' . $item . ')a-zA-Z0-9]|\(|\)+/ius';
29+
return '/(script.*?\/script)|[^(' . $item . ')a-zA-Z0-9]+/ius';
3030
}
3131

3232
/**

src/config/mediaManager.php

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@
1919
'controller' => '\ctf0\MediaManager\Controllers\MediaController',
2020

2121
/*
22-
* remove any file special chars except (. _ -)
22+
* remove any file special chars except
23+
* dot .
24+
* dash -
25+
* underscore _
26+
* single quote ''
27+
* white space
28+
* parentheses ()
29+
* comma ,
2330
*/
24-
'allowed_fileNames_chars' => '.\_\-',
31+
'allowed_fileNames_chars' => '.\_\-\'\s\(\)\,',
2532

2633
/*
2734
* remove any folder special chars except (_ -)
@@ -32,7 +39,7 @@
3239

3340
/*
3441
* disallow uploading files with the following mimetypes
35-
* https://www.iana.org/assignments/media-types/media-types.xhtml#text
42+
* https://www.iana.org/assignments/media-types/media-types.xhtml
3643
*/
3744
'unallowed_mimes' => ['php', 'java'],
3845

src/resources/assets/js/components/globalSearch/lazyLoading.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default {
2222
immediate: true,
2323
handler(val, oldVal) {
2424
if (val) {
25-
this.fetchImg(this.file.path).then((img) => {
25+
this.fetchImg().then((img) => {
2626
this.src = img
2727
})
2828
}

src/resources/assets/js/components/globalSearch/panel.vue

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
</div>
2222

2323
<transition-group name="mm-gs" tag="ul" class="columns is-multiline" mode="out-in">
24-
<li v-for="(item, i) in filterdList" :key="`${i}-${item.name}`" class="column is-2">
24+
<li v-list-rendered="[i, filterdList, orch]"
25+
v-for="(item, i) in filterdList"
26+
:key="`${i}-${item.name}`"
27+
class="column is-2">
28+
2529
<div class="card">
2630
<div class="card-image">
2731
<a v-if="fileTypeIs(item, 'image')" :href="item.path" target="_blank" class="image">
@@ -104,10 +108,12 @@ export default {
104108
return this.filterdList.length
105109
}
106110
},
107-
beforeDestroy() {
108-
this.$refs['search-input'].removeEventListener('transitionend', this.ontransitionend)
109-
},
110111
methods: {
112+
orch() {
113+
setTimeout(() => {
114+
EventHub.fire('start-img-observing')
115+
}, 100)
116+
},
111117
eventsListener() {
112118
EventHub.listen('global-search-index', (data) => {
113119
this.filesIndex = data
@@ -176,8 +182,10 @@ export default {
176182
}
177183
},
178184
firstRun(val) {
179-
if (!val && this.$refs['search-input']) {
180-
this.$refs['search-input'].addEventListener('transitionend', this.ontransitionend)
185+
if (!val) {
186+
if (this.$refs['search-input']) this.$refs['search-input'].addEventListener('transitionend', this.ontransitionend)
187+
} else {
188+
this.$refs['search-input'].removeEventListener('transitionend', this.ontransitionend)
181189
}
182190
}
183191
}

0 commit comments

Comments
 (0)