Skip to content

Commit

Permalink
v3.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ctf0 committed Sep 30, 2019
1 parent 1535538 commit 685faad
Show file tree
Hide file tree
Showing 19 changed files with 255 additions and 187 deletions.
215 changes: 116 additions & 99 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,106 +202,123 @@
<br>

## Config
**config/mediaManager.php**

```php
return [
/*
* ignore files pattern
*/
'ignore_files' => '/^\..*/',

/*
* filesystem disk
*/
'storage_disk' => 'public',

/*
* manager controller
*/
'controller' => '\ctf0\MediaManager\Controllers\MediaController',

/*
* remove any file special chars except
*/
'allowed_fileNames_chars' => '.\_\-\'\s\(\)\,',

/*
* remove any folder special chars except (_ -)
*/
'allowed_folderNames_chars' => '\_\-',

/*
* disallow uploading files with the following mimetypes
* https://www.iana.org/assignments/media-types/media-types.xhtml
*/
'unallowed_mimes' => ['php', 'java'],

/*
* extra mime-types
*/
'extended_mimes' => [
'image' => [
'binary/octet-stream',
],
'archive' => [
'application/x-tar',
'application/zip',
- **config/mediaManager.php**

```php
return [
/*
* ignore files pattern
*/
'ignore_files' => '/^\..*/',

/*
* filesystem disk
*/
'storage_disk' => 'public',

/*
* manager controller
*/
'controller' => '\ctf0\MediaManager\Controllers\MediaController',

/*
* remove any file special chars except
*/
'allowed_fileNames_chars' => '.\_\-\'\s\(\)\,',

/*
* remove any folder special chars except (_ -)
*/
'allowed_folderNames_chars' => '\_\-',

/*
* disallow uploading files with the following mimetypes
* https://www.iana.org/assignments/media-types/media-types.xhtml
*/
'unallowed_mimes' => ['php', 'java'],

/*
* extra mime-types
*/
'extended_mimes' => [
'image' => [
'binary/octet-stream',
],
'archive' => [
'application/x-tar',
'application/zip',
],
],
],

/*
* when file names gets cleand up
*/
'sanitized_text' => 'uniqid',

/*
* display file last modification time as
* http://carbon.nesbot.com/docs/#api-formatting
*/
'last_modified_format' => 'toDateString',

/**
* hide file extension in files list
*/
'hide_files_ext' => true,

/*
* load image preview only when item is clicked ?
*/
'lazy_load_image_on_click' => false,

/*
* automatically invalidate cache after "in Minutes"
*/
'cache_expires_after' => 60,

/*
* in-order to get the folder items count & size
* we need to recursively get all the files inside the folders
* which could make the request take longer
*/
'get_folder_info' => true,

/**
* do you want to enable broadcasting the changes
* made by one user to others ?
*
* "laravel-echo" must be installed
*/
'enable_broadcasting' => false,

/**
* show "an itunes like" content ratio bar
*/
'show_ratio_bar' => true,

/*
* preview and remove files b4 uploading
*/
'preview_files_before_upload' => true,
];
```

/*
* when file names gets cleand up
*/
'sanitized_text' => 'uniqid',

/*
* display file last modification time as
* http://carbon.nesbot.com/docs/#api-formatting
*/
'last_modified_format' => 'toDateString',

/**
* hide file extension in files list
*/
'hide_files_ext' => true,

/*
* load image preview only when item is clicked ?
*/
'lazy_load_image_on_click' => false,

/*
* automatically invalidate cache after "in Minutes"
*/
'cache_expires_after' => 60,

/*
* in-order to get the folder items count & size
* we need to recursively get all the files inside the folders
* which could make the request take longer
*/
'get_folder_info' => true,

/**
* do you want to enable broadcasting the changes
* made by one user to others ?
*
* "laravel-echo" must be installed
*/
'enable_broadcasting' => false,

/**
* show "an itunes like" content ratio bar
*/
'show_ratio_bar' => true,

/*
* preview and remove files b4 uploading
*/
'preview_files_before_upload' => true,
];
```

- **config/database.php**

```php
'connections' => [
// ...

'mediamanager' => [
'driver' => 'mysql', // or whatever you want
'database' => env('DB_DATABASE'), // or database_path('MediaManager.sqlite')
'host' => env('DB_HOST'),
'port' => env('DB_PORT'),
'username' => env('DB_USERNAME'),
'password' => env('DB_PASSWORD'),
]
]
```

<br>

Expand Down
8 changes: 0 additions & 8 deletions logs/v3.4.0.txt

This file was deleted.

8 changes: 8 additions & 0 deletions logs/v3.4.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- some cleanup
- fix scroll by row after upload
- fix autoscroll to item not firing when the manager panel height changes
- fix mysql-db id issue
- fix missing vue prop for search panel
- check if name of the file being uploaded already exists & ignore it, this way we dont need to wait for the upload to finish just to get an error
- update uploadpreview for small screens
- fix img size in uploadpreview
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class CreateMediaManagerLockListTable extends Migration
public function up()
{
Schema::create('locked', function (Blueprint $table) {
$table->integer('id');
$table->bigIncrements('id');
$table->string('path');
});
}
Expand Down
24 changes: 15 additions & 9 deletions src/resources/assets/js/components/globalSearch/panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,30 @@
<div ref="search-input" :class="{'move': firstRun}" class="search-input">
<section>
<div class="input-wrapper">
<input v-autowidth
ref="search"
<input ref="search"
v-model="search"
v-autowidth
:placeholder="trans('find')"
autofocus>
</div>
<transition name="mm-info-in">
<div v-show="listCount" class="count">
<p class="title is-marginless is-2">{{ listCount }}</p>
<p class="heading is-marginless">{{ trans('found') }}</p>
<p class="title is-marginless is-2">
{{ listCount }}
</p>
<p class="heading is-marginless">
{{ trans('found') }}
</p>
</div>
</transition>
</section>
</div>

<transition-group name="mm-gs" tag="ul" class="columns is-multiline" mode="out-in">
<li v-list-rendered="[i, filterdList, orch]"
v-for="(item, i) in filterdList"
<li v-for="(item, i) in filterdList"
:key="`${i}-${item.name}`"
v-list-rendered="[i, filterdList, orch]"
class="column is-2">

<div class="card">
<div class="card-image">
<a v-if="fileTypeIs(item, 'image')" :href="item.path" target="_blank" class="image">
Expand Down Expand Up @@ -64,7 +67,9 @@

<!-- nothing found -->
<li v-if="noData" key="noData" class="column no-data">
<p class="title">{{ trans('nothing_found') }} !!</p>
<p class="title">
{{ trans('nothing_found') }} !!
</p>
</li>
</transition-group>
</div>
Expand Down Expand Up @@ -95,7 +100,8 @@ export default {
search: '',
noData: false,
linkCopied: false,
firstRun: false
firstRun: false,
showPanel: false
}
},
computed: {
Expand Down
6 changes: 2 additions & 4 deletions src/resources/assets/js/components/imageEditor/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,8 @@ export default {
imageSmoothingQuality: 'high'
}).toDataURL(type)
this.$nextTick(() => {
// reset the auto crop selection we made
this.clearSelection()
})
// reset the auto crop selection we made
this.$nextTick(this.clearSelection)
return url
},
Expand Down
4 changes: 1 addition & 3 deletions src/resources/assets/js/components/lazyLoading/cache.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,7 @@ export default {
watch: {
src(val) {
if (val) {
this.$nextTick(() => {
this.sendDimensionsToParent()
})
this.$nextTick(this.sendDimensionsToParent)
}
}
}
Expand Down
5 changes: 1 addition & 4 deletions src/resources/assets/js/components/lazyLoading/normal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ export default {
if (val) {
this.fetchImg().then((img) => {
this.src = img
this.$nextTick(() => {
this.sendDimensionsToParent()
})
this.$nextTick(this.sendDimensionsToParent)
})
}
}
Expand Down
Loading

0 comments on commit 685faad

Please sign in to comment.