mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
paginator refactoring and implementation into the routes
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
APP_NAME=Laravel
|
APP_NAME=Laravel
|
||||||
APP_ENV=local
|
APP_ENV=local
|
||||||
APP_KEY=base64:qBL7kIM+I1U3jdkTiAelfVgVOLT3hfu0iOr8bUz2k1I=
|
APP_KEY=base64:Shf3vEB/Up0FKetshDU3OwCZuv01XG8fb/3k26qHxqg=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_URL=http://localhost
|
APP_URL=http://localhost
|
||||||
APP_DEMO=false
|
APP_DEMO=false
|
||||||
@@ -40,3 +40,6 @@ S3_DEFAULT_REGION=us-east-1
|
|||||||
S3_BUCKET=
|
S3_BUCKET=
|
||||||
|
|
||||||
SANCTUM_STATEFUL_DOMAINS=localhost,127.0.0.1,127.0.0.1:8000,::1
|
SANCTUM_STATEFUL_DOMAINS=localhost,127.0.0.1,127.0.0.1:8000,::1
|
||||||
|
|
||||||
|
|
||||||
|
DB_MYSQLDUMP_PATH="/usr/bin"
|
||||||
199
composer.lock
generated
199
composer.lock
generated
@@ -280,16 +280,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "aws/aws-sdk-php",
|
"name": "aws/aws-sdk-php",
|
||||||
"version": "3.222.7",
|
"version": "3.222.18",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||||
"reference": "03d35eef5c509798d2c08587cfd9a7c33afe2260"
|
"reference": "223ca25ed10b4d4a3b1e986795b5aa86f3c04466"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/03d35eef5c509798d2c08587cfd9a7c33afe2260",
|
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/223ca25ed10b4d4a3b1e986795b5aa86f3c04466",
|
||||||
"reference": "03d35eef5c509798d2c08587cfd9a7c33afe2260",
|
"reference": "223ca25ed10b4d4a3b1e986795b5aa86f3c04466",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -365,9 +365,9 @@
|
|||||||
"support": {
|
"support": {
|
||||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.222.7"
|
"source": "https://github.com/aws/aws-sdk-php/tree/3.222.18"
|
||||||
},
|
},
|
||||||
"time": "2022-05-06T18:16:59+00:00"
|
"time": "2022-05-23T18:16:59+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "bacon/bacon-qr-code",
|
"name": "bacon/bacon-qr-code",
|
||||||
@@ -1314,16 +1314,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/cache",
|
"name": "doctrine/cache",
|
||||||
"version": "2.1.1",
|
"version": "2.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/doctrine/cache.git",
|
"url": "https://github.com/doctrine/cache.git",
|
||||||
"reference": "331b4d5dbaeab3827976273e9356b3b453c300ce"
|
"reference": "1ca8f21980e770095a31456042471a57bc4c68fb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/doctrine/cache/zipball/331b4d5dbaeab3827976273e9356b3b453c300ce",
|
"url": "https://api.github.com/repos/doctrine/cache/zipball/1ca8f21980e770095a31456042471a57bc4c68fb",
|
||||||
"reference": "331b4d5dbaeab3827976273e9356b3b453c300ce",
|
"reference": "1ca8f21980e770095a31456042471a57bc4c68fb",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -1333,18 +1333,12 @@
|
|||||||
"doctrine/common": ">2.2,<2.4"
|
"doctrine/common": ">2.2,<2.4"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"alcaeus/mongo-php-adapter": "^1.1",
|
|
||||||
"cache/integration-tests": "dev-master",
|
"cache/integration-tests": "dev-master",
|
||||||
"doctrine/coding-standard": "^8.0",
|
"doctrine/coding-standard": "^9",
|
||||||
"mongodb/mongodb": "^1.1",
|
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
|
||||||
"phpunit/phpunit": "^7.0 || ^8.0 || ^9.0",
|
|
||||||
"predis/predis": "~1.0",
|
|
||||||
"psr/cache": "^1.0 || ^2.0 || ^3.0",
|
"psr/cache": "^1.0 || ^2.0 || ^3.0",
|
||||||
"symfony/cache": "^4.4 || ^5.2 || ^6.0@dev",
|
"symfony/cache": "^4.4 || ^5.4 || ^6",
|
||||||
"symfony/var-exporter": "^4.4 || ^5.2 || ^6.0@dev"
|
"symfony/var-exporter": "^4.4 || ^5.4 || ^6"
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver"
|
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -1393,7 +1387,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/doctrine/cache/issues",
|
"issues": "https://github.com/doctrine/cache/issues",
|
||||||
"source": "https://github.com/doctrine/cache/tree/2.1.1"
|
"source": "https://github.com/doctrine/cache/tree/2.2.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -1409,7 +1403,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-07-17T14:49:29+00:00"
|
"time": "2022-05-20T20:07:39+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/dbal",
|
"name": "doctrine/dbal",
|
||||||
@@ -2962,16 +2956,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "intervention/image",
|
"name": "intervention/image",
|
||||||
"version": "2.7.1",
|
"version": "2.7.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Intervention/image.git",
|
"url": "https://github.com/Intervention/image.git",
|
||||||
"reference": "744ebba495319501b873a4e48787759c72e3fb8c"
|
"reference": "04be355f8d6734c826045d02a1079ad658322dad"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Intervention/image/zipball/744ebba495319501b873a4e48787759c72e3fb8c",
|
"url": "https://api.github.com/repos/Intervention/image/zipball/04be355f8d6734c826045d02a1079ad658322dad",
|
||||||
"reference": "744ebba495319501b873a4e48787759c72e3fb8c",
|
"reference": "04be355f8d6734c826045d02a1079ad658322dad",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3014,8 +3008,8 @@
|
|||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Oliver Vogel",
|
"name": "Oliver Vogel",
|
||||||
"email": "oliver@olivervogel.com",
|
"email": "oliver@intervention.io",
|
||||||
"homepage": "http://olivervogel.com/"
|
"homepage": "https://intervention.io/"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Image handling and manipulation library with support for Laravel integration",
|
"description": "Image handling and manipulation library with support for Laravel integration",
|
||||||
@@ -3030,11 +3024,11 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/Intervention/image/issues",
|
"issues": "https://github.com/Intervention/image/issues",
|
||||||
"source": "https://github.com/Intervention/image/tree/2.7.1"
|
"source": "https://github.com/Intervention/image/tree/2.7.2"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"url": "https://www.paypal.me/interventionphp",
|
"url": "https://paypal.me/interventionio",
|
||||||
"type": "custom"
|
"type": "custom"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -3042,7 +3036,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-12-16T16:49:26+00:00"
|
"time": "2022-05-21T17:30:32+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "jaybizzle/crawler-detect",
|
"name": "jaybizzle/crawler-detect",
|
||||||
@@ -3227,16 +3221,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/fortify",
|
"name": "laravel/fortify",
|
||||||
"version": "v1.12.0",
|
"version": "v1.13.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/fortify.git",
|
"url": "https://github.com/laravel/fortify.git",
|
||||||
"reference": "a6caadc80e348755de0e1da221a6253d9f2c48f9"
|
"reference": "0b8e7a860f0aa4868846555f5d095d7b546ffb9c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/fortify/zipball/a6caadc80e348755de0e1da221a6253d9f2c48f9",
|
"url": "https://api.github.com/repos/laravel/fortify/zipball/0b8e7a860f0aa4868846555f5d095d7b546ffb9c",
|
||||||
"reference": "a6caadc80e348755de0e1da221a6253d9f2c48f9",
|
"reference": "0b8e7a860f0aa4868846555f5d095d7b546ffb9c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3286,20 +3280,20 @@
|
|||||||
"issues": "https://github.com/laravel/fortify/issues",
|
"issues": "https://github.com/laravel/fortify/issues",
|
||||||
"source": "https://github.com/laravel/fortify"
|
"source": "https://github.com/laravel/fortify"
|
||||||
},
|
},
|
||||||
"time": "2022-03-29T14:37:05+00:00"
|
"time": "2022-05-05T14:52:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v9.11.0",
|
"version": "v9.13.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/framework.git",
|
"url": "https://github.com/laravel/framework.git",
|
||||||
"reference": "598a8c84d452a66b90a3213b1d67189cc726c728"
|
"reference": "87b6cc8bc41d1cf85c7c1401cddde8570a3b95bb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/framework/zipball/598a8c84d452a66b90a3213b1d67189cc726c728",
|
"url": "https://api.github.com/repos/laravel/framework/zipball/87b6cc8bc41d1cf85c7c1401cddde8570a3b95bb",
|
||||||
"reference": "598a8c84d452a66b90a3213b1d67189cc726c728",
|
"reference": "87b6cc8bc41d1cf85c7c1401cddde8570a3b95bb",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3465,7 +3459,7 @@
|
|||||||
"issues": "https://github.com/laravel/framework/issues",
|
"issues": "https://github.com/laravel/framework/issues",
|
||||||
"source": "https://github.com/laravel/framework"
|
"source": "https://github.com/laravel/framework"
|
||||||
},
|
},
|
||||||
"time": "2022-05-03T14:47:20+00:00"
|
"time": "2022-05-17T14:07:43+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/sanctum",
|
"name": "laravel/sanctum",
|
||||||
@@ -3606,16 +3600,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/serializable-closure",
|
"name": "laravel/serializable-closure",
|
||||||
"version": "v1.1.1",
|
"version": "v1.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/serializable-closure.git",
|
"url": "https://github.com/laravel/serializable-closure.git",
|
||||||
"reference": "9e4b005daa20b0c161f3845040046dc9ddc1d74e"
|
"reference": "09f0e9fb61829f628205b7c94906c28740ff9540"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/9e4b005daa20b0c161f3845040046dc9ddc1d74e",
|
"url": "https://api.github.com/repos/laravel/serializable-closure/zipball/09f0e9fb61829f628205b7c94906c28740ff9540",
|
||||||
"reference": "9e4b005daa20b0c161f3845040046dc9ddc1d74e",
|
"reference": "09f0e9fb61829f628205b7c94906c28740ff9540",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3661,7 +3655,7 @@
|
|||||||
"issues": "https://github.com/laravel/serializable-closure/issues",
|
"issues": "https://github.com/laravel/serializable-closure/issues",
|
||||||
"source": "https://github.com/laravel/serializable-closure"
|
"source": "https://github.com/laravel/serializable-closure"
|
||||||
},
|
},
|
||||||
"time": "2022-02-11T19:23:53+00:00"
|
"time": "2022-05-16T17:09:47+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/socialite",
|
"name": "laravel/socialite",
|
||||||
@@ -3863,16 +3857,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/commonmark",
|
"name": "league/commonmark",
|
||||||
"version": "2.3.0",
|
"version": "2.3.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/commonmark.git",
|
"url": "https://github.com/thephpleague/commonmark.git",
|
||||||
"reference": "32a49eb2b38fe5e5c417ab748a45d0beaab97955"
|
"reference": "cb36fee279f7fca01d5d9399ddd1b37e48e2eca1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/32a49eb2b38fe5e5c417ab748a45d0beaab97955",
|
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/cb36fee279f7fca01d5d9399ddd1b37e48e2eca1",
|
||||||
"reference": "32a49eb2b38fe5e5c417ab748a45d0beaab97955",
|
"reference": "cb36fee279f7fca01d5d9399ddd1b37e48e2eca1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3965,7 +3959,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-04-07T22:37:05+00:00"
|
"time": "2022-05-14T15:37:39+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/config",
|
"name": "league/config",
|
||||||
@@ -4434,29 +4428,31 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "maennchen/zipstream-php",
|
"name": "maennchen/zipstream-php",
|
||||||
"version": "2.1.0",
|
"version": "2.2.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/maennchen/ZipStream-PHP.git",
|
"url": "https://github.com/maennchen/ZipStream-PHP.git",
|
||||||
"reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58"
|
"reference": "211e9ba1530ea5260b45d90c9ea252f56ec52729"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58",
|
"url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/211e9ba1530ea5260b45d90c9ea252f56ec52729",
|
||||||
"reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58",
|
"reference": "211e9ba1530ea5260b45d90c9ea252f56ec52729",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"myclabs/php-enum": "^1.5",
|
"myclabs/php-enum": "^1.5",
|
||||||
"php": ">= 7.1",
|
"php": "^7.4 || ^8.0",
|
||||||
"psr/http-message": "^1.0",
|
"psr/http-message": "^1.0",
|
||||||
"symfony/polyfill-mbstring": "^1.0"
|
"symfony/polyfill-mbstring": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-zip": "*",
|
"ext-zip": "*",
|
||||||
"guzzlehttp/guzzle": ">= 6.3",
|
"guzzlehttp/guzzle": "^6.5.3 || ^7.2.0",
|
||||||
"mikey179/vfsstream": "^1.6",
|
"mikey179/vfsstream": "^1.6",
|
||||||
"phpunit/phpunit": ">= 7.5"
|
"php-coveralls/php-coveralls": "^2.4",
|
||||||
|
"phpunit/phpunit": "^8.5.8 || ^9.4.2",
|
||||||
|
"vimeo/psalm": "^4.1"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -4493,7 +4489,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
|
"issues": "https://github.com/maennchen/ZipStream-PHP/issues",
|
||||||
"source": "https://github.com/maennchen/ZipStream-PHP/tree/master"
|
"source": "https://github.com/maennchen/ZipStream-PHP/tree/2.2.1"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -4501,7 +4497,7 @@
|
|||||||
"type": "open_collective"
|
"type": "open_collective"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-30T13:11:16+00:00"
|
"time": "2022-05-18T15:52:06+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "makingcg/subscription",
|
"name": "makingcg/subscription",
|
||||||
@@ -4770,16 +4766,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
"version": "2.5.0",
|
"version": "2.6.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Seldaek/monolog.git",
|
"url": "https://github.com/Seldaek/monolog.git",
|
||||||
"reference": "4192345e260f1d51b365536199744b987e160edc"
|
"reference": "247918972acd74356b0a91dfaa5adcaec069b6c0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/4192345e260f1d51b365536199744b987e160edc",
|
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/247918972acd74356b0a91dfaa5adcaec069b6c0",
|
||||||
"reference": "4192345e260f1d51b365536199744b987e160edc",
|
"reference": "247918972acd74356b0a91dfaa5adcaec069b6c0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -4792,18 +4788,23 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
|
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
|
||||||
"doctrine/couchdb": "~1.0@dev",
|
"doctrine/couchdb": "~1.0@dev",
|
||||||
"elasticsearch/elasticsearch": "^7",
|
"elasticsearch/elasticsearch": "^7 || ^8",
|
||||||
|
"ext-json": "*",
|
||||||
"graylog2/gelf-php": "^1.4.2",
|
"graylog2/gelf-php": "^1.4.2",
|
||||||
|
"guzzlehttp/guzzle": "^7.4",
|
||||||
|
"guzzlehttp/psr7": "^2.2",
|
||||||
"mongodb/mongodb": "^1.8",
|
"mongodb/mongodb": "^1.8",
|
||||||
"php-amqplib/php-amqplib": "~2.4 || ^3",
|
"php-amqplib/php-amqplib": "~2.4 || ^3",
|
||||||
"php-console/php-console": "^3.1.3",
|
"php-console/php-console": "^3.1.3",
|
||||||
"phpspec/prophecy": "^1.6.1",
|
"phpspec/prophecy": "^1.15",
|
||||||
"phpstan/phpstan": "^0.12.91",
|
"phpstan/phpstan": "^0.12.91",
|
||||||
"phpunit/phpunit": "^8.5",
|
"phpunit/phpunit": "^8.5.14",
|
||||||
"predis/predis": "^1.1",
|
"predis/predis": "^1.1",
|
||||||
"rollbar/rollbar": "^1.3 || ^2 || ^3",
|
"rollbar/rollbar": "^1.3 || ^2 || ^3",
|
||||||
"ruflin/elastica": ">=0.90@dev",
|
"ruflin/elastica": "^7",
|
||||||
"swiftmailer/swiftmailer": "^5.3|^6.0"
|
"swiftmailer/swiftmailer": "^5.3|^6.0",
|
||||||
|
"symfony/mailer": "^5.4 || ^6",
|
||||||
|
"symfony/mime": "^5.4 || ^6"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
|
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
|
||||||
@@ -4853,7 +4854,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/Seldaek/monolog/issues",
|
"issues": "https://github.com/Seldaek/monolog/issues",
|
||||||
"source": "https://github.com/Seldaek/monolog/tree/2.5.0"
|
"source": "https://github.com/Seldaek/monolog/tree/2.6.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -4865,7 +4866,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-04-08T15:43:54+00:00"
|
"time": "2022-05-10T09:36:00+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mtdowling/jmespath.php",
|
"name": "mtdowling/jmespath.php",
|
||||||
@@ -9532,16 +9533,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/laravel-queueable-action",
|
"name": "spatie/laravel-queueable-action",
|
||||||
"version": "2.14.1",
|
"version": "2.14.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/spatie/laravel-queueable-action.git",
|
"url": "https://github.com/spatie/laravel-queueable-action.git",
|
||||||
"reference": "ce25c279ec0add73c35eae7fd7f1d8fb4da26072"
|
"reference": "574264fb36fed52d29a1a83dbe2a0a8860cf298b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/spatie/laravel-queueable-action/zipball/ce25c279ec0add73c35eae7fd7f1d8fb4da26072",
|
"url": "https://api.github.com/repos/spatie/laravel-queueable-action/zipball/574264fb36fed52d29a1a83dbe2a0a8860cf298b",
|
||||||
"reference": "ce25c279ec0add73c35eae7fd7f1d8fb4da26072",
|
"reference": "574264fb36fed52d29a1a83dbe2a0a8860cf298b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -9604,7 +9605,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/spatie/laravel-queueable-action/issues",
|
"issues": "https://github.com/spatie/laravel-queueable-action/issues",
|
||||||
"source": "https://github.com/spatie/laravel-queueable-action/tree/2.14.1"
|
"source": "https://github.com/spatie/laravel-queueable-action/tree/2.14.2"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -9612,7 +9613,7 @@
|
|||||||
"type": "custom"
|
"type": "custom"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-02-09T07:57:23+00:00"
|
"time": "2022-05-11T12:54:36+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/laravel-signal-aware-command",
|
"name": "spatie/laravel-signal-aware-command",
|
||||||
@@ -13683,16 +13684,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "composer/spdx-licenses",
|
"name": "composer/spdx-licenses",
|
||||||
"version": "1.5.6",
|
"version": "1.5.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/composer/spdx-licenses.git",
|
"url": "https://github.com/composer/spdx-licenses.git",
|
||||||
"reference": "a30d487169d799745ca7280bc90fdfa693536901"
|
"reference": "c848241796da2abf65837d51dce1fae55a960149"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/composer/spdx-licenses/zipball/a30d487169d799745ca7280bc90fdfa693536901",
|
"url": "https://api.github.com/repos/composer/spdx-licenses/zipball/c848241796da2abf65837d51dce1fae55a960149",
|
||||||
"reference": "a30d487169d799745ca7280bc90fdfa693536901",
|
"reference": "c848241796da2abf65837d51dce1fae55a960149",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -13743,7 +13744,7 @@
|
|||||||
"support": {
|
"support": {
|
||||||
"irc": "irc://irc.freenode.org/composer",
|
"irc": "irc://irc.freenode.org/composer",
|
||||||
"issues": "https://github.com/composer/spdx-licenses/issues",
|
"issues": "https://github.com/composer/spdx-licenses/issues",
|
||||||
"source": "https://github.com/composer/spdx-licenses/tree/1.5.6"
|
"source": "https://github.com/composer/spdx-licenses/tree/1.5.7"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -13759,7 +13760,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-11-18T10:14:14+00:00"
|
"time": "2022-05-23T07:37:50+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fakerphp/faker",
|
"name": "fakerphp/faker",
|
||||||
@@ -14517,16 +14518,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/flare-client-php",
|
"name": "spatie/flare-client-php",
|
||||||
"version": "1.1.0",
|
"version": "1.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/spatie/flare-client-php.git",
|
"url": "https://github.com/spatie/flare-client-php.git",
|
||||||
"reference": "ceab058852a1278d9f57a7b95f1c348e4956d866"
|
"reference": "86a380f5b1ce839af04a08f1c8f2697184cdf23f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/spatie/flare-client-php/zipball/ceab058852a1278d9f57a7b95f1c348e4956d866",
|
"url": "https://api.github.com/repos/spatie/flare-client-php/zipball/86a380f5b1ce839af04a08f1c8f2697184cdf23f",
|
||||||
"reference": "ceab058852a1278d9f57a7b95f1c348e4956d866",
|
"reference": "86a380f5b1ce839af04a08f1c8f2697184cdf23f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -14547,6 +14548,11 @@
|
|||||||
"spatie/phpunit-snapshot-assertions": "^4.0"
|
"spatie/phpunit-snapshot-assertions": "^4.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "1.1.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"files": [
|
"files": [
|
||||||
"src/helpers.php"
|
"src/helpers.php"
|
||||||
@@ -14569,7 +14575,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/spatie/flare-client-php/issues",
|
"issues": "https://github.com/spatie/flare-client-php/issues",
|
||||||
"source": "https://github.com/spatie/flare-client-php/tree/1.1.0"
|
"source": "https://github.com/spatie/flare-client-php/tree/1.2.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -14577,20 +14583,20 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-03-11T13:21:28+00:00"
|
"time": "2022-05-16T12:13:39+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/ignition",
|
"name": "spatie/ignition",
|
||||||
"version": "1.2.9",
|
"version": "1.3.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/spatie/ignition.git",
|
"url": "https://github.com/spatie/ignition.git",
|
||||||
"reference": "db25202fab2d5c14613b8914a1bb374998bbf870"
|
"reference": "997363fbcce809b1e55f571997d49017f9c623d9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/spatie/ignition/zipball/db25202fab2d5c14613b8914a1bb374998bbf870",
|
"url": "https://api.github.com/repos/spatie/ignition/zipball/997363fbcce809b1e55f571997d49017f9c623d9",
|
||||||
"reference": "db25202fab2d5c14613b8914a1bb374998bbf870",
|
"reference": "997363fbcce809b1e55f571997d49017f9c623d9",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -14611,6 +14617,11 @@
|
|||||||
"symfony/process": "^5.4|^6.0"
|
"symfony/process": "^5.4|^6.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "1.2.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Spatie\\Ignition\\": "src"
|
"Spatie\\Ignition\\": "src"
|
||||||
@@ -14647,7 +14658,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2022-04-23T20:37:21+00:00"
|
"time": "2022-05-16T13:16:07+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "spatie/laravel-ignition",
|
"name": "spatie/laravel-ignition",
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ return [
|
|||||||
|
|
||||||
'from' => [
|
'from' => [
|
||||||
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
|
||||||
'name' => env('MAIL_FROM_NAME', 'Example'),
|
'name' => env('MAIL_FROM_NAME', 'Example'),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@@ -178,7 +178,7 @@ return [
|
|||||||
[
|
[
|
||||||
'name' => env('APP_NAME', 'vuefilemanager-backup'),
|
'name' => env('APP_NAME', 'vuefilemanager-backup'),
|
||||||
'disks' => [
|
'disks' => [
|
||||||
env('FILESYSTEM_DISK', 'local')
|
env('FILESYSTEM_DISK', 'local'),
|
||||||
],
|
],
|
||||||
'health_checks' => [
|
'health_checks' => [
|
||||||
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => 1,
|
\Spatie\Backup\Tasks\Monitor\HealthChecks\MaximumAgeInDays::class => 1,
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ return [
|
|||||||
],
|
],
|
||||||
|
|
||||||
'paginate' => [
|
'paginate' => [
|
||||||
'perPage' => 8,
|
'perPage' => env('PAGINATE_RECORDS_PER_PAGE', 25),
|
||||||
],
|
],
|
||||||
|
|
||||||
// The update versions which need to run upgrade process
|
// The update versions which need to run upgrade process
|
||||||
|
|||||||
177
package-lock.json
generated
177
package-lock.json
generated
@@ -1231,9 +1231,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@stripe/stripe-js": {
|
"@stripe/stripe-js": {
|
||||||
"version": "1.26.0",
|
"version": "1.29.0",
|
||||||
"resolved": "https://registry.npmjs.org/@stripe/stripe-js/-/stripe-js-1.26.0.tgz",
|
"resolved": "https://registry.npmjs.org/@stripe/stripe-js/-/stripe-js-1.29.0.tgz",
|
||||||
"integrity": "sha512-4R1vC75yKaCVFARW3bhelf9+dKt4NP4iZY/sIjGK7AAMBVvZ47eG74NvsAIUdUnhOXSWFMjdFWqv+etk5BDW4g=="
|
"integrity": "sha512-OsUxk0VLlum8E2d6onlEdKuQcvLMs7qTrOXCnl/BGV3fAm65qr6h3e1IZ5AX4lgUlPRrzRcddSOA5DvkKKYLvg=="
|
||||||
},
|
},
|
||||||
"@trysound/sax": {
|
"@trysound/sax": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
@@ -2088,13 +2088,13 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"autoprefixer": {
|
"autoprefixer": {
|
||||||
"version": "10.4.4",
|
"version": "10.4.7",
|
||||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.4.tgz",
|
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.7.tgz",
|
||||||
"integrity": "sha512-Tm8JxsB286VweiZ5F0anmbyGiNI3v3wGv3mz9W+cxEDYB/6jbnj6GM9H9mK3wIL8ftgl+C07Lcwb8PG5PCCPzA==",
|
"integrity": "sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"browserslist": "^4.20.2",
|
"browserslist": "^4.20.3",
|
||||||
"caniuse-lite": "^1.0.30001317",
|
"caniuse-lite": "^1.0.30001335",
|
||||||
"fraction.js": "^4.2.0",
|
"fraction.js": "^4.2.0",
|
||||||
"normalize-range": "^0.1.2",
|
"normalize-range": "^0.1.2",
|
||||||
"picocolors": "^1.0.0",
|
"picocolors": "^1.0.0",
|
||||||
@@ -2102,34 +2102,34 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
"version": "4.20.2",
|
"version": "4.20.3",
|
||||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz",
|
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.3.tgz",
|
||||||
"integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==",
|
"integrity": "sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"caniuse-lite": "^1.0.30001317",
|
"caniuse-lite": "^1.0.30001332",
|
||||||
"electron-to-chromium": "^1.4.84",
|
"electron-to-chromium": "^1.4.118",
|
||||||
"escalade": "^3.1.1",
|
"escalade": "^3.1.1",
|
||||||
"node-releases": "^2.0.2",
|
"node-releases": "^2.0.3",
|
||||||
"picocolors": "^1.0.0"
|
"picocolors": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"caniuse-lite": {
|
"caniuse-lite": {
|
||||||
"version": "1.0.30001322",
|
"version": "1.0.30001342",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001322.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001342.tgz",
|
||||||
"integrity": "sha512-neRmrmIrCGuMnxGSoh+x7zYtQFFgnSY2jaomjU56sCkTA6JINqQrxutF459JpWcWRajvoyn95sOXq4Pqrnyjew==",
|
"integrity": "sha512-bn6sOCu7L7jcbBbyNhLg0qzXdJ/PMbybZTH/BA6Roet9wxYRm6Tr9D0s0uhLkOZ6MSG+QU6txUgdpr3MXIVqjA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"electron-to-chromium": {
|
"electron-to-chromium": {
|
||||||
"version": "1.4.101",
|
"version": "1.4.137",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.101.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.137.tgz",
|
||||||
"integrity": "sha512-XJH+XmJjACx1S7ASl/b//KePcda5ocPnFH2jErztXcIS8LpP0SE6rX8ZxiY5/RaDPnaF1rj0fPaHfppzb0e2Aw==",
|
"integrity": "sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node-releases": {
|
"node-releases": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.4.tgz",
|
||||||
"integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==",
|
"integrity": "sha512-gbMzqQtTtDz/00jQzZ21PQzdI9PyLYqUSvD0p3naOhX4odFji0ZxYdnVwPTxmSwkmxhcFImpozceidSG+AgoPQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4794,9 +4794,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"immutable": {
|
"immutable": {
|
||||||
"version": "4.0.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz",
|
||||||
"integrity": "sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw==",
|
"integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"import-fresh": {
|
"import-fresh": {
|
||||||
@@ -5285,9 +5285,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"laravel-echo": {
|
"laravel-echo": {
|
||||||
"version": "1.11.4",
|
"version": "1.11.7",
|
||||||
"resolved": "https://registry.npmjs.org/laravel-echo/-/laravel-echo-1.11.4.tgz",
|
"resolved": "https://registry.npmjs.org/laravel-echo/-/laravel-echo-1.11.7.tgz",
|
||||||
"integrity": "sha512-zoWMT7Cb3QVYEq+gyZ/hQvE3sSIiFxZH6c2Wg6tAwg9hukwyOLbDLpy9XT5U1mIC0lK+HFLzetnbfCtrl00jEg==",
|
"integrity": "sha512-LhEZp/RbdtdMlhptJyn452+aXfz+A1UW2bhJM7NROgXhnNgj+6P9BkG9JcPCBMernp5TGkOGI6A0NPbkAWYWGg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"laravel-mix": {
|
"laravel-mix": {
|
||||||
@@ -6013,9 +6013,9 @@
|
|||||||
"integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
|
"integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
|
||||||
},
|
},
|
||||||
"nanoid": {
|
"nanoid": {
|
||||||
"version": "3.3.2",
|
"version": "3.3.4",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
|
||||||
"integrity": "sha512-CuHBogktKwpm5g2sRgv83jEy2ijFzBwMoYA60orPDR7ynsLijJDqgsi4RDGj3OJpy3Ieb+LYwiRmIOGyytgITA==",
|
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"negotiator": {
|
"negotiator": {
|
||||||
@@ -6292,9 +6292,9 @@
|
|||||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
||||||
},
|
},
|
||||||
"object-hash": {
|
"object-hash": {
|
||||||
"version": "2.2.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
|
||||||
"integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==",
|
"integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"object-is": {
|
"object-is": {
|
||||||
@@ -6690,12 +6690,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"postcss": {
|
"postcss": {
|
||||||
"version": "8.4.12",
|
"version": "8.4.14",
|
||||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.12.tgz",
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
|
||||||
"integrity": "sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg==",
|
"integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"nanoid": "^3.3.1",
|
"nanoid": "^3.3.4",
|
||||||
"picocolors": "^1.0.0",
|
"picocolors": "^1.0.0",
|
||||||
"source-map-js": "^1.0.2"
|
"source-map-js": "^1.0.2"
|
||||||
}
|
}
|
||||||
@@ -7080,9 +7080,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"prettier-plugin-tailwindcss": {
|
"prettier-plugin-tailwindcss": {
|
||||||
"version": "0.1.8",
|
"version": "0.1.11",
|
||||||
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.1.11.tgz",
|
||||||
"integrity": "sha512-hwarSBCswAXa+kqYtaAkFr3Vop9o04WOyZs0qo3NyvW8L7f1rif61wRyq0+ArmVThOuRBcJF5hjGXYk86cwemg==",
|
"integrity": "sha512-a28+1jvpIZQdZ/W97wOXb6VqI762MKE/TxMMuibMEHhyYsSxQA8Ek30KObd5kJI2HF1ldtSYprFayXJXi3pz8Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"pretty-time": {
|
"pretty-time": {
|
||||||
@@ -7619,9 +7619,9 @@
|
|||||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||||
},
|
},
|
||||||
"sass": {
|
"sass": {
|
||||||
"version": "1.49.11",
|
"version": "1.52.1",
|
||||||
"resolved": "https://registry.npmjs.org/sass/-/sass-1.49.11.tgz",
|
"resolved": "https://registry.npmjs.org/sass/-/sass-1.52.1.tgz",
|
||||||
"integrity": "sha512-wvS/geXgHUGs6A/4ud5BFIWKO1nKd7wYIGimDk4q4GFkJicILActpv9ueMT4eRGSsp1BdKHuw1WwAHXbhsJELQ==",
|
"integrity": "sha512-fSzYTbr7z8oQnVJ3Acp9hV80dM1fkMN7mSD/25mpcct9F7FPBMOI8krEYALgU1aZoqGhQNhTPsuSmxjnIvAm4Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"chokidar": ">=3.0.0 <4.0.0",
|
"chokidar": ">=3.0.0 <4.0.0",
|
||||||
@@ -8230,62 +8230,34 @@
|
|||||||
"integrity": "sha512-X324n9OtpTmOMqEgDUEA/RgLrNfBF/jwJdctaPZDzB3mppxJk7TLIDmOreEDm1Bq4R9LSPu4Epf8VSdovNU+iA=="
|
"integrity": "sha512-X324n9OtpTmOMqEgDUEA/RgLrNfBF/jwJdctaPZDzB3mppxJk7TLIDmOreEDm1Bq4R9LSPu4Epf8VSdovNU+iA=="
|
||||||
},
|
},
|
||||||
"tailwindcss": {
|
"tailwindcss": {
|
||||||
"version": "3.0.23",
|
"version": "3.0.24",
|
||||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.0.23.tgz",
|
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.0.24.tgz",
|
||||||
"integrity": "sha512-+OZOV9ubyQ6oI2BXEhzw4HrqvgcARY38xv3zKcjnWtMIZstEsXdI9xftd1iB7+RbOnj2HOEzkA0OyB5BaSxPQA==",
|
"integrity": "sha512-H3uMmZNWzG6aqmg9q07ZIRNIawoiEcNFKDfL+YzOPuPsXuDXxJxB9icqzLgdzKNwjG3SAro2h9SYav8ewXNgig==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"arg": "^5.0.1",
|
"arg": "^5.0.1",
|
||||||
"chalk": "^4.1.2",
|
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"color-name": "^1.1.4",
|
"color-name": "^1.1.4",
|
||||||
"cosmiconfig": "^7.0.1",
|
|
||||||
"detective": "^5.2.0",
|
"detective": "^5.2.0",
|
||||||
"didyoumean": "^1.2.2",
|
"didyoumean": "^1.2.2",
|
||||||
"dlv": "^1.1.3",
|
"dlv": "^1.1.3",
|
||||||
"fast-glob": "^3.2.11",
|
"fast-glob": "^3.2.11",
|
||||||
"glob-parent": "^6.0.2",
|
"glob-parent": "^6.0.2",
|
||||||
"is-glob": "^4.0.3",
|
"is-glob": "^4.0.3",
|
||||||
|
"lilconfig": "^2.0.5",
|
||||||
"normalize-path": "^3.0.0",
|
"normalize-path": "^3.0.0",
|
||||||
"object-hash": "^2.2.0",
|
"object-hash": "^3.0.0",
|
||||||
"postcss": "^8.4.6",
|
"picocolors": "^1.0.0",
|
||||||
|
"postcss": "^8.4.12",
|
||||||
"postcss-js": "^4.0.0",
|
"postcss-js": "^4.0.0",
|
||||||
"postcss-load-config": "^3.1.0",
|
"postcss-load-config": "^3.1.4",
|
||||||
"postcss-nested": "5.0.6",
|
"postcss-nested": "5.0.6",
|
||||||
"postcss-selector-parser": "^6.0.9",
|
"postcss-selector-parser": "^6.0.10",
|
||||||
"postcss-value-parser": "^4.2.0",
|
"postcss-value-parser": "^4.2.0",
|
||||||
"quick-lru": "^5.1.1",
|
"quick-lru": "^5.1.1",
|
||||||
"resolve": "^1.22.0"
|
"resolve": "^1.22.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-styles": {
|
|
||||||
"version": "4.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
|
||||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"color-convert": "^2.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"chalk": {
|
|
||||||
"version": "4.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"ansi-styles": "^4.1.0",
|
|
||||||
"supports-color": "^7.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"color-convert": {
|
|
||||||
"version": "2.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
|
||||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"color-name": "~1.1.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"color-name": {
|
"color-name": {
|
||||||
"version": "1.1.4",
|
"version": "1.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||||
@@ -8301,19 +8273,30 @@
|
|||||||
"is-glob": "^4.0.3"
|
"is-glob": "^4.0.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"has-flag": {
|
"lilconfig": {
|
||||||
"version": "4.0.0",
|
"version": "2.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.5.tgz",
|
||||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
"integrity": "sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"supports-color": {
|
"postcss-load-config": {
|
||||||
"version": "7.2.0",
|
"version": "3.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.4.tgz",
|
||||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
"integrity": "sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"has-flag": "^4.0.0"
|
"lilconfig": "^2.0.5",
|
||||||
|
"yaml": "^1.10.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"postcss-selector-parser": {
|
||||||
|
"version": "6.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.10.tgz",
|
||||||
|
"integrity": "sha512-IQ7TZdoaqbT+LCpShg46jnZVlhWD2w6iQYAcYXfHARZ7X1t/UGhhceQDs5X0cGqKvYlHNOuv7Oa1xmb0oQuA3w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"cssesc": "^3.0.0",
|
||||||
|
"util-deprecate": "^1.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8630,9 +8613,9 @@
|
|||||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
|
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
|
||||||
},
|
},
|
||||||
"v-click-outside": {
|
"v-click-outside": {
|
||||||
"version": "3.1.2",
|
"version": "3.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/v-click-outside/-/v-click-outside-3.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/v-click-outside/-/v-click-outside-3.2.0.tgz",
|
||||||
"integrity": "sha512-gMdRqfRE6m6XU6SiFi3dyBlFB2MWogiXpof8Aa3LQysrl9pzTndqp/iEaAphLoadaQUFnQ0ec6fLLaxr7LiY6A=="
|
"integrity": "sha512-QD0bDy38SHJXQBjgnllmkI/rbdiwmq9RC+/+pvrFjYJKTn8dtp7Penf9q1lLBta280fYG2q53mgLhQ+3l3z74w=="
|
||||||
},
|
},
|
||||||
"validate-npm-package-license": {
|
"validate-npm-package-license": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
@@ -8728,9 +8711,9 @@
|
|||||||
"integrity": "sha512-W+y2EAI/BxS4Vlcca9scQv8ifeBFck56DRtSwWJ2H4Cw1GLNUYxiZxUHHkuzuI5JPW/cYtL1bPO5xPyEXx4LmQ=="
|
"integrity": "sha512-W+y2EAI/BxS4Vlcca9scQv8ifeBFck56DRtSwWJ2H4Cw1GLNUYxiZxUHHkuzuI5JPW/cYtL1bPO5xPyEXx4LmQ=="
|
||||||
},
|
},
|
||||||
"vue-router": {
|
"vue-router": {
|
||||||
"version": "3.5.3",
|
"version": "3.5.4",
|
||||||
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.3.tgz",
|
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.4.tgz",
|
||||||
"integrity": "sha512-FUlILrW3DGitS2h+Xaw8aRNvGTwtuaxrRkNSHWTizOfLUie7wuYwezeZ50iflRn8YPV5kxmU2LQuu3nM/b3Zsg=="
|
"integrity": "sha512-x+/DLAJZv2mcQ7glH2oV9ze8uPwcI+H+GgTgTmb5I55bCgY3+vXWIsqbYUzbBSZnwFHEJku4eoaH/x98veyymQ=="
|
||||||
},
|
},
|
||||||
"vue-style-loader": {
|
"vue-style-loader": {
|
||||||
"version": "4.1.3",
|
"version": "4.1.3",
|
||||||
|
|||||||
10
package.json
10
package.json
@@ -10,18 +10,18 @@
|
|||||||
"production": "mix --production"
|
"production": "mix --production"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer": "^10.4.4",
|
"autoprefixer": "^10.4.7",
|
||||||
"axios": "^0.21.4",
|
"axios": "^0.21.4",
|
||||||
"cross-env": "^5.1",
|
"cross-env": "^5.1",
|
||||||
"laravel-echo": "^1.11.4",
|
"laravel-echo": "^1.11.7",
|
||||||
"laravel-mix": "^6.0.43",
|
"laravel-mix": "^6.0.43",
|
||||||
"postcss": "^8.4.12",
|
"postcss": "^8.4.14",
|
||||||
"prettier": "^2.6.2",
|
"prettier": "^2.6.2",
|
||||||
"prettier-plugin-import-sort": "0.0.7",
|
"prettier-plugin-import-sort": "0.0.7",
|
||||||
"prettier-plugin-tailwindcss": "^0.1.8",
|
"prettier-plugin-tailwindcss": "^0.1.11",
|
||||||
"pusher-js": "^7.0.6",
|
"pusher-js": "^7.0.6",
|
||||||
"resolve-url-loader": "^2.3.1",
|
"resolve-url-loader": "^2.3.1",
|
||||||
"sass": "^1.49.11",
|
"sass": "^1.52.1",
|
||||||
"sass-loader": "^8.0.2",
|
"sass-loader": "^8.0.2",
|
||||||
"tailwindcss": "^3.0.24",
|
"tailwindcss": "^3.0.24",
|
||||||
"tailwindcss-debug-screens": "^2.2.1",
|
"tailwindcss-debug-screens": "^2.2.1",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"/js/main.js": "/js/main.js",
|
"/js/main.js": "/js/main.js",
|
||||||
"/chunks/request.js": "/chunks/request.js?id=2bbfd08f4a543123",
|
"/chunks/request.js": "/chunks/request.js?id=ecd05e0b97d63986",
|
||||||
"/chunks/request-upload.js": "/chunks/request-upload.js?id=1201e261c848a844",
|
"/chunks/request-upload.js": "/chunks/request-upload.js?id=e1d93f2b44272ed8",
|
||||||
"/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=19a0784e59d768ec",
|
"/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=19a0784e59d768ec",
|
||||||
"/chunks/status-check.js": "/chunks/status-check.js?id=a5ba5fb895af7040",
|
"/chunks/status-check.js": "/chunks/status-check.js?id=a5ba5fb895af7040",
|
||||||
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=ba76b9a8adbfdc0b",
|
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=ba76b9a8adbfdc0b",
|
||||||
@@ -9,13 +9,13 @@
|
|||||||
"/chunks/environment.js": "/chunks/environment.js?id=e4fdb87ff173d48a",
|
"/chunks/environment.js": "/chunks/environment.js?id=e4fdb87ff173d48a",
|
||||||
"/chunks/app-setup.js": "/chunks/app-setup.js?id=cbe7bfed06400736",
|
"/chunks/app-setup.js": "/chunks/app-setup.js?id=cbe7bfed06400736",
|
||||||
"/chunks/admin-account.js": "/chunks/admin-account.js?id=78d257775f5fc485",
|
"/chunks/admin-account.js": "/chunks/admin-account.js?id=78d257775f5fc485",
|
||||||
"/chunks/shared.js": "/chunks/shared.js?id=2fd6e7e80c7a6090",
|
"/chunks/shared.js": "/chunks/shared.js?id=0e270aee87fb16d0",
|
||||||
"/chunks/shared/browser.js": "/chunks/shared/browser.js?id=ebf193e6828917dc",
|
"/chunks/shared/browser.js": "/chunks/shared/browser.js?id=f7d5f3af37210b3f",
|
||||||
"/chunks/shared/single-file.js": "/chunks/shared/single-file.js?id=f03ab6659c6c1e9b",
|
"/chunks/shared/single-file.js": "/chunks/shared/single-file.js?id=f03ab6659c6c1e9b",
|
||||||
"/chunks/shared/authenticate.js": "/chunks/shared/authenticate.js?id=cd743a710a7dd6b4",
|
"/chunks/shared/authenticate.js": "/chunks/shared/authenticate.js?id=cd743a710a7dd6b4",
|
||||||
"/chunks/not-found.js": "/chunks/not-found.js?id=d31bd699138cf828",
|
"/chunks/not-found.js": "/chunks/not-found.js?id=d31bd699138cf828",
|
||||||
"/chunks/temporary-unavailable.js": "/chunks/temporary-unavailable.js?id=26798085f527d955",
|
"/chunks/temporary-unavailable.js": "/chunks/temporary-unavailable.js?id=26798085f527d955",
|
||||||
"/chunks/admin.js": "/chunks/admin.js?id=8efc9b42ff0654d9",
|
"/chunks/admin.js": "/chunks/admin.js?id=7517a25b81c4a59b",
|
||||||
"/chunks/dashboard.js": "/chunks/dashboard.js?id=5ab55a12214433c8",
|
"/chunks/dashboard.js": "/chunks/dashboard.js?id=5ab55a12214433c8",
|
||||||
"/chunks/invoices.js": "/chunks/invoices.js?id=799928609f57ca10",
|
"/chunks/invoices.js": "/chunks/invoices.js?id=799928609f57ca10",
|
||||||
"/chunks/subscriptions.js": "/chunks/subscriptions.js?id=a0c4f59d0ec4aee0",
|
"/chunks/subscriptions.js": "/chunks/subscriptions.js?id=a0c4f59d0ec4aee0",
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
"/chunks/app-settings.js": "/chunks/app-settings.js?id=b0d1082fdcbbd17c",
|
"/chunks/app-settings.js": "/chunks/app-settings.js?id=b0d1082fdcbbd17c",
|
||||||
"/chunks/app-appearance.js": "/chunks/app-appearance.js?id=8ba3feb2cc81a2c3",
|
"/chunks/app-appearance.js": "/chunks/app-appearance.js?id=8ba3feb2cc81a2c3",
|
||||||
"/chunks/app-index.js": "/chunks/app-index.js?id=0c50096e8de09288",
|
"/chunks/app-index.js": "/chunks/app-index.js?id=0c50096e8de09288",
|
||||||
"/chunks/app-environment.js": "/chunks/app-environment.js?id=09e6d087847e6057",
|
"/chunks/app-environment.js": "/chunks/app-environment.js?id=e8c421cddbaa4851",
|
||||||
"/chunks/app-others.js": "/chunks/app-others.js?id=dd23507db4551d0a",
|
"/chunks/app-others.js": "/chunks/app-others.js?id=dd23507db4551d0a",
|
||||||
"/chunks/app-sign-in-out.js": "/chunks/app-sign-in-out.js?id=77ac953ce49b5b55",
|
"/chunks/app-sign-in-out.js": "/chunks/app-sign-in-out.js?id=77ac953ce49b5b55",
|
||||||
"/chunks/app-adsense.js": "/chunks/app-adsense.js?id=c7e7dc2975317062",
|
"/chunks/app-adsense.js": "/chunks/app-adsense.js?id=c7e7dc2975317062",
|
||||||
@@ -58,18 +58,18 @@
|
|||||||
"/chunks/sign-up.js": "/chunks/sign-up.js?id=2af6073efe54c560",
|
"/chunks/sign-up.js": "/chunks/sign-up.js?id=2af6073efe54c560",
|
||||||
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=ff8954243e86c1e1",
|
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=ff8954243e86c1e1",
|
||||||
"/chunks/create-new-password.js": "/chunks/create-new-password.js?id=2f0401ee2fc148c4",
|
"/chunks/create-new-password.js": "/chunks/create-new-password.js?id=2f0401ee2fc148c4",
|
||||||
"/chunks/settings.js": "/chunks/settings.js?id=ff0f6e88171fd094",
|
"/chunks/settings.js": "/chunks/settings.js?id=29b9510ac60fe370",
|
||||||
"/chunks/profile.js": "/chunks/profile.js?id=3e24bb5e1f52d4bb",
|
"/chunks/profile.js": "/chunks/profile.js?id=3e24bb5e1f52d4bb",
|
||||||
"/chunks/settings-password.js": "/chunks/settings-password.js?id=d00bf503d8126dc4",
|
"/chunks/settings-password.js": "/chunks/settings-password.js?id=d00bf503d8126dc4",
|
||||||
"/chunks/settings-storage.js": "/chunks/settings-storage.js?id=ecfee7f7e98204f8",
|
"/chunks/settings-storage.js": "/chunks/settings-storage.js?id=ecfee7f7e98204f8",
|
||||||
"/chunks/billing.js": "/chunks/billing.js?id=91502cb0a5806200",
|
"/chunks/billing.js": "/chunks/billing.js?id=6fbcdd34c623b2b3",
|
||||||
"/chunks/platform.js": "/chunks/platform.js?id=90d43ec56b62c721",
|
"/chunks/platform.js": "/chunks/platform.js?id=0b49a3433770831c",
|
||||||
"/chunks/files.js": "/chunks/files.js?id=5f29f35c280e680b",
|
"/chunks/files.js": "/chunks/files.js?id=22078a3b592b2058",
|
||||||
"/chunks/recent-uploads.js": "/chunks/recent-uploads.js?id=6f43aea38e0927bc",
|
"/chunks/recent-uploads.js": "/chunks/recent-uploads.js?id=e667aa8fc8646ba4",
|
||||||
"/chunks/my-shared-items.js": "/chunks/my-shared-items.js?id=6e819ffe88a0fd1d",
|
"/chunks/my-shared-items.js": "/chunks/my-shared-items.js?id=1accaf0dd4106017",
|
||||||
"/chunks/trash.js": "/chunks/trash.js?id=1885832b8dd60529",
|
"/chunks/trash.js": "/chunks/trash.js?id=0039ee3b0e28405d",
|
||||||
"/chunks/team-folders.js": "/chunks/team-folders.js?id=709509b3e2dd2bf5",
|
"/chunks/team-folders.js": "/chunks/team-folders.js?id=e7d7c1506c565e2f",
|
||||||
"/chunks/shared-with-me.js": "/chunks/shared-with-me.js?id=e86d3c1f72e6fde2",
|
"/chunks/shared-with-me.js": "/chunks/shared-with-me.js?id=0ede8351abc1f29f",
|
||||||
"/chunks/invitation.js": "/chunks/invitation.js?id=424b2783d9785a09",
|
"/chunks/invitation.js": "/chunks/invitation.js?id=424b2783d9785a09",
|
||||||
"/css/tailwind.css": "/css/tailwind.css",
|
"/css/tailwind.css": "/css/tailwind.css",
|
||||||
"/css/app.css": "/css/app.css"
|
"/css/app.css": "/css/app.css"
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
import ItemHandler from './ItemHandler'
|
import ItemHandler from './ItemHandler'
|
||||||
import { events } from '../../bus'
|
import { events } from '../../bus'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import Spinner from './Spinner'
|
import Spinner from "../UI/Others/Spinner";
|
||||||
import { debounce } from 'lodash'
|
import { debounce } from 'lodash'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ export default {
|
|||||||
goToFiles() {
|
goToFiles() {
|
||||||
if (this.$route.name !== 'Files') this.$router.push({ name: 'Files' })
|
if (this.$route.name !== 'Files') this.$router.push({ name: 'Files' })
|
||||||
|
|
||||||
this.$store.dispatch('getFolder')
|
this.$store.dispatch('getFolder', {page: 1})
|
||||||
},
|
},
|
||||||
logOut() {
|
logOut() {
|
||||||
this.$store.dispatch('logOut')
|
this.$store.dispatch('logOut')
|
||||||
|
|||||||
14
resources/js/helpers/functionHelpers.js
vendored
14
resources/js/helpers/functionHelpers.js
vendored
@@ -352,17 +352,17 @@ const FunctionHelpers = {
|
|||||||
|
|
||||||
Vue.prototype.$getDataByLocation = async function (page) {
|
Vue.prototype.$getDataByLocation = async function (page) {
|
||||||
let routes = {
|
let routes = {
|
||||||
RequestUpload: ['getUploadRequestFolder', {page:page, id:router.currentRoute.params.id || undefined} ],
|
RequestUpload: ['getUploadRequestFolder', {page: page, id: router.currentRoute.params.id || undefined}],
|
||||||
Public: ['getSharedFolder', {page:page, id:router.currentRoute.params.id || undefined}],
|
Public: ['getSharedFolder', {page: page, id: router.currentRoute.params.id || undefined}],
|
||||||
Files: ['getFolder', {page:page, id:router.currentRoute.params.id || undefined}],
|
Files: ['getFolder', {page: page, id: router.currentRoute.params.id || undefined}],
|
||||||
RecentUploads: ['getRecentUploads', page],
|
RecentUploads: ['getRecentUploads', page],
|
||||||
MySharedItems: ['getMySharedItems', page],
|
MySharedItems: ['getMySharedItems', page],
|
||||||
Trash: ['getTrash', {page:page , id:router.currentRoute.params.id || undefined}],
|
Trash: ['getTrash', {page: page, id: router.currentRoute.params.id || undefined}],
|
||||||
TeamFolders: ['getTeamFolder',{page:page, id:router.currentRoute.params.id || undefined}],
|
TeamFolders: ['getTeamFolder', {page: page, id: router.currentRoute.params.id || undefined}],
|
||||||
SharedWithMe: ['getSharedWithMeFolder',{page:page, id:router.currentRoute.params.id || undefined}],
|
SharedWithMe: ['getSharedWithMeFolder', {page: page, id: router.currentRoute.params.id || undefined}],
|
||||||
}
|
}
|
||||||
|
|
||||||
await store.dispatch(...routes[router.currentRoute.name])
|
return await store.dispatch(...routes[router.currentRoute.name])
|
||||||
}
|
}
|
||||||
|
|
||||||
Vue.prototype.$getPaymentLogo = function (driver) {
|
Vue.prototype.$getPaymentLogo = function (driver) {
|
||||||
|
|||||||
126
resources/js/store/modules/fileBrowser.js
vendored
126
resources/js/store/modules/fileBrowser.js
vendored
@@ -18,19 +18,16 @@ const defaultState = {
|
|||||||
const actions = {
|
const actions = {
|
||||||
getFolder: ({ commit, getters },{page, id}) => {
|
getFolder: ({ commit, getters },{page, id}) => {
|
||||||
return new Promise ((resolve, reject) => {
|
return new Promise ((resolve, reject) => {
|
||||||
if(! page)
|
if(page === 1)
|
||||||
commit('LOADING_STATE', { loading: true, data: [] })
|
commit('START_LOADING_VIEW')
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.get(`${getters.api}/browse/folders/${id || 'all'}${getters.sorting.URI}&page=${currentPage}`)
|
.get(`${getters.api}/browse/folders/${id || 'all'}${getters.sorting.URI}&page=${page}`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
commit('SET_PAGINATE', response.data.meta.paginate)
|
|
||||||
|
|
||||||
commit('LOADING_STATE', {
|
|
||||||
loading: false,
|
|
||||||
data: response.data.data,
|
|
||||||
})
|
|
||||||
commit('SET_CURRENT_FOLDER', response.data.meta.root)
|
commit('SET_CURRENT_FOLDER', response.data.meta.root)
|
||||||
|
commit('SET_PAGINATOR', response.data.meta.paginate)
|
||||||
|
commit('STOP_LOADING_VIEW')
|
||||||
|
commit('ADD_NEW_ITEMS', response.data.data)
|
||||||
|
|
||||||
events.$emit('scrollTop')
|
events.$emit('scrollTop')
|
||||||
|
|
||||||
@@ -48,62 +45,74 @@ const actions = {
|
|||||||
message: i18n.t('popup_error.message'),
|
message: i18n.t('popup_error.message'),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reject(error);
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getRecentUploads: ({ commit, getters }) => {
|
getRecentUploads: ({commit, getters}, page) => {
|
||||||
commit('LOADING_STATE', { loading: true, data: [] })
|
return new Promise((resolve, reject) => {
|
||||||
|
if (page === 1)
|
||||||
|
commit('START_LOADING_VIEW')
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.get(getters.api + '/browse/latest')
|
.get(`${getters.api}/browse/latest?page=${page}`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
commit('LOADING_STATE', {
|
commit('SET_PAGINATOR', response.data.meta.paginate)
|
||||||
loading: false,
|
commit('SET_CURRENT_FOLDER', undefined)
|
||||||
data: response.data.files.data,
|
commit('STOP_LOADING_VIEW')
|
||||||
|
commit('ADD_NEW_ITEMS', response.data.data)
|
||||||
|
|
||||||
|
events.$emit('scrollTop')
|
||||||
|
|
||||||
|
resolve(response)
|
||||||
})
|
})
|
||||||
commit('SET_CURRENT_FOLDER', undefined)
|
.catch(() => Vue.prototype.$isSomethingWrong())
|
||||||
|
})
|
||||||
events.$emit('scrollTop')
|
|
||||||
})
|
|
||||||
.catch(() => Vue.prototype.$isSomethingWrong())
|
|
||||||
},
|
},
|
||||||
getMySharedItems: ({ commit, getters }) => {
|
getMySharedItems: ({ commit, getters }, page) => {
|
||||||
commit('LOADING_STATE', { loading: true, data: [] })
|
return new Promise((resolve, reject) => {
|
||||||
|
if (page === 1)
|
||||||
|
commit('START_LOADING_VIEW')
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.get(getters.api + '/browse/share' + getters.sorting.URI)
|
.get(`${getters.api}/browse/share${getters.sorting.URI}&page=${page}`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
let folders = response.data.folders.data
|
commit('SET_PAGINATOR', response.data.meta.paginate)
|
||||||
let files = response.data.files.data
|
commit('SET_CURRENT_FOLDER', undefined)
|
||||||
|
commit('STOP_LOADING_VIEW')
|
||||||
|
commit('ADD_NEW_ITEMS', response.data.data)
|
||||||
|
|
||||||
commit('LOADING_STATE', {
|
events.$emit('scrollTop')
|
||||||
loading: false,
|
|
||||||
data: folders.concat(files),
|
resolve(response)
|
||||||
})
|
})
|
||||||
commit('SET_CURRENT_FOLDER', undefined)
|
.catch(() => Vue.prototype.$isSomethingWrong())
|
||||||
|
})
|
||||||
events.$emit('scrollTop')
|
|
||||||
})
|
|
||||||
.catch(() => Vue.prototype.$isSomethingWrong())
|
|
||||||
},
|
},
|
||||||
getTrash: ({ commit, getters }, id) => {
|
getTrash: ({ commit, getters }, {page, id}) => {
|
||||||
commit('LOADING_STATE', { loading: true, data: [] })
|
return new Promise((resolve, reject) => {
|
||||||
|
if (page === 1)
|
||||||
|
commit('START_LOADING_VIEW')
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.get(`${getters.api}/browse/trash/${id || 'all'}${getters.sorting.URI}`)
|
.get(`${getters.api}/browse/trash/${id || 'all'}${getters.sorting.URI}&page=${page}`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
let folders = response.data.folders.data
|
commit('SET_PAGINATOR', response.data.meta.paginate)
|
||||||
let files = response.data.files.data
|
commit('SET_CURRENT_FOLDER', response.data.meta.root)
|
||||||
|
commit('STOP_LOADING_VIEW')
|
||||||
|
commit('ADD_NEW_ITEMS', response.data.data)
|
||||||
|
|
||||||
commit('LOADING_STATE', {
|
events.$emit('scrollTop')
|
||||||
loading: false,
|
|
||||||
data: folders.concat(files),
|
resolve(response)
|
||||||
})
|
})
|
||||||
commit('SET_CURRENT_FOLDER', response.data.root)
|
.catch((error) => {
|
||||||
|
Vue.prototype.$isSomethingWrong()
|
||||||
|
|
||||||
events.$emit('scrollTop')
|
reject(error);
|
||||||
})
|
})
|
||||||
.catch(() => Vue.prototype.$isSomethingWrong())
|
})
|
||||||
},
|
},
|
||||||
getFolderTree: ({ commit, getters }) => {
|
getFolderTree: ({ commit, getters }) => {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
@@ -130,16 +139,15 @@ const actions = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
SET_PAGINATE(state, payload) {
|
SET_PAGINATOR(state, payload) {
|
||||||
state.paginate = payload
|
state.paginate = payload
|
||||||
},
|
},
|
||||||
LOADING_STATE(state, payload) {
|
START_LOADING_VIEW(state) {
|
||||||
if(payload.data.length === 0) {
|
state.entries = []
|
||||||
state.entries = []
|
state.isLoading = true
|
||||||
} else {
|
},
|
||||||
state.entries.push(...payload.data)
|
STOP_LOADING_VIEW(state) {
|
||||||
}
|
state.isLoading = false
|
||||||
state.isLoading = payload.loading
|
|
||||||
},
|
},
|
||||||
SET_CURRENT_FOLDER(state, folder) {
|
SET_CURRENT_FOLDER(state, folder) {
|
||||||
state.currentFolder = folder
|
state.currentFolder = folder
|
||||||
|
|||||||
6
resources/js/store/modules/fileFunctions.js
vendored
6
resources/js/store/modules/fileFunctions.js
vendored
@@ -342,14 +342,14 @@ const actions = {
|
|||||||
},
|
},
|
||||||
emptyTrash: ({ commit, getters }) => {
|
emptyTrash: ({ commit, getters }) => {
|
||||||
// Clear file browser
|
// Clear file browser
|
||||||
commit('LOADING_STATE', { loading: true, data: [] })
|
commit('START_LOADING_VIEW')
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.post(getters.api + '/trash/dump', {
|
.post(getters.api + '/trash/dump', {
|
||||||
_method: 'delete',
|
_method: 'delete',
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
commit('LOADING_STATE', { loading: false, data: [] })
|
commit('STOP_LOADING_VIEW')
|
||||||
events.$emit('scrollTop')
|
events.$emit('scrollTop')
|
||||||
|
|
||||||
commit('CLIPBOARD_CLEAR')
|
commit('CLIPBOARD_CLEAR')
|
||||||
@@ -363,7 +363,7 @@ const actions = {
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (router.currentRoute.name === 'Trash') {
|
if (router.currentRoute.name === 'Trash') {
|
||||||
commit('LOADING_STATE', { loading: false, data: [] })
|
commit('STOP_LOADING_VIEW')
|
||||||
}
|
}
|
||||||
|
|
||||||
events.$emit('toaster', {
|
events.$emit('toaster', {
|
||||||
|
|||||||
24
resources/js/store/modules/sharing.js
vendored
24
resources/js/store/modules/sharing.js
vendored
@@ -20,21 +20,19 @@ const defaultState = {
|
|||||||
sharedFile: undefined,
|
sharedFile: undefined,
|
||||||
}
|
}
|
||||||
const actions = {
|
const actions = {
|
||||||
getSharedFolder: ({ commit, getters }, id) => {
|
getSharedFolder: ({ commit, getters }, {page, id}) => {
|
||||||
commit('LOADING_STATE', { loading: true, data: [] })
|
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
axios
|
|
||||||
.get(`/api/sharing/folders/${id}/${router.currentRoute.params.token}${getters.sorting.URI}`)
|
|
||||||
.then((response) => {
|
|
||||||
let folders = response.data.folders.data
|
|
||||||
let files = response.data.files.data
|
|
||||||
|
|
||||||
commit('LOADING_STATE', {
|
if(page === 1)
|
||||||
loading: false,
|
commit('START_LOADING_VIEW')
|
||||||
data: folders.concat(files),
|
|
||||||
})
|
axios
|
||||||
commit('SET_CURRENT_FOLDER', response.data.root)
|
.get(`/api/sharing/folders/${id}/${router.currentRoute.params.token}${getters.sorting.URI}&page=${page}`)
|
||||||
|
.then((response) => {
|
||||||
|
commit('SET_CURRENT_FOLDER', response.data.meta.root)
|
||||||
|
commit('SET_PAGINATOR', response.data.meta.paginate)
|
||||||
|
commit('STOP_LOADING_VIEW')
|
||||||
|
commit('ADD_NEW_ITEMS', response.data.data)
|
||||||
|
|
||||||
events.$emit('scrollTop')
|
events.$emit('scrollTop')
|
||||||
|
|
||||||
|
|||||||
201
resources/js/store/modules/teams.js
vendored
201
resources/js/store/modules/teams.js
vendored
@@ -1,129 +1,134 @@
|
|||||||
import router from '../../router'
|
import router from '../../router'
|
||||||
import { events } from '../../bus'
|
import {events} from '../../bus'
|
||||||
import i18n from '../../i18n'
|
import i18n from '../../i18n'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
const defaultState = {
|
const defaultState = {
|
||||||
currentTeamFolder: undefined,
|
currentTeamFolder: undefined,
|
||||||
}
|
}
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
getTeamFolder: ({ commit, getters }, id) => {
|
getTeamFolder: ({commit, getters}, {page, id}) => {
|
||||||
commit('LOADING_STATE', { loading: true, data: [] })
|
return new Promise((resolve, reject) => {
|
||||||
|
if (page === 1)
|
||||||
|
commit('START_LOADING_VIEW')
|
||||||
|
|
||||||
if (typeof id === 'undefined') {
|
if (typeof id === 'undefined')
|
||||||
commit('SET_CURRENT_TEAM_FOLDER', null)
|
commit('SET_CURRENT_TEAM_FOLDER', null)
|
||||||
}
|
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.get(`${getters.api}/teams/folders/${id || 'all'}${getters.sorting.URI}`)
|
.get(`${getters.api}/teams/folders/${id || 'all'}${getters.sorting.URI}&page=${page}`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
let folders = response.data.folders.data
|
commit('SET_CURRENT_FOLDER', response.data.meta.root)
|
||||||
let files = response.data.files.data
|
commit('SET_PAGINATOR', response.data.meta.paginate)
|
||||||
|
commit('STOP_LOADING_VIEW')
|
||||||
|
commit('ADD_NEW_ITEMS', response.data.data)
|
||||||
|
|
||||||
commit('LOADING_STATE', {
|
if (
|
||||||
loading: false,
|
!getters.currentTeamFolder ||
|
||||||
data: folders.concat(files),
|
getters.currentTeamFolder.data.id !== response.data.meta.teamFolder.data.id
|
||||||
})
|
) {
|
||||||
commit('SET_CURRENT_FOLDER', response.data.root)
|
commit('SET_CURRENT_TEAM_FOLDER', response.data.meta.teamFolder)
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
events.$emit('scrollTop')
|
||||||
!getters.currentTeamFolder ||
|
|
||||||
getters.currentTeamFolder.data.id !== response.data.teamFolder.data.id
|
|
||||||
) {
|
|
||||||
commit('SET_CURRENT_TEAM_FOLDER', response.data.teamFolder)
|
|
||||||
}
|
|
||||||
|
|
||||||
events.$emit('scrollTop')
|
resolve(response)
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
// Redirect if unauthenticated
|
// Redirect if unauthenticated
|
||||||
if ([401, 403].includes(error.response.status)) {
|
if ([401, 403].includes(error.response.status)) {
|
||||||
commit('SET_AUTHORIZED', false)
|
commit('SET_AUTHORIZED', false)
|
||||||
router.push({ name: 'SignIn' })
|
router.push({name: 'SignIn'})
|
||||||
} else {
|
} else {
|
||||||
// Show error message
|
// Show error message
|
||||||
events.$emit('alert:open', {
|
events.$emit('alert:open', {
|
||||||
title: i18n.t('popup_error.title'),
|
title: i18n.t('popup_error.title'),
|
||||||
message: i18n.t('popup_error.message'),
|
message: i18n.t('popup_error.message'),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
|
||||||
},
|
|
||||||
getSharedWithMeFolder: ({ commit, getters }, id) => {
|
|
||||||
commit('LOADING_STATE', { loading: true, data: [] })
|
|
||||||
|
|
||||||
if (typeof id === 'undefined') {
|
reject(error)
|
||||||
commit('SET_CURRENT_TEAM_FOLDER', null)
|
})
|
||||||
}
|
})
|
||||||
|
},
|
||||||
|
getSharedWithMeFolder: ({commit, getters}, {page, id}) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
if (page === 1)
|
||||||
|
commit('START_LOADING_VIEW')
|
||||||
|
|
||||||
axios
|
if (typeof id === 'undefined') {
|
||||||
.get(`${getters.api}/teams/shared-with-me/${id || 'all'}${getters.sorting.URI}`)
|
commit('SET_CURRENT_TEAM_FOLDER', null)
|
||||||
.then((response) => {
|
}
|
||||||
let folders = response.data.folders.data
|
|
||||||
let files = response.data.files.data
|
|
||||||
|
|
||||||
commit('LOADING_STATE', {
|
axios
|
||||||
loading: false,
|
.get(`${getters.api}/teams/shared-with-me/${id || 'all'}${getters.sorting.URI}&page=${page}`)
|
||||||
data: folders.concat(files),
|
.then((response) => {
|
||||||
})
|
commit('SET_CURRENT_FOLDER', response.data.meta.root)
|
||||||
commit('SET_CURRENT_FOLDER', response.data.root)
|
commit('SET_PAGINATOR', response.data.meta.paginate)
|
||||||
|
commit('STOP_LOADING_VIEW')
|
||||||
|
commit('ADD_NEW_ITEMS', response.data.data)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!getters.currentTeamFolder ||
|
!getters.currentTeamFolder ||
|
||||||
getters.currentTeamFolder.data.id !== response.data.teamFolder.data.id
|
getters.currentTeamFolder.data.id !== response.data.meta.teamFolder.data.id
|
||||||
) {
|
) {
|
||||||
commit('SET_CURRENT_TEAM_FOLDER', response.data.teamFolder)
|
commit('SET_CURRENT_TEAM_FOLDER', response.data.meta.teamFolder)
|
||||||
}
|
}
|
||||||
|
|
||||||
events.$emit('scrollTop')
|
events.$emit('scrollTop')
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
// Redirect if unauthenticated
|
|
||||||
if ([401, 403].includes(error.response.status)) {
|
|
||||||
commit('SET_AUTHORIZED', false)
|
|
||||||
router.push({ name: 'SignIn' })
|
|
||||||
} else {
|
|
||||||
// Show error message
|
|
||||||
events.$emit('alert:open', {
|
|
||||||
title: i18n.t('popup_error.title'),
|
|
||||||
message: i18n.t('popup_error.message'),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getTeamFolderTree: ({ commit, getters }) => {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
axios
|
|
||||||
.get(`/api/teams/folders/${getters.currentTeamFolder.data.id}/tree${getters.sorting.URI}`)
|
|
||||||
.then((response) => {
|
|
||||||
resolve(response)
|
|
||||||
|
|
||||||
commit('UPDATE_FOLDER_TREE', response.data)
|
resolve(response)
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
reject(error)
|
// Redirect if unauthenticated
|
||||||
|
if ([401, 403].includes(error.response.status)) {
|
||||||
|
commit('SET_AUTHORIZED', false)
|
||||||
|
router.push({name: 'SignIn'})
|
||||||
|
} else {
|
||||||
|
// Show error message
|
||||||
|
events.$emit('alert:open', {
|
||||||
|
title: i18n.t('popup_error.title'),
|
||||||
|
message: i18n.t('popup_error.message'),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
Vue.prototype.$isSomethingWrong()
|
reject(error)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getTeamFolderTree: ({commit, getters}) => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
axios
|
||||||
|
.get(`/api/teams/folders/${getters.currentTeamFolder.data.id}/tree${getters.sorting.URI}`)
|
||||||
|
.then((response) => {
|
||||||
|
resolve(response)
|
||||||
|
|
||||||
|
commit('UPDATE_FOLDER_TREE', response.data)
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
reject(error)
|
||||||
|
|
||||||
|
Vue.prototype.$isSomethingWrong()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
SET_CURRENT_TEAM_FOLDER(state, payload) {
|
SET_CURRENT_TEAM_FOLDER(state, payload) {
|
||||||
state.currentTeamFolder = payload
|
state.currentTeamFolder = payload
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const getters = {
|
const getters = {
|
||||||
currentTeamFolder: (state) => state.currentTeamFolder,
|
currentTeamFolder: (state) => state.currentTeamFolder,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
state: defaultState,
|
state: defaultState,
|
||||||
getters,
|
getters,
|
||||||
actions,
|
actions,
|
||||||
mutations,
|
mutations,
|
||||||
}
|
}
|
||||||
|
|||||||
19
resources/js/store/modules/uploadRequest.js
vendored
19
resources/js/store/modules/uploadRequest.js
vendored
@@ -9,20 +9,16 @@ const defaultState = {
|
|||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
getUploadRequestFolder: ({ commit, getters }, id) => {
|
getUploadRequestFolder: ({ commit, getters }, id) => {
|
||||||
commit('LOADING_STATE', { loading: true, data: [] })
|
commit('START_LOADING_VIEW')
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
axios
|
axios
|
||||||
.get(`/api/file-request/${router.currentRoute.params.token}/browse/${id || 'all'}${getters.sorting.URI}`)
|
.get(`/api/file-request/${router.currentRoute.params.token}/browse/${id || 'all'}${getters.sorting.URI}`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
let folders = response.data.folders
|
commit('SET_CURRENT_FOLDER', response.data.meta.root)
|
||||||
let files = response.data.files
|
commit('SET_PAGINATOR', response.data.meta.paginate)
|
||||||
|
commit('STOP_LOADING_VIEW')
|
||||||
commit('LOADING_STATE', {
|
commit('ADD_NEW_ITEMS', response.data.data)
|
||||||
loading: false,
|
|
||||||
data: folders.concat(files),
|
|
||||||
})
|
|
||||||
commit('SET_CURRENT_FOLDER', response.data.root)
|
|
||||||
|
|
||||||
events.$emit('scrollTop')
|
events.$emit('scrollTop')
|
||||||
|
|
||||||
@@ -43,7 +39,7 @@ const actions = {
|
|||||||
|
|
||||||
// Stop loading spinner
|
// Stop loading spinner
|
||||||
if (['active', 'filled', 'expired'].includes(response.data.data.attributes.status) )
|
if (['active', 'filled', 'expired'].includes(response.data.data.attributes.status) )
|
||||||
commit('LOADING_STATE', { loading: false, data: [] })
|
commit('STOP_LOADING_VIEW')
|
||||||
|
|
||||||
commit('SET_UPLOAD_REQUEST', response.data)
|
commit('SET_UPLOAD_REQUEST', response.data)
|
||||||
|
|
||||||
@@ -63,7 +59,8 @@ const actions = {
|
|||||||
axios
|
axios
|
||||||
.delete(`/api/file-request/${router.currentRoute.params.token}`)
|
.delete(`/api/file-request/${router.currentRoute.params.token}`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
commit('LOADING_STATE', { loading: false, data: [] })
|
commit('START_LOADING_VIEW')
|
||||||
|
commit('STOP_LOADING_VIEW')
|
||||||
commit('SET_UPLOAD_REQUEST_AS_FILLED')
|
commit('SET_UPLOAD_REQUEST_AS_FILLED')
|
||||||
})
|
})
|
||||||
.catch(() => this.$isSomethingWrong())
|
.catch(() => this.$isSomethingWrong())
|
||||||
|
|||||||
10
resources/js/store/modules/userAuth.js
vendored
10
resources/js/store/modules/userAuth.js
vendored
@@ -80,7 +80,7 @@ const actions = {
|
|||||||
|
|
||||||
let itemsToFavourites = items.map((item) => {
|
let itemsToFavourites = items.map((item) => {
|
||||||
if (item.data.type === 'folder') {
|
if (item.data.type === 'folder') {
|
||||||
if (context.getters.user.data.relationships.favourites.data.find((folder) => folder.id === item.data.id))
|
if (context.getters.user.data.relationships.favourites.find((folder) => folder.id === item.data.id))
|
||||||
return
|
return
|
||||||
|
|
||||||
return item.data.id;
|
return item.data.id;
|
||||||
@@ -89,7 +89,7 @@ const actions = {
|
|||||||
|
|
||||||
// Check is favorites already don't include some of pushed folders
|
// Check is favorites already don't include some of pushed folders
|
||||||
let favouritesWidget = items.map((item) => {
|
let favouritesWidget = items.map((item) => {
|
||||||
if (!context.getters.user.data.relationships.favourites.data.find((folder) => folder.data.id === item.id)) {
|
if (!context.getters.user.data.relationships.favourites.find((folder) => folder.data.id === item.id)) {
|
||||||
return item
|
return item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -149,7 +149,7 @@ const mutations = {
|
|||||||
},
|
},
|
||||||
ADD_TO_FAVOURITES(state, folder) {
|
ADD_TO_FAVOURITES(state, folder) {
|
||||||
folder.forEach((item) => {
|
folder.forEach((item) => {
|
||||||
state.user.data.relationships.favourites.data.push(item)
|
state.user.data.relationships.favourites.push(item)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
UPDATE_FIRST_NAME(state, name) {
|
UPDATE_FIRST_NAME(state, name) {
|
||||||
@@ -166,12 +166,12 @@ const mutations = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
REMOVE_ITEM_FROM_FAVOURITES(state, item) {
|
REMOVE_ITEM_FROM_FAVOURITES(state, item) {
|
||||||
state.user.data.relationships.favourites.data = state.user.data.relationships.favourites.data.filter(
|
state.user.data.relationships.favourites.data = state.user.data.relationships.favourites.filter(
|
||||||
(folder) => folder.data.id !== item.data.id
|
(folder) => folder.data.id !== item.data.id
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
UPDATE_NAME_IN_FAVOURITES(state, data) {
|
UPDATE_NAME_IN_FAVOURITES(state, data) {
|
||||||
state.user.data.relationships.favourites.data.find((folder) => {
|
state.user.data.relationships.favourites.find((folder) => {
|
||||||
if (folder.id === data.id) {
|
if (folder.id === data.id) {
|
||||||
folder.name = data.name
|
folder.name = data.name
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$store.dispatch('getFolder', {page:null, id:this.$route.params.id})
|
this.$store.dispatch('getFolder', {page: 1, id:this.$route.params.id})
|
||||||
|
|
||||||
events.$on('context-menu:show', (event, item) => (this.item = item))
|
events.$on('context-menu:show', (event, item) => (this.item = item))
|
||||||
events.$on('context-menu:current-folder', (folder) => (this.item = folder))
|
events.$on('context-menu:current-folder', (folder) => (this.item = folder))
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$store.dispatch('getMySharedItems')
|
this.$store.dispatch('getMySharedItems', 1)
|
||||||
|
|
||||||
events.$on('context-menu:show', (event, item) => (this.item = item))
|
events.$on('context-menu:show', (event, item) => (this.item = item))
|
||||||
events.$on('mobile-context-menu:show', (item) => (this.item = item))
|
events.$on('mobile-context-menu:show', (item) => (this.item = item))
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$store.dispatch('getSharedFolder', {page:null, id:this.$route.params.id})
|
this.$store.dispatch('getSharedFolder', {page: 1, id: this.$route.params.id})
|
||||||
|
|
||||||
events.$on('context-menu:show', (event, item) => (this.item = item))
|
events.$on('context-menu:show', (event, item) => (this.item = item))
|
||||||
events.$on('mobile-context-menu:show', (item) => (this.item = item))
|
events.$on('mobile-context-menu:show', (item) => (this.item = item))
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$store.dispatch('getRecentUploads')
|
this.$store.dispatch('getRecentUploads', 1)
|
||||||
|
|
||||||
events.$on('context-menu:show', (event, item) => (this.item = item))
|
events.$on('context-menu:show', (event, item) => (this.item = item))
|
||||||
events.$on('mobile-context-menu:show', (item) => (this.item = item))
|
events.$on('mobile-context-menu:show', (item) => (this.item = item))
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$store.dispatch('getSharedWithMeFolder',{page:null, id:this.$route.params.id})
|
this.$store.dispatch('getSharedWithMeFolder',{page: 1, id:this.$route.params.id})
|
||||||
|
|
||||||
events.$on('context-menu:show', (event, item) => (this.item = item))
|
events.$on('context-menu:show', (event, item) => (this.item = item))
|
||||||
events.$on('mobile-context-menu:show', (item) => (this.item = item))
|
events.$on('mobile-context-menu:show', (item) => (this.item = item))
|
||||||
@@ -257,7 +257,7 @@ export default {
|
|||||||
if (this.$route.params.id) {
|
if (this.$route.params.id) {
|
||||||
this.$router.push({ name: 'SharedWithMe' })
|
this.$router.push({ name: 'SharedWithMe' })
|
||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('getSharedWithMeFolder',{page:null, id:undefined})
|
this.$store.dispatch('getSharedWithMeFolder',{page: 1, id:undefined})
|
||||||
}
|
}
|
||||||
|
|
||||||
events.$emit('toaster', {
|
events.$emit('toaster', {
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$store.dispatch('getTeamFolder', {page:null, id:this.$route.params.id})
|
this.$store.dispatch('getTeamFolder', {page: 1, id:this.$route.params.id})
|
||||||
|
|
||||||
events.$on('context-menu:show', (event, item) => (this.item = item))
|
events.$on('context-menu:show', (event, item) => (this.item = item))
|
||||||
events.$on('mobile-context-menu:show', (item) => (this.item = item))
|
events.$on('mobile-context-menu:show', (item) => (this.item = item))
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$store.dispatch('getTrash', {page:null, id:this.$route.params.id})
|
this.$store.dispatch('getTrash', {page: 1, id: this.$route.params.id})
|
||||||
|
|
||||||
events.$on('context-menu:show', (event, item) => (this.item = item))
|
events.$on('context-menu:show', (event, item) => (this.item = item))
|
||||||
events.$on('mobile-context-menu:show', (item) => (this.item = item))
|
events.$on('mobile-context-menu:show', (item) => (this.item = item))
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ use Domain\Pages\Controllers\AdminPagesController;
|
|||||||
use Domain\Settings\Controllers\FlushCacheController;
|
use Domain\Settings\Controllers\FlushCacheController;
|
||||||
use Domain\Localization\Controllers\LanguageController;
|
use Domain\Localization\Controllers\LanguageController;
|
||||||
use Domain\Admin\Controllers\Users\DeleteUserController;
|
use Domain\Admin\Controllers\Users\DeleteUserController;
|
||||||
use Domain\Settings\Controllers\TestWebsocketConnectionController;
|
|
||||||
use Domain\Settings\Controllers\UpgradeLicenseController;
|
use Domain\Settings\Controllers\UpgradeLicenseController;
|
||||||
use Domain\Settings\Controllers\GetServerStatusController;
|
use Domain\Settings\Controllers\GetServerStatusController;
|
||||||
use Domain\Settings\Controllers\GetSettingsValueController;
|
use Domain\Settings\Controllers\GetSettingsValueController;
|
||||||
@@ -17,6 +16,7 @@ use Domain\Settings\Controllers\StoreEmailCredentialsController;
|
|||||||
use Domain\Transactions\Controllers\GetAllTransactionsController;
|
use Domain\Transactions\Controllers\GetAllTransactionsController;
|
||||||
use Domain\Admin\Controllers\Dashboard\GetDashboardDataController;
|
use Domain\Admin\Controllers\Dashboard\GetDashboardDataController;
|
||||||
use Domain\Settings\Controllers\StoreStorageCredentialsController;
|
use Domain\Settings\Controllers\StoreStorageCredentialsController;
|
||||||
|
use Domain\Settings\Controllers\TestWebsocketConnectionController;
|
||||||
use Domain\Transactions\Controllers\GetUserTransactionsController;
|
use Domain\Transactions\Controllers\GetUserTransactionsController;
|
||||||
use Domain\Localization\Controllers\UpdateLanguageStringController;
|
use Domain\Localization\Controllers\UpdateLanguageStringController;
|
||||||
use Domain\Admin\Controllers\Users\ShowUserStorageCapacityController;
|
use Domain\Admin\Controllers\Users\ShowUserStorageCapacityController;
|
||||||
|
|||||||
@@ -11,8 +11,10 @@ use Domain\Folders\Controllers\FavouriteController;
|
|||||||
use Domain\Sharing\Controllers\ShareItemController;
|
use Domain\Sharing\Controllers\ShareItemController;
|
||||||
use Domain\Settings\Controllers\GetConfigController;
|
use Domain\Settings\Controllers\GetConfigController;
|
||||||
use Domain\SetupWizard\Controllers\PingAPIController;
|
use Domain\SetupWizard\Controllers\PingAPIController;
|
||||||
|
use Domain\Browsing\Controllers\BrowseTrashController;
|
||||||
use Domain\Folders\Controllers\CreateFolderController;
|
use Domain\Folders\Controllers\CreateFolderController;
|
||||||
use Domain\Browsing\Controllers\BrowseFolderController;
|
use Domain\Browsing\Controllers\BrowseFolderController;
|
||||||
|
use Domain\Browsing\Controllers\BrowseSharedController;
|
||||||
use Domain\Sharing\Controllers\ShareViaEmailController;
|
use Domain\Sharing\Controllers\ShareViaEmailController;
|
||||||
use Domain\Files\Controllers\UploadFileChunksController;
|
use Domain\Files\Controllers\UploadFileChunksController;
|
||||||
use Domain\Folders\Controllers\NavigationTreeController;
|
use Domain\Folders\Controllers\NavigationTreeController;
|
||||||
@@ -24,8 +26,6 @@ use Domain\Items\Controllers\RenameFileOrFolderController;
|
|||||||
use Domain\Settings\Controllers\GetSettingsValueController;
|
use Domain\Settings\Controllers\GetSettingsValueController;
|
||||||
use Domain\Trash\Controllers\RestoreTrashContentController;
|
use Domain\Trash\Controllers\RestoreTrashContentController;
|
||||||
use Domain\Browsing\Controllers\BrowseLatestFilesController;
|
use Domain\Browsing\Controllers\BrowseLatestFilesController;
|
||||||
use Domain\Browsing\Controllers\BrowseSharedItemsController;
|
|
||||||
use Domain\Browsing\Controllers\BrowseTrashContentController;
|
|
||||||
use Domain\Homepage\Controllers\SendContactMessageController;
|
use Domain\Homepage\Controllers\SendContactMessageController;
|
||||||
use Domain\RemoteUpload\Controllers\RemoteUploadFileController;
|
use Domain\RemoteUpload\Controllers\RemoteUploadFileController;
|
||||||
use Domain\Sharing\Controllers\GetShareLinkViaQrCodeController;
|
use Domain\Sharing\Controllers\GetShareLinkViaQrCodeController;
|
||||||
@@ -69,8 +69,8 @@ Route::group(['middleware' => ['auth:sanctum']], function () {
|
|||||||
Route::get('/folders/{id}', BrowseFolderController::class);
|
Route::get('/folders/{id}', BrowseFolderController::class);
|
||||||
Route::get('/navigation', NavigationTreeController::class);
|
Route::get('/navigation', NavigationTreeController::class);
|
||||||
Route::get('/latest', BrowseLatestFilesController::class);
|
Route::get('/latest', BrowseLatestFilesController::class);
|
||||||
Route::get('/trash/{id}', BrowseTrashContentController::class);
|
Route::get('/trash/{id}', BrowseTrashController::class);
|
||||||
Route::get('/share', BrowseSharedItemsController::class);
|
Route::get('/share', BrowseSharedController::class);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Trash
|
// Trash
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ namespace App\Socialite\Controllers;
|
|||||||
|
|
||||||
use App\Users\Models\User;
|
use App\Users\Models\User;
|
||||||
use App\Users\DTO\CreateUserData;
|
use App\Users\DTO\CreateUserData;
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Http\RedirectResponse;
|
use Illuminate\Http\RedirectResponse;
|
||||||
use Laravel\Socialite\Facades\Socialite;
|
use Laravel\Socialite\Facades\Socialite;
|
||||||
use App\Users\Actions\CreateNewUserAction;
|
use App\Users\Actions\CreateNewUserAction;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
namespace App\Users\Controllers\Authentication;
|
namespace App\Users\Controllers\Authentication;
|
||||||
|
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ namespace Domain\Browsing\Controllers;
|
|||||||
use Str;
|
use Str;
|
||||||
use Domain\Files\Models\File;
|
use Domain\Files\Models\File;
|
||||||
use Domain\Folders\Models\Folder;
|
use Domain\Folders\Models\Folder;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Domain\Files\Resources\FilesCollection;
|
use Domain\Files\Resources\FilesCollection;
|
||||||
use Domain\Folders\Resources\FolderResource;
|
use Domain\Folders\Resources\FolderResource;
|
||||||
use Domain\Folders\Resources\FolderCollection;
|
use Domain\Folders\Resources\FolderCollection;
|
||||||
@@ -13,33 +13,49 @@ class BrowseFolderController
|
|||||||
{
|
{
|
||||||
public function __invoke(
|
public function __invoke(
|
||||||
string $id,
|
string $id,
|
||||||
): array {
|
): JsonResponse {
|
||||||
$root_id = Str::isUuid($id) ? $id : null;
|
$rootId = Str::isUuid($id)
|
||||||
|
? $id
|
||||||
|
: null;
|
||||||
|
|
||||||
$folderQuery = [
|
$page = request()->has('page')
|
||||||
'parent_id' => $root_id,
|
? request()->input('page')
|
||||||
'team_folder' => false,
|
: 'all';
|
||||||
'user_id' => Auth::id(),
|
|
||||||
'deleted_at' => null,
|
// Prepare folder & file db query
|
||||||
|
$query = [
|
||||||
|
'folder' => [
|
||||||
|
'where' => [
|
||||||
|
'parent_id' => $rootId,
|
||||||
|
'team_folder' => false,
|
||||||
|
'user_id' => auth()->id(),
|
||||||
|
'deleted_at' => null,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'file' => [
|
||||||
|
'where' => [
|
||||||
|
'parent_id' => $rootId,
|
||||||
|
'user_id' => auth()->id(),
|
||||||
|
'deleted_at' => null,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'with' => [
|
||||||
|
'parent:id,name',
|
||||||
|
'shared:token,id,item_id,permission,is_protected,expire_in',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
$fileQuery = [
|
[$foldersTake, $foldersSkip, $filesTake, $filesSkip, $totalEntries] = getRecordsCount($query, $page);
|
||||||
'parent_id' => $root_id,
|
|
||||||
'user_id' => Auth::id(),
|
|
||||||
'deleted_at' => null,
|
|
||||||
];
|
|
||||||
|
|
||||||
list($foldersTake, $foldersSkip, $filesTake, $filesSkip, $totalItemsCount) = getRecordsCount($folderQuery, $fileQuery, request()->input('page'));
|
$folders = Folder::with($query['with'])
|
||||||
|
->where($query['folder']['where'])
|
||||||
$folders = Folder::with(['parent:id,name', 'shared:token,id,item_id,permission,is_protected,expire_in'])
|
|
||||||
->where($folderQuery)
|
|
||||||
->sortable()
|
->sortable()
|
||||||
->skip($foldersSkip)
|
->skip($foldersSkip)
|
||||||
->take($foldersTake)
|
->take($foldersTake)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$files = File::with(['parent:id,name', 'shared:token,id,item_id,permission,is_protected,expire_in'])
|
$files = File::with($query['with'])
|
||||||
->where($fileQuery)
|
->where($query['file']['where'])
|
||||||
->sortable()
|
->sortable()
|
||||||
->skip($filesSkip)
|
->skip($filesSkip)
|
||||||
->take($filesTake)
|
->take($filesTake)
|
||||||
@@ -50,15 +66,15 @@ class BrowseFolderController
|
|||||||
$files ? json_decode((new FilesCollection($files))->toJson(), true) : null,
|
$files ? json_decode((new FilesCollection($files))->toJson(), true) : null,
|
||||||
])->collapse();
|
])->collapse();
|
||||||
|
|
||||||
list($paginate, $links) = generatePaginationCounts($totalItemsCount);
|
[$paginate, $links] = formatPaginatorMetadata($totalEntries);
|
||||||
|
|
||||||
return [
|
return response()->json([
|
||||||
'data' => $entries,
|
'data' => $entries,
|
||||||
'links' => $links,
|
'links' => $links,
|
||||||
'meta' => [
|
'meta' => [
|
||||||
'paginate' => $paginate,
|
'paginate' => $paginate,
|
||||||
'root' => $root_id ? new FolderResource(Folder::findOrFail($root_id)) : null,
|
'root' => $rootId ? new FolderResource(Folder::findOrFail($rootId)) : null,
|
||||||
],
|
],
|
||||||
];
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,29 +1,58 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Domain\Browsing\Controllers;
|
namespace Domain\Browsing\Controllers;
|
||||||
|
|
||||||
use App\Users\Models\User;
|
use DB;
|
||||||
use Illuminate\Http\Request;
|
use Domain\Files\Models\File;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Domain\Files\Resources\FilesCollection;
|
||||||
|
|
||||||
class BrowseLatestFilesController
|
class BrowseLatestFilesController
|
||||||
{
|
{
|
||||||
public function __invoke(Request $request): array
|
public function __invoke(): JsonResponse
|
||||||
{
|
{
|
||||||
$user = User::with([
|
$entriesPerPage = config('vuefilemanager.paginate.perPage');
|
||||||
'latestUploads' => fn ($query) => $query->sortable(['created_at' => 'desc']),
|
|
||||||
])
|
|
||||||
->where('id', Auth::id())
|
|
||||||
->first();
|
|
||||||
|
|
||||||
list($data, $paginate, $links) = groupPaginate($request, null, $user->latestUploads);
|
$page = request()->has('page')
|
||||||
|
? request()->input('page')
|
||||||
|
: 'all';
|
||||||
|
|
||||||
return [
|
$totalFiles = DB::table('files')
|
||||||
'data' => $data,
|
->where('user_id', auth()->id())
|
||||||
|
->whereNull('deleted_at')
|
||||||
|
->count();
|
||||||
|
|
||||||
|
$getWith = [
|
||||||
|
'parent:id,name',
|
||||||
|
'shared:token,id,item_id,permission,is_protected,expire_in',
|
||||||
|
];
|
||||||
|
|
||||||
|
// Get paginator data
|
||||||
|
[$paginate, $links] = formatPaginatorMetadata($totalFiles);
|
||||||
|
|
||||||
|
// Get all files
|
||||||
|
if ($page === 'all') {
|
||||||
|
$files = File::with($getWith)
|
||||||
|
->where('user_id', auth()->id())
|
||||||
|
->sortable(['created_at' => 'desc'])
|
||||||
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get certain page
|
||||||
|
if ($page !== 'all') {
|
||||||
|
$files = File::with($getWith)
|
||||||
|
->where('user_id', auth()->id())
|
||||||
|
->sortable(['created_at' => 'desc'])
|
||||||
|
->skip($entriesPerPage * ($page - 1))
|
||||||
|
->take($entriesPerPage)
|
||||||
|
->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'data' => new FilesCollection($files),
|
||||||
'links' => $links,
|
'links' => $links,
|
||||||
'meta' => [
|
'meta' => [
|
||||||
'paginate' => $paginate,
|
'paginate' => $paginate,
|
||||||
'root' => null,
|
|
||||||
],
|
],
|
||||||
];
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
93
src/Domain/Browsing/Controllers/BrowseSharedController.php
Normal file
93
src/Domain/Browsing/Controllers/BrowseSharedController.php
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<?php
|
||||||
|
namespace Domain\Browsing\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Domain\Files\Models\File;
|
||||||
|
use Domain\Sharing\Models\Share;
|
||||||
|
use Domain\Folders\Models\Folder;
|
||||||
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Domain\Files\Resources\FilesCollection;
|
||||||
|
use Domain\Folders\Resources\FolderCollection;
|
||||||
|
|
||||||
|
class BrowseSharedController
|
||||||
|
{
|
||||||
|
public function __invoke(Request $request): JsonResponse
|
||||||
|
{
|
||||||
|
$userId = auth()->id();
|
||||||
|
|
||||||
|
$page = request()->has('page')
|
||||||
|
? request()->input('page')
|
||||||
|
: 'all';
|
||||||
|
|
||||||
|
// Get shared folders and files
|
||||||
|
$parentIds = Share::where('user_id', $userId)
|
||||||
|
->where('type', 'folder')
|
||||||
|
->pluck('item_id')
|
||||||
|
->toArray();
|
||||||
|
|
||||||
|
$fileIds = Share::where('user_id', $userId)
|
||||||
|
->where('type', '!=', 'folder')
|
||||||
|
->pluck('item_id')
|
||||||
|
->toArray();
|
||||||
|
|
||||||
|
$query = [
|
||||||
|
'folder' => [
|
||||||
|
'where' => [
|
||||||
|
'user_id' => $userId,
|
||||||
|
],
|
||||||
|
'whereIn' => [
|
||||||
|
'id' => $parentIds,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'file' => [
|
||||||
|
'where' => [
|
||||||
|
'user_id' => $userId,
|
||||||
|
],
|
||||||
|
'whereIn' => [
|
||||||
|
'id' => $fileIds,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'with' => [
|
||||||
|
'parent',
|
||||||
|
'shared:token,id,item_id,permission,is_protected,expire_in',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
[$foldersTake, $foldersSkip, $filesTake, $filesSkip, $totalEntries] = getRecordsCount($query, $page);
|
||||||
|
|
||||||
|
$folders = Folder::with($query['with'])
|
||||||
|
->where($query['folder']['where'])
|
||||||
|
->whereIn('id', $parentIds, )
|
||||||
|
->sortable()
|
||||||
|
->skip($foldersSkip)
|
||||||
|
->take($foldersTake)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$files = File::with($query['with'])
|
||||||
|
->where($query['file']['where'])
|
||||||
|
->whereIn('id', $fileIds)
|
||||||
|
->sortable()
|
||||||
|
->skip($filesSkip)
|
||||||
|
->take($filesTake)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
// Collect entries
|
||||||
|
$entries = collect([
|
||||||
|
$folders ? json_decode((new FolderCollection($folders))->toJson(), true) : null,
|
||||||
|
$files ? json_decode((new FilesCollection($files))->toJson(), true) : null,
|
||||||
|
])->collapse();
|
||||||
|
|
||||||
|
// Get paginator metadata
|
||||||
|
[$paginate, $links] = formatPaginatorMetadata($totalEntries);
|
||||||
|
|
||||||
|
// Collect folders and files to single array
|
||||||
|
return response()->json([
|
||||||
|
'data' => $entries,
|
||||||
|
'links' => $links,
|
||||||
|
'meta' => [
|
||||||
|
'paginate' => $paginate,
|
||||||
|
'root' => null,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace Domain\Browsing\Controllers;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Domain\Files\Models\File;
|
|
||||||
use Domain\Sharing\Models\Share;
|
|
||||||
use Domain\Folders\Models\Folder;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
|
|
||||||
class BrowseSharedItemsController
|
|
||||||
{
|
|
||||||
public function __invoke(Request $request): array
|
|
||||||
{
|
|
||||||
$user_id = Auth::id();
|
|
||||||
|
|
||||||
// Get shared folders and files
|
|
||||||
$parent_ids = Share::where('user_id', $user_id)
|
|
||||||
->where('type', 'folder')
|
|
||||||
->pluck('item_id');
|
|
||||||
|
|
||||||
$file_ids = Share::where('user_id', $user_id)
|
|
||||||
->where('type', '!=', 'folder')
|
|
||||||
->pluck('item_id');
|
|
||||||
|
|
||||||
// Get folders and files
|
|
||||||
$folders = Folder::with(['parent', 'shared:token,id,item_id,permission,is_protected,expire_in'])
|
|
||||||
->where('user_id', $user_id)
|
|
||||||
->whereIn('id', $parent_ids)
|
|
||||||
->sortable()
|
|
||||||
->get();
|
|
||||||
|
|
||||||
$files = File::with(['parent', 'shared:token,id,item_id,permission,is_protected,expire_in'])
|
|
||||||
->where('user_id', $user_id)
|
|
||||||
->whereIn('id', $file_ids)
|
|
||||||
->sortable()
|
|
||||||
->get();
|
|
||||||
|
|
||||||
list($data, $paginate, $links) = groupPaginate($request, $folders, $files);
|
|
||||||
|
|
||||||
// Collect folders and files to single array
|
|
||||||
return [
|
|
||||||
'data' => $data,
|
|
||||||
'links' => $links,
|
|
||||||
'meta' => [
|
|
||||||
'paginate' => $paginate,
|
|
||||||
'root' => null,
|
|
||||||
],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
<?php
|
|
||||||
namespace Domain\Browsing\Controllers;
|
|
||||||
|
|
||||||
use Str;
|
|
||||||
use Domain\Files\Models\File;
|
|
||||||
use Domain\Folders\Models\Folder;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Domain\Files\Resources\FilesCollection;
|
|
||||||
use Domain\Folders\Resources\FolderCollection;
|
|
||||||
|
|
||||||
class BrowseTrashContentController
|
|
||||||
{
|
|
||||||
public function __invoke(string $id): array
|
|
||||||
{
|
|
||||||
$userId = Auth::id();
|
|
||||||
$rootId = Str::isUuid($id) ? $id : null;
|
|
||||||
|
|
||||||
$requestedFolder = $rootId
|
|
||||||
? Folder::withTrashed()
|
|
||||||
->findOrFail($rootId)
|
|
||||||
: null;
|
|
||||||
|
|
||||||
if ($rootId) {
|
|
||||||
// Get folders and files
|
|
||||||
$folders = Folder::onlyTrashed()
|
|
||||||
->with('parent')
|
|
||||||
->where('parent_id', $rootId)
|
|
||||||
->sortable()
|
|
||||||
->get();
|
|
||||||
|
|
||||||
$files = File::onlyTrashed()
|
|
||||||
->with('parent')
|
|
||||||
->where('parent_id', $rootId)
|
|
||||||
->sortable()
|
|
||||||
->get();
|
|
||||||
|
|
||||||
// Collect folders and files to single array
|
|
||||||
return [
|
|
||||||
'folders' => new FolderCollection($folders),
|
|
||||||
'files' => new FilesCollection($files),
|
|
||||||
'root' => $requestedFolder,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get folders and files
|
|
||||||
$folders_trashed = Folder::onlyTrashed()
|
|
||||||
->with(['trashedFolders', 'parent'])
|
|
||||||
->where('user_id', $userId)
|
|
||||||
->get(['parent_id', 'id', 'name']);
|
|
||||||
|
|
||||||
$folders = Folder::onlyTrashed()
|
|
||||||
->with(['parent'])
|
|
||||||
->where('user_id', $userId)
|
|
||||||
->whereIn('id', filter_folders_ids($folders_trashed))
|
|
||||||
->sortable()
|
|
||||||
->get();
|
|
||||||
|
|
||||||
// Get files trashed
|
|
||||||
$files_trashed = File::onlyTrashed()
|
|
||||||
->with(['parent'])
|
|
||||||
->where('user_id', $userId)
|
|
||||||
->where(function ($query) use ($folders_trashed) {
|
|
||||||
$query->whereNull('parent_id');
|
|
||||||
$query->orWhereNotIn('parent_id', array_values(array_unique(recursiveFind($folders_trashed->toArray(), 'id'))));
|
|
||||||
})
|
|
||||||
->sortable()
|
|
||||||
->get();
|
|
||||||
|
|
||||||
// Collect folders and files to single array
|
|
||||||
return [
|
|
||||||
'folders' => new FolderCollection($folders),
|
|
||||||
'files' => new FilesCollection($files_trashed),
|
|
||||||
'root' => $requestedFolder,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
140
src/Domain/Browsing/Controllers/BrowseTrashController.php
Normal file
140
src/Domain/Browsing/Controllers/BrowseTrashController.php
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
<?php
|
||||||
|
namespace Domain\Browsing\Controllers;
|
||||||
|
|
||||||
|
use Str;
|
||||||
|
use Domain\Files\Models\File;
|
||||||
|
use Domain\Folders\Models\Folder;
|
||||||
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Domain\Files\Resources\FilesCollection;
|
||||||
|
use Domain\Folders\Resources\FolderCollection;
|
||||||
|
|
||||||
|
class BrowseTrashController
|
||||||
|
{
|
||||||
|
public function __invoke(
|
||||||
|
string $id
|
||||||
|
): JsonResponse {
|
||||||
|
$userId = auth()->id();
|
||||||
|
|
||||||
|
$rootId = Str::isUuid($id)
|
||||||
|
? $id
|
||||||
|
: null;
|
||||||
|
|
||||||
|
$requestedFolder = $rootId
|
||||||
|
? Folder::withTrashed()
|
||||||
|
->findOrFail($rootId)
|
||||||
|
: null;
|
||||||
|
|
||||||
|
$page = request()->has('page')
|
||||||
|
? request()->input('page')
|
||||||
|
: 'all';
|
||||||
|
|
||||||
|
// Load trashed folder content
|
||||||
|
if ($rootId) {
|
||||||
|
// Prepare folder & file db query
|
||||||
|
$query = [
|
||||||
|
'folder' => [
|
||||||
|
'where' => [
|
||||||
|
'parent_id' => $rootId,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'file' => [
|
||||||
|
'where' => [
|
||||||
|
'parent_id' => $rootId,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
[$foldersTake, $foldersSkip, $filesTake, $filesSkip, $totalEntries] = getRecordsCount($query, $page);
|
||||||
|
|
||||||
|
// Get folders and files
|
||||||
|
$folders = Folder::onlyTrashed()
|
||||||
|
->with('parent')
|
||||||
|
->where($query['folder']['where'])
|
||||||
|
->sortable()
|
||||||
|
->skip($foldersSkip)
|
||||||
|
->take($foldersTake)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$files = File::onlyTrashed()
|
||||||
|
->with('parent')
|
||||||
|
->where($query['file']['where'])
|
||||||
|
->sortable()
|
||||||
|
->skip($filesSkip)
|
||||||
|
->take($filesTake)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$entries = collect([
|
||||||
|
$folders ? json_decode((new FolderCollection($folders))->toJson(), true) : null,
|
||||||
|
$files ? json_decode((new FilesCollection($files))->toJson(), true) : null,
|
||||||
|
])->collapse();
|
||||||
|
|
||||||
|
[$paginate, $links] = formatPaginatorMetadata($totalEntries);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Load trash root
|
||||||
|
if (! $rootId) {
|
||||||
|
// Get folders and files
|
||||||
|
$folders_trashed = Folder::onlyTrashed()
|
||||||
|
->with(['trashedFolders', 'parent'])
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->get(['parent_id', 'id', 'name']);
|
||||||
|
|
||||||
|
// Prepare folder & file db query
|
||||||
|
$query = [
|
||||||
|
'folder' => [
|
||||||
|
'where' => [
|
||||||
|
'user_id' => $userId,
|
||||||
|
],
|
||||||
|
'whereIn' => [
|
||||||
|
'id' => filter_folders_ids($folders_trashed),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'file' => [
|
||||||
|
'where' => function ($query) use ($folders_trashed, $userId) {
|
||||||
|
$query
|
||||||
|
->where('user_id', $userId)
|
||||||
|
->whereNull('parent_id')
|
||||||
|
->orWhereNotIn('parent_id', array_values(array_unique(recursiveFind($folders_trashed->toArray(), 'id'))));
|
||||||
|
},
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
[$foldersTake, $foldersSkip, $filesTake, $filesSkip, $totalEntries] = getRecordsCount($query, $page, true);
|
||||||
|
|
||||||
|
$folders = Folder::onlyTrashed()
|
||||||
|
->with(['parent'])
|
||||||
|
->where($query['folder']['where'])
|
||||||
|
->whereIn('id', filter_folders_ids($folders_trashed))
|
||||||
|
->sortable()
|
||||||
|
->skip($foldersSkip)
|
||||||
|
->take($foldersTake)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$files = File::onlyTrashed()
|
||||||
|
->with(['parent'])
|
||||||
|
->where($query['file']['where'])
|
||||||
|
->sortable()
|
||||||
|
->skip($filesSkip)
|
||||||
|
->take($filesTake)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
// Collect folders and files to single array
|
||||||
|
$entries = collect([
|
||||||
|
$folders ? json_decode((new FolderCollection($folders))->toJson(), true) : null,
|
||||||
|
$files ? json_decode((new FilesCollection($files))->toJson(), true) : null,
|
||||||
|
])->collapse();
|
||||||
|
|
||||||
|
[$paginate, $links] = formatPaginatorMetadata($totalEntries);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Collect folders and files to single array
|
||||||
|
return response()->json([
|
||||||
|
'data' => $entries,
|
||||||
|
'links' => $links,
|
||||||
|
'meta' => [
|
||||||
|
'paginate' => $paginate,
|
||||||
|
'root' => $requestedFolder,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -35,24 +35,57 @@ class VisitorBrowseFolderController
|
|||||||
// Get requested folder
|
// Get requested folder
|
||||||
$requestedFolder = Folder::findOrFail($id);
|
$requestedFolder = Folder::findOrFail($id);
|
||||||
|
|
||||||
// Get files and folders
|
$page = request()->has('page')
|
||||||
$folders = Folder::where('user_id', $shared->user_id)
|
? request()->input('page')
|
||||||
->where('parent_id', $id)
|
: 'all';
|
||||||
|
|
||||||
|
// Prepare folder & file db query
|
||||||
|
$query = [
|
||||||
|
'folder' => [
|
||||||
|
'where' => [
|
||||||
|
'parent_id' => $id,
|
||||||
|
'user_id' => $shared->user_id,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'file' => [
|
||||||
|
'where' => [
|
||||||
|
'parent_id' => $id,
|
||||||
|
'user_id' => $shared->user_id,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
[$foldersTake, $foldersSkip, $filesTake, $filesSkip, $totalEntries] = getRecordsCount($query, $page);
|
||||||
|
|
||||||
|
$folders = Folder::where($query['folder']['where'])
|
||||||
->sortable()
|
->sortable()
|
||||||
|
->skip($foldersSkip)
|
||||||
|
->take($foldersTake)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$files = File::where('user_id', $shared->user_id)
|
$files = File::where($query['file']['where'])
|
||||||
->where('parent_id', $id)
|
|
||||||
->sortable()
|
->sortable()
|
||||||
|
->skip($filesSkip)
|
||||||
|
->take($filesTake)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
// Set thumbnail links for public files
|
// Set thumbnail links for public files
|
||||||
$files->map(fn ($file) => $file->setSharedPublicUrl($shared->token));
|
$files->map(fn ($file) => $file->setSharedPublicUrl($shared->token));
|
||||||
|
|
||||||
|
$entries = collect([
|
||||||
|
$folders ? json_decode((new FolderCollection($folders))->toJson(), true) : null,
|
||||||
|
$files ? json_decode((new FilesCollection($files))->toJson(), true) : null,
|
||||||
|
])->collapse();
|
||||||
|
|
||||||
|
[$paginate, $links] = formatPaginatorMetadata($totalEntries);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'folders' => new FolderCollection($folders),
|
'data' => $entries,
|
||||||
'files' => new FilesCollection($files),
|
'links' => $links,
|
||||||
'root' => new FolderResource($requestedFolder),
|
'meta' => [
|
||||||
|
'paginate' => $paginate,
|
||||||
|
'root' => new FolderResource($requestedFolder),
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ namespace Domain\Files\Controllers;
|
|||||||
use Gate;
|
use Gate;
|
||||||
use Domain\Files\Models\File;
|
use Domain\Files\Models\File;
|
||||||
use Domain\Sharing\Models\Share;
|
use Domain\Sharing\Models\Share;
|
||||||
use Illuminate\Auth\Access\AuthorizationException;
|
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Domain\Files\Resources\FileResource;
|
use Domain\Files\Resources\FileResource;
|
||||||
|
use Illuminate\Auth\Access\AuthorizationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get shared file record
|
* Get shared file record
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ namespace Domain\Invoices\Controllers;
|
|||||||
use Domain\Settings\Models\Setting;
|
use Domain\Settings\Models\Setting;
|
||||||
use Illuminate\Contracts\View\View;
|
use Illuminate\Contracts\View\View;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Contracts\View\Factory;
|
|
||||||
use Illuminate\Contracts\Foundation\Application;
|
|
||||||
use App\Users\Actions\FormatUsageEstimatesAction;
|
use App\Users\Actions\FormatUsageEstimatesAction;
|
||||||
use VueFileManager\Subscription\Domain\Transactions\Models\Transaction;
|
use VueFileManager\Subscription\Domain\Transactions\Models\Transaction;
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
namespace Domain\RemoteUpload\Controllers;
|
namespace Domain\RemoteUpload\Controllers;
|
||||||
|
|
||||||
use Domain\Folders\Models\Folder;
|
use Domain\Folders\Models\Folder;
|
||||||
|
use Illuminate\Http\JsonResponse;
|
||||||
use Domain\UploadRequest\Models\UploadRequest;
|
use Domain\UploadRequest\Models\UploadRequest;
|
||||||
use Domain\RemoteUpload\Requests\RemoteUploadRequest;
|
use Domain\RemoteUpload\Requests\RemoteUploadRequest;
|
||||||
use Domain\RemoteUpload\Actions\GetContentFromExternalSource;
|
use Domain\RemoteUpload\Actions\GetContentFromExternalSource;
|
||||||
use Domain\UploadRequest\Actions\CreateUploadRequestRootFolderAction;
|
use Domain\UploadRequest\Actions\CreateUploadRequestRootFolderAction;
|
||||||
use Illuminate\Http\JsonResponse;
|
|
||||||
|
|
||||||
class UploadFilesRemotelyForUploadRequestController
|
class UploadFilesRemotelyForUploadRequestController
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Domain\Settings\Controllers;
|
namespace Domain\Settings\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Domain\Settings\Controllers;
|
namespace Domain\Settings\Controllers;
|
||||||
|
|
||||||
use Domain\Settings\Events\TestWebsocketConnectionEvent;
|
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
|
use Domain\Settings\Events\TestWebsocketConnectionEvent;
|
||||||
|
|
||||||
class TestWebsocketConnectionController
|
class TestWebsocketConnectionController
|
||||||
{
|
{
|
||||||
@@ -14,8 +13,8 @@ class TestWebsocketConnectionController
|
|||||||
);
|
);
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'type' => 'success',
|
'type' => 'success',
|
||||||
'message' => 'The websocket test event was successfully dispatched.',
|
'message' => 'The websocket test event was successfully dispatched.',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ class StoreAppSettingsController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'type' => 'success',
|
'type' => 'success',
|
||||||
'message' => 'The app settings was set successfully',
|
'message' => 'The app settings was set successfully',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ namespace Domain\SetupWizard\Controllers;
|
|||||||
use DB;
|
use DB;
|
||||||
use Artisan;
|
use Artisan;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Doctrine\DBAL\Driver\PDOException;
|
use Doctrine\DBAL\Driver\PDOException;
|
||||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ class StoreEnvironmentSettingsController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'type' => 'success',
|
'type' => 'success',
|
||||||
'message' => 'The environment was set successfully',
|
'message' => 'The environment was set successfully',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,55 +6,125 @@ use Gate;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Domain\Files\Models\File;
|
use Domain\Files\Models\File;
|
||||||
use Domain\Folders\Models\Folder;
|
use Domain\Folders\Models\Folder;
|
||||||
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Domain\Files\Resources\FilesCollection;
|
||||||
use Domain\Folders\Resources\FolderResource;
|
use Domain\Folders\Resources\FolderResource;
|
||||||
|
use Domain\Folders\Resources\FolderCollection;
|
||||||
|
|
||||||
class BrowseSharedWithMeController
|
class BrowseSharedWithMeController
|
||||||
{
|
{
|
||||||
public function __invoke(Request $request, $id): array
|
public function __invoke(
|
||||||
{
|
Request $request,
|
||||||
$id = Str::isUuid($id) ? $id : null;
|
string $id,
|
||||||
|
): JsonResponse {
|
||||||
|
// Get root ID
|
||||||
|
$id = Str::isUuid($id)
|
||||||
|
? $id
|
||||||
|
: null;
|
||||||
|
|
||||||
|
// Get page number
|
||||||
|
$page = request()->has('page')
|
||||||
|
? request()->input('page')
|
||||||
|
: 'all';
|
||||||
|
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$teamFolder = Folder::findOrFail($id)->getLatestParent();
|
[$teamFolder, $folders, $files, $totalEntries] = $this->getSingleSharedWithMeFolderContent($id, $page);
|
||||||
|
} else {
|
||||||
if (! Gate::any(['can-edit', 'can-view'], [$teamFolder, null])) {
|
[$folders, $files, $totalEntries] = $this->getRootFolders($page);
|
||||||
abort(403, 'Access Denied');
|
|
||||||
}
|
|
||||||
|
|
||||||
$folders = Folder::with(['parent:id,name'])
|
|
||||||
->where('parent_id', $id)
|
|
||||||
->sortable()
|
|
||||||
->get();
|
|
||||||
|
|
||||||
$files = File::with(['parent:id,name'])
|
|
||||||
->where('parent_id', $id)
|
|
||||||
->sortable()
|
|
||||||
->get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $id) {
|
// Get paginator data
|
||||||
$sharedFolderIds = DB::table('team_folder_members')
|
[$paginate, $links] = formatPaginatorMetadata($totalEntries);
|
||||||
->where('user_id', Auth::id())
|
|
||||||
->whereIn('permission', ['can-edit', 'can-view'])
|
|
||||||
->pluck('parent_id');
|
|
||||||
|
|
||||||
$folders = Folder::whereIn('id', $sharedFolderIds)
|
// Collect entries
|
||||||
->sortable()
|
$entries = collect([
|
||||||
->get();
|
$folders ? json_decode((new FolderCollection($folders))->toJson(), true) : null,
|
||||||
|
$files ? json_decode((new FilesCollection($files))->toJson(), true) : null,
|
||||||
|
])->collapse();
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'data' => $entries,
|
||||||
|
'links' => $links,
|
||||||
|
'meta' => [
|
||||||
|
'paginate' => $paginate,
|
||||||
|
'teamFolder' => $id
|
||||||
|
? new FolderResource($teamFolder)
|
||||||
|
: null,
|
||||||
|
'root' => $id
|
||||||
|
? new FolderResource(Folder::findOrFail($id))
|
||||||
|
: null,
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getRootFolders(mixed $page): array
|
||||||
|
{
|
||||||
|
$entriesPerPage = config('vuefilemanager.paginate.perPage');
|
||||||
|
|
||||||
|
$sharedFolderIds = DB::table('team_folder_members')
|
||||||
|
->where('user_id', auth()->id())
|
||||||
|
->whereIn('permission', ['can-edit', 'can-view'])
|
||||||
|
->pluck('parent_id');
|
||||||
|
|
||||||
|
$folders = Folder::whereIn('id', $sharedFolderIds)
|
||||||
|
->sortable()
|
||||||
|
->skip($entriesPerPage * ($page - 1))
|
||||||
|
->take($entriesPerPage)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$totalEntries = DB::table('folders')
|
||||||
|
->whereIn('id', $sharedFolderIds)
|
||||||
|
->count();
|
||||||
|
|
||||||
|
$files = null;
|
||||||
|
|
||||||
|
return [$folders, $files, $totalEntries];
|
||||||
|
}
|
||||||
|
|
||||||
|
private function getSingleSharedWithMeFolderContent(string|null $id, mixed $page): array
|
||||||
|
{
|
||||||
|
$teamFolder = Folder::findOrFail($id)
|
||||||
|
->getLatestParent();
|
||||||
|
|
||||||
|
if (! Gate::any(['can-edit', 'can-view'], [$teamFolder, null])) {
|
||||||
|
abort(
|
||||||
|
response()->json(accessDeniedError(), 403)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
list($data, $paginate, $links) = groupPaginate($request, $folders, $files ?? null);
|
$query = [
|
||||||
|
'folder' => [
|
||||||
return [
|
'where' => [
|
||||||
'data' => $data,
|
'parent_id' => $id,
|
||||||
'teamFolder' => $id ? new FolderResource($teamFolder) : null,
|
],
|
||||||
'links' => $links,
|
],
|
||||||
'meta' => [
|
'file' => [
|
||||||
'paginate' => $paginate,
|
'where' => [
|
||||||
'root' => $id ? new FolderResource(Folder::findOrFail($id)) : null,
|
'parent_id' => $id,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'with' => [
|
||||||
|
'parent:id,name',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
[$foldersTake, $foldersSkip, $filesTake, $filesSkip, $totalEntries] = getRecordsCount($query, $page);
|
||||||
|
|
||||||
|
$folders = Folder::with($query['with'])
|
||||||
|
->where($query['folder']['where'])
|
||||||
|
->sortable()
|
||||||
|
->skip($foldersSkip)
|
||||||
|
->take($foldersTake)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
$files = File::with($query['with'])
|
||||||
|
->where($query['file']['where'])
|
||||||
|
->sortable()
|
||||||
|
->skip($filesSkip)
|
||||||
|
->take($filesTake)
|
||||||
|
->get();
|
||||||
|
|
||||||
|
return [$teamFolder, $folders, $files, $totalEntries];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
namespace Domain\Teams\Controllers;
|
namespace Domain\Teams\Controllers;
|
||||||
|
|
||||||
use Domain\Folders\Models\Folder;
|
use Domain\Folders\Models\Folder;
|
||||||
use Illuminate\Auth\Access\AuthorizationException;
|
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
use Domain\Teams\Models\TeamFolderMember;
|
use Domain\Teams\Models\TeamFolderMember;
|
||||||
use Domain\Folders\Resources\FolderResource;
|
use Domain\Folders\Resources\FolderResource;
|
||||||
|
use Illuminate\Auth\Access\AuthorizationException;
|
||||||
use Domain\Teams\Requests\ConvertIntoTeamFolderRequest;
|
use Domain\Teams\Requests\ConvertIntoTeamFolderRequest;
|
||||||
use Domain\Teams\Actions\InviteMembersIntoTeamFolderAction;
|
use Domain\Teams\Actions\InviteMembersIntoTeamFolderAction;
|
||||||
use Domain\Teams\Actions\SetTeamFolderPropertyForAllChildrenAction;
|
use Domain\Teams\Actions\SetTeamFolderPropertyForAllChildrenAction;
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
namespace Domain\Teams\Controllers;
|
namespace Domain\Teams\Controllers;
|
||||||
|
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Domain\Files\Models\File;
|
use Domain\Files\Models\File;
|
||||||
use Domain\Folders\Models\Folder;
|
use Domain\Folders\Models\Folder;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Domain\Teams\Models\TeamFolderMember;
|
use Domain\Teams\Models\TeamFolderMember;
|
||||||
use Domain\Teams\DTO\CreateTeamFolderData;
|
use Domain\Teams\DTO\CreateTeamFolderData;
|
||||||
|
use Domain\Files\Resources\FilesCollection;
|
||||||
use Domain\Folders\Resources\FolderResource;
|
use Domain\Folders\Resources\FolderResource;
|
||||||
use Domain\Teams\Actions\UpdateMembersAction;
|
use Domain\Teams\Actions\UpdateMembersAction;
|
||||||
|
use Domain\Folders\Resources\FolderCollection;
|
||||||
use Domain\Teams\Actions\UpdateInvitationsAction;
|
use Domain\Teams\Actions\UpdateInvitationsAction;
|
||||||
use Domain\Teams\Requests\CreateTeamFolderRequest;
|
use Domain\Teams\Requests\CreateTeamFolderRequest;
|
||||||
use Domain\Teams\Requests\UpdateTeamFolderMembersRequest;
|
use Domain\Teams\Requests\UpdateTeamFolderMembersRequest;
|
||||||
@@ -27,41 +27,97 @@ class TeamFoldersController extends Controller
|
|||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function show(Request $request, $id): array
|
public function show($id): JsonResponse
|
||||||
{
|
{
|
||||||
$id = Str::isUuid($id) ? $id : null;
|
// Get root ID
|
||||||
|
$id = Str::isUuid($id)
|
||||||
|
? $id
|
||||||
|
: null;
|
||||||
|
|
||||||
|
// Get page number
|
||||||
|
$page = request()->has('page')
|
||||||
|
? request()->input('page')
|
||||||
|
: 'all';
|
||||||
|
|
||||||
|
$entriesPerPage = config('vuefilemanager.paginate.perPage');
|
||||||
|
|
||||||
|
// TODO: check privileges
|
||||||
|
|
||||||
if ($id) {
|
if ($id) {
|
||||||
$folders = Folder::where('parent_id', $id)
|
$query = [
|
||||||
->where('team_folder', true)
|
'folder' => [
|
||||||
|
'where' => [
|
||||||
|
'parent_id' => $id,
|
||||||
|
'team_folder' => true,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'file' => [
|
||||||
|
'where' => [
|
||||||
|
'parent_id' => $id,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'with' => [
|
||||||
|
'parent:id,name',
|
||||||
|
'shared:token,id,item_id,permission,is_protected,expire_in',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
[$foldersTake, $foldersSkip, $filesTake, $filesSkip, $totalEntries] = getRecordsCount($query, $page);
|
||||||
|
|
||||||
|
$folders = Folder::with($query['with'])
|
||||||
|
->where($query['folder']['where'])
|
||||||
->sortable()
|
->sortable()
|
||||||
|
->skip($foldersSkip)
|
||||||
|
->take($foldersTake)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
$files = File::where('parent_id', $id)
|
$files = File::with($query['with'])
|
||||||
|
->where($query['file']['where'])
|
||||||
->sortable()
|
->sortable()
|
||||||
|
->skip($filesSkip)
|
||||||
|
->take($filesTake)
|
||||||
->get();
|
->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $id) {
|
if (! $id) {
|
||||||
$folders = Folder::where('parent_id', null)
|
$folders = Folder::where('parent_id', null)
|
||||||
->where('team_folder', true)
|
->where('team_folder', true)
|
||||||
->where('user_id', Auth::id())
|
->where('user_id', auth()->id())
|
||||||
->sortable()
|
->sortable()
|
||||||
|
->skip($entriesPerPage * ($page - 1))
|
||||||
|
->take($entriesPerPage)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
$totalEntries = DB::table('folders')
|
||||||
|
->where('parent_id', null)
|
||||||
|
->where('team_folder', true)
|
||||||
|
->where('user_id', auth()->id())
|
||||||
|
->count();
|
||||||
|
|
||||||
|
$files = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
list($data, $paginate, $links) = groupPaginate($request, $folders, $files ?? null);
|
[$paginate, $links] = formatPaginatorMetadata($totalEntries);
|
||||||
|
|
||||||
|
$entries = collect([
|
||||||
|
$folders ? json_decode((new FolderCollection($folders))->toJson(), true) : null,
|
||||||
|
$files ? json_decode((new FilesCollection($files))->toJson(), true) : null,
|
||||||
|
])->collapse();
|
||||||
|
|
||||||
// Collect folders and files to single array
|
// Collect folders and files to single array
|
||||||
return [
|
return response()->json([
|
||||||
'data' => $data,
|
'data' => $entries,
|
||||||
'teamFolder' => $id ? new FolderResource(Folder::findOrFail($id)->getLatestParent()) : null,
|
|
||||||
'links' => $links,
|
'links' => $links,
|
||||||
'meta' => [
|
'meta' => [
|
||||||
'paginate' => $paginate,
|
'paginate' => $paginate,
|
||||||
'root' => $id ? new FolderResource(Folder::findOrFail($id)) : null,
|
'teamFolder' => $id
|
||||||
|
? new FolderResource(Folder::findOrFail($id)->getLatestParent())
|
||||||
|
: null,
|
||||||
|
'root' => $id
|
||||||
|
? new FolderResource(Folder::findOrFail($id))
|
||||||
|
: null,
|
||||||
],
|
],
|
||||||
];
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function store(
|
public function store(
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
namespace Domain\Transactions\Controllers;
|
namespace Domain\Transactions\Controllers;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Http\JsonResponse;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Domain\Transactions\Resources\TransactionCollection;
|
use Domain\Transactions\Resources\TransactionCollection;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace Domain\UploadRequest\Controllers;
|
|||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Domain\Files\Models\File;
|
use Domain\Files\Models\File;
|
||||||
use Domain\Folders\Models\Folder;
|
use Domain\Folders\Models\Folder;
|
||||||
|
use Illuminate\Http\JsonResponse;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Domain\Files\Resources\FilesCollection;
|
use Domain\Files\Resources\FilesCollection;
|
||||||
use Domain\Folders\Resources\FolderResource;
|
use Domain\Folders\Resources\FolderResource;
|
||||||
@@ -12,9 +13,13 @@ use Domain\UploadRequest\Models\UploadRequest;
|
|||||||
|
|
||||||
class BrowseUploadRequestController extends Controller
|
class BrowseUploadRequestController extends Controller
|
||||||
{
|
{
|
||||||
public function __invoke(UploadRequest $uploadRequest, $id): array
|
public function __invoke(
|
||||||
{
|
UploadRequest $uploadRequest,
|
||||||
$rootId = Str::isUuid($id) ? $id : $uploadRequest->id;
|
string $id,
|
||||||
|
): JsonResponse {
|
||||||
|
$rootId = Str::isUuid($id)
|
||||||
|
? $id
|
||||||
|
: $uploadRequest->id;
|
||||||
|
|
||||||
$folders = Folder::with(['parent:id,name'])
|
$folders = Folder::with(['parent:id,name'])
|
||||||
->where('parent_id', $rootId)
|
->where('parent_id', $rootId)
|
||||||
@@ -30,11 +35,16 @@ class BrowseUploadRequestController extends Controller
|
|||||||
->get()
|
->get()
|
||||||
->each(fn ($file) => $file->setUploadRequestPublicUrl($uploadRequest->id));
|
->each(fn ($file) => $file->setUploadRequestPublicUrl($uploadRequest->id));
|
||||||
|
|
||||||
// Collect folders and files to single array
|
$entries = collect([
|
||||||
return [
|
$folders ? json_decode((new FolderCollection($folders))->toJson(), true) : null,
|
||||||
'folders' => new FolderCollection($folders),
|
$files ? json_decode((new FilesCollection($files))->toJson(), true) : null,
|
||||||
'files' => new FilesCollection($files),
|
])->collapse();
|
||||||
'root' => new FolderResource(Folder::find($rootId)),
|
|
||||||
];
|
return response()->json([
|
||||||
|
'data' => $entries,
|
||||||
|
'meta' => [
|
||||||
|
'root' => new FolderResource(Folder::find($rootId)),
|
||||||
|
],
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Domain\UploadRequest\Controllers;
|
namespace Domain\UploadRequest\Controllers;
|
||||||
|
|
||||||
use App\Users\Models\User;
|
|
||||||
use Gate;
|
use Gate;
|
||||||
use Notification;
|
use Notification;
|
||||||
|
use App\Users\Models\User;
|
||||||
use Domain\Folders\Models\Folder;
|
use Domain\Folders\Models\Folder;
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Domain\UploadRequest\Controllers;
|
namespace Domain\UploadRequest\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\JsonResponse;
|
|
||||||
use Domain\Folders\Models\Folder;
|
use Domain\Folders\Models\Folder;
|
||||||
|
use Illuminate\Http\JsonResponse;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Domain\UploadRequest\Models\UploadRequest;
|
use Domain\UploadRequest\Models\UploadRequest;
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class MoveItemInUploadRequestController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$item->update([
|
$item->update([
|
||||||
'parent_id' => $request->input('to_id') ?? $uploadRequest->id
|
'parent_id' => $request->input('to_id') ?? $uploadRequest->id,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Domain\UploadRequest\Controllers;
|
namespace Domain\UploadRequest\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\JsonResponse;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Domain\Files\Resources\FileResource;
|
use Domain\Files\Resources\FileResource;
|
||||||
use Domain\Folders\Resources\FolderResource;
|
use Domain\Folders\Resources\FolderResource;
|
||||||
use Domain\Items\Requests\RenameItemRequest;
|
use Domain\Items\Requests\RenameItemRequest;
|
||||||
use Domain\UploadRequest\Models\UploadRequest;
|
use Domain\UploadRequest\Models\UploadRequest;
|
||||||
use Domain\Folders\Actions\UpdateFolderPropertyAction;
|
use Domain\Folders\Actions\UpdateFolderPropertyAction;
|
||||||
use Illuminate\Http\JsonResponse;
|
|
||||||
use Support\Demo\Actions\FakeRenameFileOrFolderAction;
|
use Support\Demo\Actions\FakeRenameFileOrFolderAction;
|
||||||
|
|
||||||
class RenameFileOrFolderController extends Controller
|
class RenameFileOrFolderController extends Controller
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class UploadRequestNotification extends Notification implements ShouldQueue
|
|||||||
'type' => 'url',
|
'type' => 'url',
|
||||||
'params' => [
|
'params' => [
|
||||||
'target' => 'blank',
|
'target' => 'blank',
|
||||||
'url' => url("/request/{$this->uploadRequest->id}/upload"),
|
'url' => url("/request/{$this->uploadRequest->id}/upload"),
|
||||||
'button' => __t('upload_files'),
|
'button' => __t('upload_files'),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ if (! function_exists('get_settings')) {
|
|||||||
/**
|
/**
|
||||||
* Get single or multiple values from settings table
|
* Get single or multiple values from settings table
|
||||||
*/
|
*/
|
||||||
function get_settings(array | string $setting): Collection | string | null
|
function get_settings(array|string $setting): Collection|string|null
|
||||||
{
|
{
|
||||||
if (is_array($setting)) {
|
if (is_array($setting)) {
|
||||||
return Setting::whereIn('name', $setting)
|
return Setting::whereIn('name', $setting)
|
||||||
@@ -851,103 +851,103 @@ if (! function_exists('remove_accents')) {
|
|||||||
if (seems_utf8($string)) {
|
if (seems_utf8($string)) {
|
||||||
$chars = [
|
$chars = [
|
||||||
// Decompositions for Latin-1 Supplement
|
// Decompositions for Latin-1 Supplement
|
||||||
chr(195) . chr(128) => 'A', chr(195) . chr(129) => 'A',
|
chr(195) . chr(128) => 'A', chr(195) . chr(129) => 'A',
|
||||||
chr(195) . chr(130) => 'A', chr(195) . chr(131) => 'A',
|
chr(195) . chr(130) => 'A', chr(195) . chr(131) => 'A',
|
||||||
chr(195) . chr(132) => 'A', chr(195) . chr(133) => 'A',
|
chr(195) . chr(132) => 'A', chr(195) . chr(133) => 'A',
|
||||||
chr(195) . chr(135) => 'C', chr(195) . chr(136) => 'E',
|
chr(195) . chr(135) => 'C', chr(195) . chr(136) => 'E',
|
||||||
chr(195) . chr(137) => 'E', chr(195) . chr(138) => 'E',
|
chr(195) . chr(137) => 'E', chr(195) . chr(138) => 'E',
|
||||||
chr(195) . chr(139) => 'E', chr(195) . chr(140) => 'I',
|
chr(195) . chr(139) => 'E', chr(195) . chr(140) => 'I',
|
||||||
chr(195) . chr(141) => 'I', chr(195) . chr(142) => 'I',
|
chr(195) . chr(141) => 'I', chr(195) . chr(142) => 'I',
|
||||||
chr(195) . chr(143) => 'I', chr(195) . chr(145) => 'N',
|
chr(195) . chr(143) => 'I', chr(195) . chr(145) => 'N',
|
||||||
chr(195) . chr(146) => 'O', chr(195) . chr(147) => 'O',
|
chr(195) . chr(146) => 'O', chr(195) . chr(147) => 'O',
|
||||||
chr(195) . chr(148) => 'O', chr(195) . chr(149) => 'O',
|
chr(195) . chr(148) => 'O', chr(195) . chr(149) => 'O',
|
||||||
chr(195) . chr(150) => 'O', chr(195) . chr(153) => 'U',
|
chr(195) . chr(150) => 'O', chr(195) . chr(153) => 'U',
|
||||||
chr(195) . chr(154) => 'U', chr(195) . chr(155) => 'U',
|
chr(195) . chr(154) => 'U', chr(195) . chr(155) => 'U',
|
||||||
chr(195) . chr(156) => 'U', chr(195) . chr(157) => 'Y',
|
chr(195) . chr(156) => 'U', chr(195) . chr(157) => 'Y',
|
||||||
chr(195) . chr(159) => 's', chr(195) . chr(160) => 'a',
|
chr(195) . chr(159) => 's', chr(195) . chr(160) => 'a',
|
||||||
chr(195) . chr(161) => 'a', chr(195) . chr(162) => 'a',
|
chr(195) . chr(161) => 'a', chr(195) . chr(162) => 'a',
|
||||||
chr(195) . chr(163) => 'a', chr(195) . chr(164) => 'a',
|
chr(195) . chr(163) => 'a', chr(195) . chr(164) => 'a',
|
||||||
chr(195) . chr(165) => 'a', chr(195) . chr(167) => 'c',
|
chr(195) . chr(165) => 'a', chr(195) . chr(167) => 'c',
|
||||||
chr(195) . chr(168) => 'e', chr(195) . chr(169) => 'e',
|
chr(195) . chr(168) => 'e', chr(195) . chr(169) => 'e',
|
||||||
chr(195) . chr(170) => 'e', chr(195) . chr(171) => 'e',
|
chr(195) . chr(170) => 'e', chr(195) . chr(171) => 'e',
|
||||||
chr(195) . chr(172) => 'i', chr(195) . chr(173) => 'i',
|
chr(195) . chr(172) => 'i', chr(195) . chr(173) => 'i',
|
||||||
chr(195) . chr(174) => 'i', chr(195) . chr(175) => 'i',
|
chr(195) . chr(174) => 'i', chr(195) . chr(175) => 'i',
|
||||||
chr(195) . chr(177) => 'n', chr(195) . chr(178) => 'o',
|
chr(195) . chr(177) => 'n', chr(195) . chr(178) => 'o',
|
||||||
chr(195) . chr(179) => 'o', chr(195) . chr(180) => 'o',
|
chr(195) . chr(179) => 'o', chr(195) . chr(180) => 'o',
|
||||||
chr(195) . chr(181) => 'o', chr(195) . chr(182) => 'o',
|
chr(195) . chr(181) => 'o', chr(195) . chr(182) => 'o',
|
||||||
chr(195) . chr(182) => 'o', chr(195) . chr(185) => 'u',
|
chr(195) . chr(182) => 'o', chr(195) . chr(185) => 'u',
|
||||||
chr(195) . chr(186) => 'u', chr(195) . chr(187) => 'u',
|
chr(195) . chr(186) => 'u', chr(195) . chr(187) => 'u',
|
||||||
chr(195) . chr(188) => 'u', chr(195) . chr(189) => 'y',
|
chr(195) . chr(188) => 'u', chr(195) . chr(189) => 'y',
|
||||||
chr(195) . chr(191) => 'y',
|
chr(195) . chr(191) => 'y',
|
||||||
// Decompositions for Latin Extended-A
|
// Decompositions for Latin Extended-A
|
||||||
chr(196) . chr(128) => 'A', chr(196) . chr(129) => 'a',
|
chr(196) . chr(128) => 'A', chr(196) . chr(129) => 'a',
|
||||||
chr(196) . chr(130) => 'A', chr(196) . chr(131) => 'a',
|
chr(196) . chr(130) => 'A', chr(196) . chr(131) => 'a',
|
||||||
chr(196) . chr(132) => 'A', chr(196) . chr(133) => 'a',
|
chr(196) . chr(132) => 'A', chr(196) . chr(133) => 'a',
|
||||||
chr(196) . chr(134) => 'C', chr(196) . chr(135) => 'c',
|
chr(196) . chr(134) => 'C', chr(196) . chr(135) => 'c',
|
||||||
chr(196) . chr(136) => 'C', chr(196) . chr(137) => 'c',
|
chr(196) . chr(136) => 'C', chr(196) . chr(137) => 'c',
|
||||||
chr(196) . chr(138) => 'C', chr(196) . chr(139) => 'c',
|
chr(196) . chr(138) => 'C', chr(196) . chr(139) => 'c',
|
||||||
chr(196) . chr(140) => 'C', chr(196) . chr(141) => 'c',
|
chr(196) . chr(140) => 'C', chr(196) . chr(141) => 'c',
|
||||||
chr(196) . chr(142) => 'D', chr(196) . chr(143) => 'd',
|
chr(196) . chr(142) => 'D', chr(196) . chr(143) => 'd',
|
||||||
chr(196) . chr(144) => 'D', chr(196) . chr(145) => 'd',
|
chr(196) . chr(144) => 'D', chr(196) . chr(145) => 'd',
|
||||||
chr(196) . chr(146) => 'E', chr(196) . chr(147) => 'e',
|
chr(196) . chr(146) => 'E', chr(196) . chr(147) => 'e',
|
||||||
chr(196) . chr(148) => 'E', chr(196) . chr(149) => 'e',
|
chr(196) . chr(148) => 'E', chr(196) . chr(149) => 'e',
|
||||||
chr(196) . chr(150) => 'E', chr(196) . chr(151) => 'e',
|
chr(196) . chr(150) => 'E', chr(196) . chr(151) => 'e',
|
||||||
chr(196) . chr(152) => 'E', chr(196) . chr(153) => 'e',
|
chr(196) . chr(152) => 'E', chr(196) . chr(153) => 'e',
|
||||||
chr(196) . chr(154) => 'E', chr(196) . chr(155) => 'e',
|
chr(196) . chr(154) => 'E', chr(196) . chr(155) => 'e',
|
||||||
chr(196) . chr(156) => 'G', chr(196) . chr(157) => 'g',
|
chr(196) . chr(156) => 'G', chr(196) . chr(157) => 'g',
|
||||||
chr(196) . chr(158) => 'G', chr(196) . chr(159) => 'g',
|
chr(196) . chr(158) => 'G', chr(196) . chr(159) => 'g',
|
||||||
chr(196) . chr(160) => 'G', chr(196) . chr(161) => 'g',
|
chr(196) . chr(160) => 'G', chr(196) . chr(161) => 'g',
|
||||||
chr(196) . chr(162) => 'G', chr(196) . chr(163) => 'g',
|
chr(196) . chr(162) => 'G', chr(196) . chr(163) => 'g',
|
||||||
chr(196) . chr(164) => 'H', chr(196) . chr(165) => 'h',
|
chr(196) . chr(164) => 'H', chr(196) . chr(165) => 'h',
|
||||||
chr(196) . chr(166) => 'H', chr(196) . chr(167) => 'h',
|
chr(196) . chr(166) => 'H', chr(196) . chr(167) => 'h',
|
||||||
chr(196) . chr(168) => 'I', chr(196) . chr(169) => 'i',
|
chr(196) . chr(168) => 'I', chr(196) . chr(169) => 'i',
|
||||||
chr(196) . chr(170) => 'I', chr(196) . chr(171) => 'i',
|
chr(196) . chr(170) => 'I', chr(196) . chr(171) => 'i',
|
||||||
chr(196) . chr(172) => 'I', chr(196) . chr(173) => 'i',
|
chr(196) . chr(172) => 'I', chr(196) . chr(173) => 'i',
|
||||||
chr(196) . chr(174) => 'I', chr(196) . chr(175) => 'i',
|
chr(196) . chr(174) => 'I', chr(196) . chr(175) => 'i',
|
||||||
chr(196) . chr(176) => 'I', chr(196) . chr(177) => 'i',
|
chr(196) . chr(176) => 'I', chr(196) . chr(177) => 'i',
|
||||||
chr(196) . chr(178) => 'IJ', chr(196) . chr(179) => 'ij',
|
chr(196) . chr(178) => 'IJ', chr(196) . chr(179) => 'ij',
|
||||||
chr(196) . chr(180) => 'J', chr(196) . chr(181) => 'j',
|
chr(196) . chr(180) => 'J', chr(196) . chr(181) => 'j',
|
||||||
chr(196) . chr(182) => 'K', chr(196) . chr(183) => 'k',
|
chr(196) . chr(182) => 'K', chr(196) . chr(183) => 'k',
|
||||||
chr(196) . chr(184) => 'k', chr(196) . chr(185) => 'L',
|
chr(196) . chr(184) => 'k', chr(196) . chr(185) => 'L',
|
||||||
chr(196) . chr(186) => 'l', chr(196) . chr(187) => 'L',
|
chr(196) . chr(186) => 'l', chr(196) . chr(187) => 'L',
|
||||||
chr(196) . chr(188) => 'l', chr(196) . chr(189) => 'L',
|
chr(196) . chr(188) => 'l', chr(196) . chr(189) => 'L',
|
||||||
chr(196) . chr(190) => 'l', chr(196) . chr(191) => 'L',
|
chr(196) . chr(190) => 'l', chr(196) . chr(191) => 'L',
|
||||||
chr(197) . chr(128) => 'l', chr(197) . chr(129) => 'L',
|
chr(197) . chr(128) => 'l', chr(197) . chr(129) => 'L',
|
||||||
chr(197) . chr(130) => 'l', chr(197) . chr(131) => 'N',
|
chr(197) . chr(130) => 'l', chr(197) . chr(131) => 'N',
|
||||||
chr(197) . chr(132) => 'n', chr(197) . chr(133) => 'N',
|
chr(197) . chr(132) => 'n', chr(197) . chr(133) => 'N',
|
||||||
chr(197) . chr(134) => 'n', chr(197) . chr(135) => 'N',
|
chr(197) . chr(134) => 'n', chr(197) . chr(135) => 'N',
|
||||||
chr(197) . chr(136) => 'n', chr(197) . chr(137) => 'N',
|
chr(197) . chr(136) => 'n', chr(197) . chr(137) => 'N',
|
||||||
chr(197) . chr(138) => 'n', chr(197) . chr(139) => 'N',
|
chr(197) . chr(138) => 'n', chr(197) . chr(139) => 'N',
|
||||||
chr(197) . chr(140) => 'O', chr(197) . chr(141) => 'o',
|
chr(197) . chr(140) => 'O', chr(197) . chr(141) => 'o',
|
||||||
chr(197) . chr(142) => 'O', chr(197) . chr(143) => 'o',
|
chr(197) . chr(142) => 'O', chr(197) . chr(143) => 'o',
|
||||||
chr(197) . chr(144) => 'O', chr(197) . chr(145) => 'o',
|
chr(197) . chr(144) => 'O', chr(197) . chr(145) => 'o',
|
||||||
chr(197) . chr(146) => 'OE', chr(197) . chr(147) => 'oe',
|
chr(197) . chr(146) => 'OE', chr(197) . chr(147) => 'oe',
|
||||||
chr(197) . chr(148) => 'R', chr(197) . chr(149) => 'r',
|
chr(197) . chr(148) => 'R', chr(197) . chr(149) => 'r',
|
||||||
chr(197) . chr(150) => 'R', chr(197) . chr(151) => 'r',
|
chr(197) . chr(150) => 'R', chr(197) . chr(151) => 'r',
|
||||||
chr(197) . chr(152) => 'R', chr(197) . chr(153) => 'r',
|
chr(197) . chr(152) => 'R', chr(197) . chr(153) => 'r',
|
||||||
chr(197) . chr(154) => 'S', chr(197) . chr(155) => 's',
|
chr(197) . chr(154) => 'S', chr(197) . chr(155) => 's',
|
||||||
chr(197) . chr(156) => 'S', chr(197) . chr(157) => 's',
|
chr(197) . chr(156) => 'S', chr(197) . chr(157) => 's',
|
||||||
chr(197) . chr(158) => 'S', chr(197) . chr(159) => 's',
|
chr(197) . chr(158) => 'S', chr(197) . chr(159) => 's',
|
||||||
chr(197) . chr(160) => 'S', chr(197) . chr(161) => 's',
|
chr(197) . chr(160) => 'S', chr(197) . chr(161) => 's',
|
||||||
chr(197) . chr(162) => 'T', chr(197) . chr(163) => 't',
|
chr(197) . chr(162) => 'T', chr(197) . chr(163) => 't',
|
||||||
chr(197) . chr(164) => 'T', chr(197) . chr(165) => 't',
|
chr(197) . chr(164) => 'T', chr(197) . chr(165) => 't',
|
||||||
chr(197) . chr(166) => 'T', chr(197) . chr(167) => 't',
|
chr(197) . chr(166) => 'T', chr(197) . chr(167) => 't',
|
||||||
chr(197) . chr(168) => 'U', chr(197) . chr(169) => 'u',
|
chr(197) . chr(168) => 'U', chr(197) . chr(169) => 'u',
|
||||||
chr(197) . chr(170) => 'U', chr(197) . chr(171) => 'u',
|
chr(197) . chr(170) => 'U', chr(197) . chr(171) => 'u',
|
||||||
chr(197) . chr(172) => 'U', chr(197) . chr(173) => 'u',
|
chr(197) . chr(172) => 'U', chr(197) . chr(173) => 'u',
|
||||||
chr(197) . chr(174) => 'U', chr(197) . chr(175) => 'u',
|
chr(197) . chr(174) => 'U', chr(197) . chr(175) => 'u',
|
||||||
chr(197) . chr(176) => 'U', chr(197) . chr(177) => 'u',
|
chr(197) . chr(176) => 'U', chr(197) . chr(177) => 'u',
|
||||||
chr(197) . chr(178) => 'U', chr(197) . chr(179) => 'u',
|
chr(197) . chr(178) => 'U', chr(197) . chr(179) => 'u',
|
||||||
chr(197) . chr(180) => 'W', chr(197) . chr(181) => 'w',
|
chr(197) . chr(180) => 'W', chr(197) . chr(181) => 'w',
|
||||||
chr(197) . chr(182) => 'Y', chr(197) . chr(183) => 'y',
|
chr(197) . chr(182) => 'Y', chr(197) . chr(183) => 'y',
|
||||||
chr(197) . chr(184) => 'Y', chr(197) . chr(185) => 'Z',
|
chr(197) . chr(184) => 'Y', chr(197) . chr(185) => 'Z',
|
||||||
chr(197) . chr(186) => 'z', chr(197) . chr(187) => 'Z',
|
chr(197) . chr(186) => 'z', chr(197) . chr(187) => 'Z',
|
||||||
chr(197) . chr(188) => 'z', chr(197) . chr(189) => 'Z',
|
chr(197) . chr(188) => 'z', chr(197) . chr(189) => 'Z',
|
||||||
chr(197) . chr(190) => 'z', chr(197) . chr(191) => 's',
|
chr(197) . chr(190) => 'z', chr(197) . chr(191) => 's',
|
||||||
// Euro Sign
|
// Euro Sign
|
||||||
chr(226) . chr(130) . chr(172) => 'E',
|
chr(226) . chr(130) . chr(172) => 'E',
|
||||||
// GBP (Pound) Sign
|
// GBP (Pound) Sign
|
||||||
chr(194) . chr(163) => '', ];
|
chr(194) . chr(163) => '', ];
|
||||||
|
|
||||||
$string = strtr($string, $chars);
|
$string = strtr($string, $chars);
|
||||||
} else {
|
} else {
|
||||||
@@ -1013,7 +1013,7 @@ if (! function_exists('set_time_by_user_timezone')) {
|
|||||||
/**
|
/**
|
||||||
* Set time by user timezone GMT
|
* Set time by user timezone GMT
|
||||||
*/
|
*/
|
||||||
function set_time_by_user_timezone($user, $createdAt): string | Carbon
|
function set_time_by_user_timezone($user, $createdAt): string|Carbon
|
||||||
{
|
{
|
||||||
$timezone = $user->settings->timezone ?? 0;
|
$timezone = $user->settings->timezone ?? 0;
|
||||||
|
|
||||||
@@ -1210,34 +1210,35 @@ if (! function_exists('extractItemsFromGetAttribute')) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! function_exists('generatePaginationCounts')) {
|
if (! function_exists('formatPaginatorMetadata')) {
|
||||||
/**
|
/**
|
||||||
* Group paginate of Foldes and Files
|
* Format paginate data
|
||||||
*/
|
*/
|
||||||
function generatePaginationCounts(
|
function formatPaginatorMetadata(
|
||||||
int $totalItemsCount
|
int $totalEntries
|
||||||
) : array {
|
): array {
|
||||||
$perPage = config('vuefilemanager.paginate.perPage');
|
|
||||||
$currentPage = request()->input('page') === 'all' ? 1 : (int) request()->input('page');
|
|
||||||
|
|
||||||
$uri = request()->fullUrl();
|
$uri = request()->fullUrl();
|
||||||
$lastPage = ceil($totalItemsCount / $perPage);
|
$perPage = config('vuefilemanager.paginate.perPage');
|
||||||
|
$lastPage = ceil($totalEntries / $perPage);
|
||||||
|
$currentPage = request()->input('page') === 'all'
|
||||||
|
? 1
|
||||||
|
: (int) request()->input('page');
|
||||||
|
|
||||||
return [
|
return [
|
||||||
[
|
[
|
||||||
'currentPage' => $currentPage,
|
'currentPage' => $currentPage,
|
||||||
'from' => 1,
|
'from' => 1,
|
||||||
'lastPage' => $lastPage,
|
'lastPage' => $lastPage,
|
||||||
'path' => $uri,
|
'path' => $uri,
|
||||||
'perPage' => $perPage,
|
'perPage' => $perPage,
|
||||||
'to' => $perPage,
|
'to' => $perPage,
|
||||||
'total' => $totalItemsCount,
|
'total' => $totalEntries,
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'first' => $uri . '&page=1',
|
'first' => $uri . '&page=1',
|
||||||
'last' => $uri . '&page=' . $lastPage,
|
'last' => $uri . '&page=' . $lastPage,
|
||||||
'next' => $currentPage == $lastPage ? null : $uri . '&page=' . $currentPage + 1,
|
'next' => $currentPage == $lastPage ? null : $uri . '&page=' . $currentPage + 1,
|
||||||
'prev' => $currentPage == 1 ? null : $uri . '&page=' . $currentPage - 1,
|
'prev' => $currentPage == 1 ? null : $uri . '&page=' . $currentPage - 1,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -1248,12 +1249,12 @@ if (! function_exists('extractItemsFromGetAttribute')) {
|
|||||||
* Get count of items from the Database
|
* Get count of items from the Database
|
||||||
*/
|
*/
|
||||||
function getRecordsCount(
|
function getRecordsCount(
|
||||||
array $folderQuery,
|
array $query,
|
||||||
array $fileQuery,
|
string $page = 'all',
|
||||||
string $page
|
bool $findTrashed = false,
|
||||||
) : array {
|
): array {
|
||||||
$perPage = config('vuefilemanager.paginate.perPage');
|
$perPage = config('vuefilemanager.paginate.perPage');
|
||||||
$currentPage = $page === 'all' ? 1 : (int) $page;
|
$currentPage = $page === 'all' ? 'all' : intval($page);
|
||||||
|
|
||||||
$foldersSkip = 0;
|
$foldersSkip = 0;
|
||||||
$foldersTake = 0;
|
$foldersTake = 0;
|
||||||
@@ -1261,15 +1262,50 @@ if (! function_exists('extractItemsFromGetAttribute')) {
|
|||||||
$filesTake = 0;
|
$filesTake = 0;
|
||||||
|
|
||||||
$foldersCount = DB::table('folders')
|
$foldersCount = DB::table('folders')
|
||||||
->where($folderQuery)
|
->when(
|
||||||
|
$findTrashed,
|
||||||
|
fn ($q) => $q->whereNotNull('deleted_at')
|
||||||
|
)
|
||||||
|
->when(
|
||||||
|
array_key_exists('where', $query['folder']),
|
||||||
|
fn ($q) => $q->where($query['folder']['where'])
|
||||||
|
)
|
||||||
|
->when(
|
||||||
|
array_key_exists('whereIn', $query['folder']),
|
||||||
|
function ($q) use ($query) {
|
||||||
|
foreach ($query['folder']['whereIn'] as $key => $value) {
|
||||||
|
$q->whereIn($key, $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $q;
|
||||||
|
}
|
||||||
|
)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
$filesCount = DB::table('files')
|
$filesCount = DB::table('files')
|
||||||
->where($fileQuery)
|
->when(
|
||||||
|
$findTrashed,
|
||||||
|
fn ($q) => $q->whereNotNull('deleted_at')
|
||||||
|
)
|
||||||
|
->when(
|
||||||
|
array_key_exists('where', $query['file']),
|
||||||
|
fn ($q) => $q->where($query['file']['where'])
|
||||||
|
)
|
||||||
|
->when(
|
||||||
|
array_key_exists('whereIn', $query['file']),
|
||||||
|
function ($q) use ($query) {
|
||||||
|
foreach ($query['file']['whereIn'] as $key => $value) {
|
||||||
|
$q->whereIn($key, $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $q;
|
||||||
|
}
|
||||||
|
)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
$totalItemsCount = $foldersCount + $filesCount;
|
$totalEntries = $foldersCount + $filesCount;
|
||||||
|
|
||||||
|
// Get certain page
|
||||||
if ($page !== 'all') {
|
if ($page !== 'all') {
|
||||||
// Folders pages
|
// Folders pages
|
||||||
if ($foldersCount >= $currentPage * $perPage) {
|
if ($foldersCount >= $currentPage * $perPage) {
|
||||||
@@ -1290,12 +1326,15 @@ if (! function_exists('extractItemsFromGetAttribute')) {
|
|||||||
$filesTake = $perPage;
|
$filesTake = $perPage;
|
||||||
$filesSkip = ((ceil($foldersCount / $perPage) * $perPage) - $foldersCount) + ($currentPage - (ceil($foldersCount / $perPage)) - 1) * $perPage;
|
$filesSkip = ((ceil($foldersCount / $perPage) * $perPage) - $foldersCount) + ($currentPage - (ceil($foldersCount / $perPage)) - 1) * $perPage;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
// Get all records
|
||||||
|
if ($page === 'all') {
|
||||||
$foldersTake = $foldersCount;
|
$foldersTake = $foldersCount;
|
||||||
$filesTake = $filesCount;
|
$filesTake = $filesCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
return [$foldersTake, $foldersSkip, $filesTake, $filesSkip, $totalItemsCount];
|
return [$foldersTake, $foldersSkip, $filesTake, $filesSkip, $totalEntries];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Tests\App\Restrictions;
|
namespace Tests\App\Restrictions;
|
||||||
|
|
||||||
|
use Illuminate\Http\UploadedFile;
|
||||||
|
use Storage;
|
||||||
|
use Str;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
use App\Users\Models\User;
|
use App\Users\Models\User;
|
||||||
use Domain\Files\Models\File;
|
use Domain\Files\Models\File;
|
||||||
@@ -121,10 +124,15 @@ class DefaultRestrictionsTest extends TestCase
|
|||||||
->hasSettings()
|
->hasSettings()
|
||||||
->create();
|
->create();
|
||||||
|
|
||||||
|
$file = UploadedFile::fake()
|
||||||
|
->create(Str::random() . '-fake-file.pdf', 1200, 'application/pdf');
|
||||||
|
|
||||||
|
Storage::putFileAs("files/$user->id", $file, $file->name);
|
||||||
|
|
||||||
$file = File::factory()
|
$file = File::factory()
|
||||||
->create([
|
->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'basename' => 'fake-file.pdf',
|
'basename' => $file->name,
|
||||||
'name' => 'fake-file.pdf',
|
'name' => 'fake-file.pdf',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Tests\App\Restrictions;
|
namespace Tests\App\Restrictions;
|
||||||
|
|
||||||
|
use Illuminate\Http\UploadedFile;
|
||||||
|
use Storage;
|
||||||
|
use Str;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
use App\Users\Models\User;
|
use App\Users\Models\User;
|
||||||
use Domain\Files\Models\File;
|
use Domain\Files\Models\File;
|
||||||
@@ -167,10 +170,15 @@ class FixedBillingRestrictionsTest extends TestCase
|
|||||||
->hasSettings()
|
->hasSettings()
|
||||||
->create();
|
->create();
|
||||||
|
|
||||||
|
$file = UploadedFile::fake()
|
||||||
|
->create(Str::random() . '-fake-file.pdf', 1200, 'application/pdf');
|
||||||
|
|
||||||
|
Storage::putFileAs("files/$user->id", $file, $file->name);
|
||||||
|
|
||||||
$file = File::factory()
|
$file = File::factory()
|
||||||
->create([
|
->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'basename' => 'fake-file.pdf',
|
'basename' => $file->name,
|
||||||
'name' => 'fake-file.pdf',
|
'name' => 'fake-file.pdf',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Tests\App\Restrictions;
|
namespace Tests\App\Restrictions;
|
||||||
|
|
||||||
|
use Illuminate\Http\UploadedFile;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
use Storage;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
use App\Users\Models\User;
|
use App\Users\Models\User;
|
||||||
use Domain\Files\Models\File;
|
use Domain\Files\Models\File;
|
||||||
@@ -145,10 +148,15 @@ class MeteredBillingRestrictionsTest extends TestCase
|
|||||||
->hasSettings()
|
->hasSettings()
|
||||||
->create();
|
->create();
|
||||||
|
|
||||||
|
$file = UploadedFile::fake()
|
||||||
|
->create(Str::random() . '-fake-file.pdf', 1200, 'application/pdf');
|
||||||
|
|
||||||
|
Storage::putFileAs("files/$user->id", $file, $file->name);
|
||||||
|
|
||||||
$file = File::factory()
|
$file = File::factory()
|
||||||
->create([
|
->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'basename' => 'fake-file.pdf',
|
'basename' => $file->name,
|
||||||
'name' => 'fake-file.pdf',
|
'name' => 'fake-file.pdf',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -197,10 +205,15 @@ class MeteredBillingRestrictionsTest extends TestCase
|
|||||||
->hasSettings()
|
->hasSettings()
|
||||||
->create();
|
->create();
|
||||||
|
|
||||||
|
$file = UploadedFile::fake()
|
||||||
|
->create(Str::random() . '-fake-file.pdf', 1200, 'application/pdf');
|
||||||
|
|
||||||
|
Storage::putFileAs("files/$user->id", $file, $file->name);
|
||||||
|
|
||||||
$file = File::factory()
|
$file = File::factory()
|
||||||
->create([
|
->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'basename' => 'fake-file.pdf',
|
'basename' => $file->name,
|
||||||
'name' => 'fake-file.pdf',
|
'name' => 'fake-file.pdf',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class SocialiteTest extends TestCase
|
|||||||
{
|
{
|
||||||
$response = $this->get('api/socialite/google/redirect');
|
$response = $this->get('api/socialite/google/redirect');
|
||||||
|
|
||||||
$this->assertStringContainsString('accounts.google.com/o/oauth2/auth', $response['url']);
|
$this->assertStringContainsString('accounts.google.com/o/oauth2/auth', $response->json()['data']['url']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -203,9 +203,7 @@ class UserAccountTest extends TestCase
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'favourites' => [
|
'favourites' => [],
|
||||||
'data' => [],
|
|
||||||
],
|
|
||||||
'readNotifications' => [
|
'readNotifications' => [
|
||||||
'data' => [],
|
'data' => [],
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class SetupWizardTest extends TestCase
|
|||||||
'name' => 'database/test.sqlite',
|
'name' => 'database/test.sqlite',
|
||||||
'username' => 'null',
|
'username' => 'null',
|
||||||
'password' => 'null',
|
'password' => 'null',
|
||||||
])->assertStatus(204);
|
])->assertStatus(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -76,7 +76,7 @@ class SetupWizardTest extends TestCase
|
|||||||
'logo_horizontal' => UploadedFile::fake()->image('fake-logo-horizontal.jpg'),
|
'logo_horizontal' => UploadedFile::fake()->image('fake-logo-horizontal.jpg'),
|
||||||
'logo_horizontal_dark' => UploadedFile::fake()->image('fake-logo-horizontal-dark.jpg'),
|
'logo_horizontal_dark' => UploadedFile::fake()->image('fake-logo-horizontal-dark.jpg'),
|
||||||
'favicon' => UploadedFile::fake()->image('fake-favicon.jpg'),
|
'favicon' => UploadedFile::fake()->image('fake-favicon.jpg'),
|
||||||
])->assertStatus(204);
|
])->assertStatus(200);
|
||||||
|
|
||||||
$this
|
$this
|
||||||
->assertDatabaseHas('settings', [
|
->assertDatabaseHas('settings', [
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ class TeamsTest extends TestCase
|
|||||||
|
|
||||||
$this
|
$this
|
||||||
->actingAs($user)
|
->actingAs($user)
|
||||||
->getJson('/api/teams/folders/undefined')
|
->getJson('/api/teams/folders/all?page=1')
|
||||||
->assertOk()
|
->assertOk()
|
||||||
->assertJsonFragment([
|
->assertJsonFragment([
|
||||||
'id' => $folder->id,
|
'id' => $folder->id,
|
||||||
@@ -255,7 +255,7 @@ class TeamsTest extends TestCase
|
|||||||
|
|
||||||
$this
|
$this
|
||||||
->actingAs($member)
|
->actingAs($member)
|
||||||
->getJson('/api/teams/shared-with-me/undefined')
|
->getJson('/api/teams/shared-with-me/all?page=1')
|
||||||
->assertOk()
|
->assertOk()
|
||||||
->assertJsonFragment([
|
->assertJsonFragment([
|
||||||
'id' => $folders[0]->id,
|
'id' => $folders[0]->id,
|
||||||
|
|||||||
@@ -53,17 +53,18 @@ class HelperTest extends TestCase
|
|||||||
'parent_id' => null,
|
'parent_id' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$folderQuery = [
|
$query = [
|
||||||
'parent_id' => null,
|
'folder' => [
|
||||||
'team_folder' => false,
|
'parent_id' => null,
|
||||||
'user_id' => $user->id,
|
'team_folder' => false,
|
||||||
'deleted_at' => null,
|
'user_id' => $user->id,
|
||||||
];
|
'deleted_at' => null,
|
||||||
|
],
|
||||||
$fileQuery = [
|
'file' => [
|
||||||
'parent_id' => null,
|
'parent_id' => null,
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'deleted_at' => null,
|
'deleted_at' => null,
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
Config::set('vuefilemanager.paginate.perPage', 5);
|
Config::set('vuefilemanager.paginate.perPage', 5);
|
||||||
@@ -71,15 +72,15 @@ class HelperTest extends TestCase
|
|||||||
// getRecordsCunt returned array [foldersTake, foldersSkip, filesTake, filesSkip, totalItemsCount]
|
// getRecordsCunt returned array [foldersTake, foldersSkip, filesTake, filesSkip, totalItemsCount]
|
||||||
|
|
||||||
// Get folders page
|
// Get folders page
|
||||||
$this->assertEquals([5, 0, 0, 0, 25], getRecordsCount($folderQuery, $fileQuery, '1'));
|
$this->assertEquals([5, 0, 0, 0, 25], getRecordsCount($query, 1));
|
||||||
|
|
||||||
// Get mixed page
|
// Get mixed page
|
||||||
$this->assertEquals([2, 10, 3, 0, 25], getRecordsCount($folderQuery, $fileQuery, '3'));
|
$this->assertEquals([2, 10, 3, 0, 25], getRecordsCount($query, 3));
|
||||||
|
|
||||||
// Get files page
|
// Get files page
|
||||||
$this->assertEquals([0, 0, 5, 8, 25], getRecordsCount($folderQuery, $fileQuery, '5'));
|
$this->assertEquals([0, 0, 5, 8, 25], getRecordsCount($query, 5));
|
||||||
|
|
||||||
// Get all pages
|
// Get all pages
|
||||||
$this->assertEquals([12, 0, 13, 0, 25], getRecordsCount($folderQuery, $fileQuery, 'all'));
|
$this->assertEquals([12, 0, 13, 0, 25], getRecordsCount($query));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user