Skip to content

Commit ee3e87b

Browse files
authored
Merge pull request #5 from stepanenko3/upload_files_fixes_and_updates
Upload files, updates and fixes
2 parents 7dfaeec + 876eee1 commit ee3e87b

36 files changed

+2087
-3005
lines changed

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
"license": "MIT",
1010
"require": {
1111
"php": ">=7.1.0",
12-
"laravel/nova": "^4.0"
12+
"laravel/nova": "^4.0",
13+
"stepanenko3/laravel-helpers": "*"
1314
},
1415
"repositories": [
1516
{
1617
"type": "path",
17-
"url": "../nova"
18+
"url": "../../snotax/vendor/laravel/nova"
1819
}
1920
],
2021
"autoload": {

config/nova-filemanager.php

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
| This is the storage disk FileManager will use to put file uploads, you can use
1212
| any of the disks defined in your config/filesystems.php file. Default to public.
1313
*/
14-
'disk' => env('FILEMANAGER_DISK', 'public'),
14+
'disk' => env('FILEMANAGER_DISK', 'public'),
1515

1616
/*
1717
|--------------------------------------------------------------------------
@@ -20,7 +20,7 @@
2020
| This will set the default order of the files and folders.
2121
| You can use mime, name or size. Default to mime
2222
*/
23-
'order' => env('FILEMANAGER_ORDER', 'mime'),
23+
'order' => env('FILEMANAGER_ORDER', 'mime'),
2424

2525
/*
2626
|--------------------------------------------------------------------------
@@ -39,7 +39,7 @@
3939
| info. This is useful when s3 is being used or when needs to read a lot of files.
4040
| Cache is set by file, not by folder. Default to false.
4141
*/
42-
'cache' => env('FILEMANAGER_CACHE', false),
42+
'cache' => env('FILEMANAGER_CACHE', false),
4343

4444
/*
4545
|--------------------------------------------------------------------------
@@ -48,21 +48,21 @@
4848
| This will hide or show filemanager buttons. You can enable o disable buttons
4949
| as your own needs. True means visible. False hidden.
5050
*/
51-
'buttons' => [
51+
'buttons' => [
5252

5353
// Menu
54-
'create_folder' => true,
55-
'upload_button' => true,
54+
'create_folder' => true,
55+
'upload_button' => true,
5656
'select_multiple' => true,
5757

5858
// Folders
59-
'rename_folder' => true,
60-
'delete_folder' => true,
59+
'rename_folder' => true,
60+
'delete_folder' => true,
6161

6262
// Files
63-
'rename_file' => true,
64-
'delete_file' => true,
65-
'download_file' => true,
63+
'rename_file' => true,
64+
'delete_file' => true,
65+
'download_file' => true,
6666

6767
],
6868

@@ -74,18 +74,16 @@
7474
| You can create|modify|delete as you want.
7575
*/
7676

77-
'filters' => [
77+
'filters' => [
78+
'Images' => ['jpg', 'jpeg', 'png', 'gif', 'svg', 'bmp', 'tiff'],
7879

79-
'Images' => ['jpg', 'jpeg', 'png', 'gif', 'svg', 'bmp', 'tiff'],
80+
'Documents' => ['json', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pps', 'pptx', 'odt', 'rtf', 'md', 'txt', 'css'],
8081

81-
'Documents' => ['pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pps', 'pptx', 'odt', 'rtf', 'md', 'txt', 'css'],
82+
'Videos' => ['mp4', 'avi', 'mov', 'mkv', 'wmv', 'flv', '3gp', 'h264'],
8283

83-
'Videos' => ['mp4', 'avi', 'mov', 'mkv', 'wmv', 'flv', '3gp', 'h264'],
84-
85-
'Audios' => ['mp3', 'ogg', 'wav', 'wma', 'midi'],
84+
'Audios' => ['mp3', 'ogg', 'wav', 'wma', 'midi'],
8685

8786
'Compressed' => ['zip', 'rar', 'tar', 'gz', '7z', 'pkg'],
88-
8987
],
9088

9189
/*
@@ -96,16 +94,16 @@
9694
| of the keys used in filters in lowercase. If you have a key called Documents,
9795
| use 'documents' as your default filter. Default to false
9896
*/
99-
'filter' => false,
97+
'filter' => false,
10098

10199
/*
102100
|--------------------------------------------------------------------------
103101
| Naming strategy
104102
|--------------------------------------------------------------------------
105103
| Resolve the upload file name with a class that extends
106-
| Stepanenko3\NovaFilemanager\Http\Services\AbstractNamingStrategy
104+
| Stepanenko3\NovaFilemanager\Services\AbstractNamingStrategy
107105
*/
108-
'naming' => Stepanenko3\NovaFilemanager\Http\Services\DefaultNamingStrategy::class,
106+
'naming' => Stepanenko3\NovaFilemanager\Services\DefaultNamingStrategy::class,
109107

110108
/*
111109
|--------------------------------------------------------------------------
@@ -115,7 +113,7 @@
115113
| of the keys used in filters in lowercase. If you have a key called Documents,
116114
| use 'documents' as your default filter.
117115
*/
118-
'jobs' => [],
116+
'jobs' => [],
119117

120118
'iconSize' => 48,
121119
];

dist/js/field.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/field.js.LICENSE.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@
55
* @license MIT
66
*/
77

8-
/*!
9-
* The buffer module from node.js, for the browser.
10-
*
11-
* @author Feross Aboukhadijeh <http://feross.org>
12-
* @license MIT
13-
*/
14-
158
/*!
169
* URI.js - Mutating URLs
1710
*
@@ -61,7 +54,7 @@
6154

6255
/*! https://mths.be/punycode v1.4.0 by @mathias */
6356

64-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
57+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
6558

6659
/**
6760
* @license

dist/js/tool.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/tool.js.LICENSE.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848

4949
/*! https://mths.be/punycode v1.4.0 by @mathias */
5050

51+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
52+
5153
/**
5254
* @license
5355
* Lodash <https://lodash.com/>

resources/js/components/Manager.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,21 @@
1616
</svg>
1717
</OutlineButton>
1818

19-
<label
20-
v-if="buttons.upload_button"
21-
class="mr-2"
22-
>
23-
<DefaultButton>
19+
<template v-if="buttons.upload_button">
20+
<DefaultButton
21+
class="mr-2"
22+
@click="$refs.uploadFileInput.click()"
23+
>
2424
{{ __('Upload') }}
2525
</DefaultButton>
2626
<input
27+
ref="uploadFileInput"
2728
type="file"
2829
class="hidden"
2930
multiple="true"
3031
@change="uploadFilesByButton"
3132
/>
32-
</label>
33+
</template>
3334

3435
<DefaultButton
3536
v-if="buttons.create_folder"

resources/js/components/TreeView.vue

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

0 commit comments

Comments
 (0)