diff --git a/app/Form/Policies/FormPolicy.php b/app/Form/Policies/FormPolicy.php new file mode 100644 index 00000000..318e3c98 --- /dev/null +++ b/app/Form/Policies/FormPolicy.php @@ -0,0 +1,32 @@ + null, 'mail_bottom' => null, 'config' => null, + 'header_image' => null, + 'id' => null, ], 'section_default' => [ 'name' => '', diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 3416e0dd..53dc5dc6 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,6 +2,7 @@ namespace App\Providers; +use App\Form\Models\Form; use App\Mailgateway\Types\LocalType; use App\Mailgateway\Types\MailmanType; use Illuminate\Http\RedirectResponse; @@ -33,6 +34,8 @@ class AppServiceProvider extends ServiceProvider LocalType::class, MailmanType::class, ])); + + app()->extend('media-library-helpers', fn ($p) => $p->put('form', Form::class)); } /** diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index d5a193fb..707cd82f 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -2,6 +2,8 @@ namespace App\Providers; +use App\Form\Models\Form; +use App\Form\Policies\FormPolicy; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Laravel\Passport\Passport; @@ -10,10 +12,10 @@ class AuthServiceProvider extends ServiceProvider /** * The policy mappings for the application. * - * @var array + * @var array */ protected $policies = [ - // 'App\Model' => 'App\Policies\ModelPolicy', + Form::class => FormPolicy::class, ]; /** diff --git a/package-lock.json b/package-lock.json index 2a0fd749..917fd8f0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "wnumb": "^1.2.0" }, "devDependencies": { + "accounting": "^0.4.1", "autoprefixer": "^10.4.17", "axios": "^1.6.6", "dayjs": "^1.11.10", @@ -1083,6 +1084,12 @@ "node": ">=10.0.0" } }, + "node_modules/accounting": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/accounting/-/accounting-0.4.1.tgz", + "integrity": "sha512-RU6KY9Y5wllyaCNBo1W11ZOTnTHMMgOZkIwdOOs6W5ibMTp72i4xIbEA48djxVGqMNTUNbvrP/1nWg5Af5m2gQ==", + "dev": true + }, "node_modules/acorn": { "version": "8.11.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", diff --git a/package.json b/package.json index c89f541b..3d24e326 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "devDependencies": { "autoprefixer": "^10.4.17", "axios": "^1.6.6", + "accounting": "^0.4.1", "dayjs": "^1.11.10", "eslint": "^8.56.0", "eslint-config-prettier": "^8.10.0", diff --git a/packages/medialibrary-helper b/packages/medialibrary-helper index c4eb67c0..91e5cc3e 160000 --- a/packages/medialibrary-helper +++ b/packages/medialibrary-helper @@ -1 +1 @@ -Subproject commit c4eb67c09f8e310d20ebfdb330b70a265e45b1a4 +Subproject commit 91e5cc3e3b6d7d0a8a3e2361514ec8c1ce9cb655 diff --git a/resources/js/app.js b/resources/js/app.js index 8560aaa6..e9f6d317 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -50,6 +50,10 @@ createInertiaApp({ requireModules(import.meta.glob('./components/form/*.vue'), app, 'f'); requireModules(import.meta.glob('./components/ui/*.vue'), app, 'ui'); requireModules(import.meta.glob('./components/page/*.vue', {eager: true}), app, 'page'); + app.component( + 'f-singlefile', + defineAsyncComponent(() => import('!/medialibrary-helper/assets/components/SingleFile.vue')) + ); app.provide('axios', app.config.globalProperties.axios); app.mount(el); diff --git a/resources/js/views/form/Index.vue b/resources/js/views/form/Index.vue index aa635a6b..a8d80a48 100644 --- a/resources/js/views/form/Index.vue +++ b/resources/js/views/form/Index.vue @@ -35,7 +35,9 @@
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/ai.svg b/storage/app/public/filetypes/ai.svg new file mode 100644 index 00000000..8d6ebeac --- /dev/null +++ b/storage/app/public/filetypes/ai.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/applicationpdf.svg b/storage/app/public/filetypes/applicationpdf.svg new file mode 100644 index 00000000..758720b7 --- /dev/null +++ b/storage/app/public/filetypes/applicationpdf.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/audition.svg b/storage/app/public/filetypes/audition.svg new file mode 100644 index 00000000..9ae3d0ed --- /dev/null +++ b/storage/app/public/filetypes/audition.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/avi.svg b/storage/app/public/filetypes/avi.svg new file mode 100644 index 00000000..1ba046c0 --- /dev/null +++ b/storage/app/public/filetypes/avi.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/bridge.svg b/storage/app/public/filetypes/bridge.svg new file mode 100644 index 00000000..fc93337c --- /dev/null +++ b/storage/app/public/filetypes/bridge.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/css.svg b/storage/app/public/filetypes/css.svg new file mode 100644 index 00000000..5022204f --- /dev/null +++ b/storage/app/public/filetypes/css.svg @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/csv.svg b/storage/app/public/filetypes/csv.svg new file mode 100644 index 00000000..a8c88ec5 --- /dev/null +++ b/storage/app/public/filetypes/csv.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/dbf.svg b/storage/app/public/filetypes/dbf.svg new file mode 100644 index 00000000..114f3f9f --- /dev/null +++ b/storage/app/public/filetypes/dbf.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/doc.svg b/storage/app/public/filetypes/doc.svg new file mode 100644 index 00000000..9c86a02a --- /dev/null +++ b/storage/app/public/filetypes/doc.svg @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/dreamweaver.svg b/storage/app/public/filetypes/dreamweaver.svg new file mode 100644 index 00000000..e6af7e8a --- /dev/null +++ b/storage/app/public/filetypes/dreamweaver.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/dwg.svg b/storage/app/public/filetypes/dwg.svg new file mode 100644 index 00000000..90fbda07 --- /dev/null +++ b/storage/app/public/filetypes/dwg.svg @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/exe.svg b/storage/app/public/filetypes/exe.svg new file mode 100644 index 00000000..3a8eb586 --- /dev/null +++ b/storage/app/public/filetypes/exe.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/file.svg b/storage/app/public/filetypes/file.svg new file mode 100644 index 00000000..00a87be4 --- /dev/null +++ b/storage/app/public/filetypes/file.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/fireworks.svg b/storage/app/public/filetypes/fireworks.svg new file mode 100644 index 00000000..571709a1 --- /dev/null +++ b/storage/app/public/filetypes/fireworks.svg @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/fla.svg b/storage/app/public/filetypes/fla.svg new file mode 100644 index 00000000..3a0817f7 --- /dev/null +++ b/storage/app/public/filetypes/fla.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/flash.svg b/storage/app/public/filetypes/flash.svg new file mode 100644 index 00000000..ae3279c2 --- /dev/null +++ b/storage/app/public/filetypes/flash.svg @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/html.svg b/storage/app/public/filetypes/html.svg new file mode 100644 index 00000000..2ac17782 --- /dev/null +++ b/storage/app/public/filetypes/html.svg @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/illustrator.svg b/storage/app/public/filetypes/illustrator.svg new file mode 100644 index 00000000..ad94e31d --- /dev/null +++ b/storage/app/public/filetypes/illustrator.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/imagejpeg.svg b/storage/app/public/filetypes/imagejpeg.svg new file mode 100644 index 00000000..ae9c6d24 --- /dev/null +++ b/storage/app/public/filetypes/imagejpeg.svg @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/imagepng.svg b/storage/app/public/filetypes/imagepng.svg new file mode 100644 index 00000000..783eef51 --- /dev/null +++ b/storage/app/public/filetypes/imagepng.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/indesign.svg b/storage/app/public/filetypes/indesign.svg new file mode 100644 index 00000000..1a05e9a5 --- /dev/null +++ b/storage/app/public/filetypes/indesign.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/iso.svg b/storage/app/public/filetypes/iso.svg new file mode 100644 index 00000000..7cd21841 --- /dev/null +++ b/storage/app/public/filetypes/iso.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/javascript.svg b/storage/app/public/filetypes/javascript.svg new file mode 100644 index 00000000..23532cb6 --- /dev/null +++ b/storage/app/public/filetypes/javascript.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/json-file.svg b/storage/app/public/filetypes/json-file.svg new file mode 100644 index 00000000..17ae513e --- /dev/null +++ b/storage/app/public/filetypes/json-file.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/mp3.svg b/storage/app/public/filetypes/mp3.svg new file mode 100644 index 00000000..d6dd5938 --- /dev/null +++ b/storage/app/public/filetypes/mp3.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/mp4.svg b/storage/app/public/filetypes/mp4.svg new file mode 100644 index 00000000..40c1833b --- /dev/null +++ b/storage/app/public/filetypes/mp4.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/photoshop.svg b/storage/app/public/filetypes/photoshop.svg new file mode 100644 index 00000000..6d5f7083 --- /dev/null +++ b/storage/app/public/filetypes/photoshop.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/ppt.svg b/storage/app/public/filetypes/ppt.svg new file mode 100644 index 00000000..bf1ea300 --- /dev/null +++ b/storage/app/public/filetypes/ppt.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/prelude.svg b/storage/app/public/filetypes/prelude.svg new file mode 100644 index 00000000..c6637fc0 --- /dev/null +++ b/storage/app/public/filetypes/prelude.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/premiere.svg b/storage/app/public/filetypes/premiere.svg new file mode 100644 index 00000000..3bd1d897 --- /dev/null +++ b/storage/app/public/filetypes/premiere.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/psd.svg b/storage/app/public/filetypes/psd.svg new file mode 100644 index 00000000..e6cea70b --- /dev/null +++ b/storage/app/public/filetypes/psd.svg @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/rtf.svg b/storage/app/public/filetypes/rtf.svg new file mode 100644 index 00000000..c2c9b1aa --- /dev/null +++ b/storage/app/public/filetypes/rtf.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/search.svg b/storage/app/public/filetypes/search.svg new file mode 100644 index 00000000..1c76953c --- /dev/null +++ b/storage/app/public/filetypes/search.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/svg.svg b/storage/app/public/filetypes/svg.svg new file mode 100644 index 00000000..b1c31682 --- /dev/null +++ b/storage/app/public/filetypes/svg.svg @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/txt.svg b/storage/app/public/filetypes/txt.svg new file mode 100644 index 00000000..0e44cafe --- /dev/null +++ b/storage/app/public/filetypes/txt.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/xls.svg b/storage/app/public/filetypes/xls.svg new file mode 100644 index 00000000..eadee3cc --- /dev/null +++ b/storage/app/public/filetypes/xls.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/xml.svg b/storage/app/public/filetypes/xml.svg new file mode 100644 index 00000000..7c8bd71e --- /dev/null +++ b/storage/app/public/filetypes/xml.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/zip-1.svg b/storage/app/public/filetypes/zip-1.svg new file mode 100644 index 00000000..dd3f3482 --- /dev/null +++ b/storage/app/public/filetypes/zip-1.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/storage/app/public/filetypes/zip.svg b/storage/app/public/filetypes/zip.svg new file mode 100644 index 00000000..c4c09379 --- /dev/null +++ b/storage/app/public/filetypes/zip.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tailwind.config.js b/tailwind.config.js index ed9d9fbc..be362ab5 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,7 +1,14 @@ const {colors} = require('tailwindcss/defaultTheme'); module.exports = { - content: ['resources/js/views/**/*.vue', 'resources/js/components/**/*.vue', 'resources/js/layouts/**/*.vue', 'resources/views/**/*.blade.php', 'resources/js/composables/**/*.js'], + content: [ + 'resources/js/views/**/*.vue', + 'resources/js/components/**/*.vue', + 'resources/js/layouts/**/*.vue', + 'resources/views/**/*.blade.php', + 'resources/js/composables/**/*.js', + 'packages/medialibrary-helper/**/*.vue', + ], theme: { extend: { colors: {