Skip to content

Commit

Permalink
v3.1.3
Browse files Browse the repository at this point in the history
- remove audio notifs
- cleanup
- fix scrollbyrow after toggle info sidebar
  • Loading branch information
ctf0 committed Jul 1, 2018
1 parent 18025a3 commit 7d74883
Show file tree
Hide file tree
Showing 18 changed files with 71 additions and 82 deletions.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
- [install dependencies](https://github.com/ctf0/Laravel-Media-Manager/wiki/Packages-In-Use)

```bash
yarn add vue vue-ls vue-async-computed vue-tippy@v1 vue2-filters vue-notif vue-clipboard2 vue-awesome@v2 vue-touch@next idb-keyval axios dropzone cropperjs keycode date-fns lottie-web laravel-echo fuse.js
yarn add vue vue-ls vue-async-computed vue-tippy@v1 vue2-filters vue-notif vue-clipboard2 vue-awesome@v2 vue-touch@next idb-keyval axios dropzone cropperjs keycode date-fns lottie-web fuse.js
# or
npm install vue vue-ls vue-async-computed vue-tippy@v1 vue2-filters vue-notif vue-clipboard2 vue-awesome@v2 vue-touch@next idb-keyval axios dropzone cropperjs keycode date-fns lottie-web laravel-echo fuse.js --save
npm install vue vue-ls vue-async-computed vue-tippy@v1 vue2-filters vue-notif vue-clipboard2 vue-awesome@v2 vue-touch@next idb-keyval axios dropzone cropperjs keycode date-fns lottie-web fuse.js --save
```

- run `npm run watch` to compile your `js/css` files.
Expand Down Expand Up @@ -229,6 +229,8 @@ return [
/**
* do you want to enable broadcasting the changes
* made by one user to others ?
*
* "laravel-echo" must be installed
*/
'enable_broadcasting' => false
];
Expand All @@ -238,5 +240,22 @@ return [

## Usage

- visit `localhost:8000/media`
- [Wiki](https://github.com/ctf0/Laravel-Media-Manager/wiki)
**1-** make sure you have pre-initiated vue
```js
// app.js

window.Vue = require('vue');

new Vue({
el: '#app'
})
```

**2-** under `resources/views/vendor/MediaManager/media.blade.php` update the path to that js file
```html
<script src="{{ asset("path/to/app.js") }}"></script>
```

**3-** visit `localhost:8000/media`

### [Check The Wiki](https://github.com/ctf0/Laravel-Media-Manager/wiki)
18 changes: 0 additions & 18 deletions logs/v3.1.2.txt

This file was deleted.

3 changes: 3 additions & 0 deletions logs/v3.1.3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- remove audio notifs
- cleanup
- fix scrollbyrow after toggle info sidebar
9 changes: 4 additions & 5 deletions src/MediaManagerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ protected function extraConfigs()
$db = storage_path('logs/MediaManager.sqlite');

if ($this->file->exists($db)) {
config(['database.connections.mediamanager' => [
$this->app['config']->set('database.connections.mediamanager', [
'driver' => 'sqlite',
'database' => $db,
]]);
]);
}
}

Expand Down Expand Up @@ -108,9 +108,8 @@ protected function viewComp()

view()->composer('MediaManager::_manager', function ($view) use ($url, $patterns, $config) {
$view->with([
'base_url' => preg_replace('/\/+$/', '/', $url),
'patterns' => json_encode($patterns),
'mobile_alt_navigation' => array_get($config, 'mobile_alt_navigation'),
'base_url' => preg_replace('/\/+$/', '/', $url),
'patterns' => json_encode($patterns),
]);
});
}
Expand Down
2 changes: 2 additions & 0 deletions src/config/mediaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
/*
* do you want to enable broadcasting the changes
* made by one user to others ?
*
* "laravel-echo" must be installed
*/
'enable_broadcasting' => false,
];
Binary file removed src/dist/audio/alert.mp3
Binary file not shown.
Binary file removed src/dist/audio/success.mp3
Binary file not shown.
1 change: 0 additions & 1 deletion src/resources/assets/js/components/globalSearch/panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@

<script>
import debounce from 'lodash/debounce'
import Fuse from 'fuse.js'
export default {
data() {
Expand Down
1 change: 0 additions & 1 deletion src/resources/assets/js/components/media.vue
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ export default {
// check if image was edited
EventHub.listen('image-edited', (msg) => {
this.imageWasEdited = true
this.$refs['success-audio'].play()
this.removeCachedResponse().then(() => {
this.showNotif(`${this.trans('save_success')} "${msg}"`)
})
Expand Down
3 changes: 1 addition & 2 deletions src/resources/assets/js/manager.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* Libs */
window.Vue = require('vue')
window.EventHub = require('vuemit')
window.keycode = require('keycode')
window.Dropzone = require('dropzone')
window.Fuse = require('fuse.js')

Vue.use(require('vue2-filters'))
Vue.use(require('vue-clipboard2'))
Expand Down
1 change: 0 additions & 1 deletion src/resources/assets/js/modules/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default {
downloadFile(e.path)
})

this.$refs['success-audio'].play()
return this.showNotif('All Done')
}

Expand Down
3 changes: 0 additions & 3 deletions src/resources/assets/js/modules/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export default {
manager.showProgress = false

if (clearCache) {
manager.$refs['success-audio'].play()
manager.removeCachedResponse().then(() => {
last
? manager.getFiles(manager.folders, null, last)
Expand Down Expand Up @@ -444,7 +443,6 @@ export default {

if (clearCache) {
this.clearImageCache()
this.$refs['success-audio'].play()
this.removeCachedResponse(destination == '../' ? null : destination, cacheNamesList).then(() => {
if (this.allItemsCount) {
this.isBulkSelecting()
Expand Down Expand Up @@ -508,7 +506,6 @@ export default {
})

if (clearCache) {
this.$refs['success-audio'].play()
this.removeCachedResponse(null, cacheNamesList).then(() => {
this.isBulkSelecting()
? this.blkSlct()
Expand Down
2 changes: 0 additions & 2 deletions src/resources/assets/js/modules/lock.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ export default {
})

this.updateLockOps(data)

this.$refs['success-audio'].play()
this.resetInput(['currentFilterName'])
this.isBulkSelecting() ? this.blkSlct() : false
this.removeCachedResponse()
Expand Down
55 changes: 24 additions & 31 deletions src/resources/assets/js/modules/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ export default {
ajaxError() {
this.toggleInfo = false
this.toggleLoader('ajax_error', true)
this.$refs['alert-audio'].play()
EventHub.fire('ajax-error-show')
},

Expand Down Expand Up @@ -211,37 +210,31 @@ export default {
return arr.filter((e) => e)
},
showNotif(msg, s = 'success', duration = 3) {
if (msg) {
if (s == 'danger') {
this.$refs['alert-audio'].play()
}

let title

switch (s) {
case 'black':
case 'danger':
title = 'Error'
duration = null
break
case 'warning':
title = 'Warning'
break
case 'info':
title = 'Info'
duration = 5
break
default:
title = 'Success'
}

EventHub.fire('showNotif', {
title: title,
body: msg,
type: s,
duration: duration
})
let title

switch (s) {
case 'black':
case 'danger':
title = 'Error'
duration = null
break
case 'warning':
title = 'Warning'
break
case 'info':
title = 'Info'
duration = 5
break
default:
title = 'Success'
}

EventHub.fire('showNotif', {
title: title,
body: msg,
type: s,
duration: duration
})
}
}
}
1 change: 0 additions & 1 deletion src/resources/assets/js/modules/visibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export default {
}
})

this.$refs['success-audio'].play()
this.isBulkSelecting() ? this.blkSlct() : false
this.removeCachedResponse()

Expand Down
1 change: 1 addition & 0 deletions src/resources/assets/js/modules/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export default {
toggleInfo() {
if (!this.firstRun && this.currentFileIndex) {
this.$nextTick(debounce(() => {
this.scrollByRow()
this.scrollToSelected(this.getElementByIndex(this.currentFileIndex))
}, 500))
}
Expand Down
22 changes: 13 additions & 9 deletions src/resources/assets/sass/media.scss
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,10 @@
li {
display: flex;
flex: 1;
min-width: 244px;
max-width: 244px;
min-height: 95px;
max-height: 95px;
min-width: 250px;
max-width: 250px;
// min-height: 100px;
max-height: 100px;
}
}

Expand Down Expand Up @@ -414,17 +414,21 @@
}

.__box-img {
position: relative;
overflow: hidden;
width: 53px;
height: 51px;
width: 50px;
height: 50px;
border: 1px dashed darken($active_theme, 25%);
border-radius: 3px 3px 5px 5px;
border-radius: 4px;

img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: fill;
object-position: center;
// object-fit: fill;
// object-position: center;
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions src/resources/views/_manager.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@

<div class="" id="manager-container">

{{-- notif-audio --}}
<audio ref="alert-audio" src="{{ asset('assets/vendor/MediaManager/audio/alert.mp3') }}"></audio>
<audio ref="success-audio" src="{{ asset('assets/vendor/MediaManager/audio/success.mp3') }}"></audio>

{{-- global search --}}
<global-search-panel></global-search-panel>

Expand Down

0 comments on commit 7d74883

Please sign in to comment.