mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-05 18:23:48 +00:00
Merge remote-tracking branch 'origin/master' into oasis
# Conflicts: # .php-cs-fixer.cache # app/Http/helpers.php # app/Services/FileManagerService.php # composer.lock # public/chunks/environment-setup.js # public/chunks/files~chunks/shared/file-browser.js # public/js/main.js # public/mix-manifest.json
This commit is contained in:
@@ -41,6 +41,13 @@ MAIL_ENCRYPTION=
|
||||
MAIL_FROM_ADDRESS="${MAIL_USERNAME}"
|
||||
MAIL_FROM_NAME="${MAIL_USERNAME}"
|
||||
|
||||
OSS_ACCESS_KEY_ID=
|
||||
OSS_SECRET_ACCESS_KEY=
|
||||
OSS_REGION=
|
||||
OSS_BUCKET=
|
||||
OSS_ENDPOINT=
|
||||
OSS_URL=
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -111,18 +111,15 @@ class LanguageController extends Controller
|
||||
|
||||
/**
|
||||
* Delete the language with all children strings
|
||||
*
|
||||
* @param Language $language
|
||||
* @return ResponseFactory|Response
|
||||
* @return Response
|
||||
*/
|
||||
public function delete_language(Language $language)
|
||||
public function delete_language(Language $language): Response
|
||||
{
|
||||
// Abort in demo mode
|
||||
abort_if(is_demo(), 204, 'Done.');
|
||||
|
||||
if ($language->locale === 'en') {
|
||||
abort(401, "Sorry, you can't delete default language.");
|
||||
}
|
||||
abort_if($language->locale === 'en', 401, "Sorry, you can't delete default language.");
|
||||
|
||||
// If user try to delete language used as default,
|
||||
// then set en language as default
|
||||
|
||||
@@ -14,8 +14,11 @@ use Illuminate\Support\Facades\Mail;
|
||||
use App\Http\Mail\SendContactMessage;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Doctrine\DBAL\Driver\PDOException;
|
||||
use Illuminate\Database\QueryException;
|
||||
use App\Http\Resources\PricingCollection;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||
use Illuminate\Database\Eloquent\ModelNotFoundException;
|
||||
use App\Http\Requests\PublicPages\SendContactMessageRequest;
|
||||
|
||||
class AppFunctionsController extends Controller
|
||||
@@ -178,18 +181,22 @@ class AppFunctionsController extends Controller
|
||||
|
||||
/**
|
||||
* Get language translations for frontend app
|
||||
*
|
||||
* @param $lang
|
||||
* @return array
|
||||
*/
|
||||
public function get_translations($lang)
|
||||
{
|
||||
$translations = Cache::rememberForever("language-translations-$lang", function () use ($lang) {
|
||||
return Language::whereLocale($lang)
|
||||
->firstOrFail()
|
||||
->languageTranslations;
|
||||
});
|
||||
$translations = cache()
|
||||
->rememberForever("language-translations-$lang", function () use ($lang) {
|
||||
try {
|
||||
return Language::whereLocale($lang)
|
||||
->firstOrFail()
|
||||
->languageTranslations;
|
||||
} catch (QueryException | ModelNotFoundException $e) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
return map_language_translations($translations);
|
||||
return $translations
|
||||
? map_language_translations($translations)
|
||||
: get_default_language_translations();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,6 +283,14 @@ class SetupWizardController extends Controller
|
||||
'BACKBLAZE_REGION' => $request->storage['region'] ?? null,
|
||||
'BACKBLAZE_BUCKET' => $request->storage['bucket'] ?? null,
|
||||
],
|
||||
'oss' => [
|
||||
'FILESYSTEM_DRIVER' => $request->storage['driver'] ?? null,
|
||||
'OSS_ACCESS_KEY_ID' => $request->storage['key'] ?? null,
|
||||
'OSS_SECRET_ACCESS_KEY' => $request->storage['secret'] ?? null,
|
||||
'OSS_ENDPOINT' => $request->storage['endpoint'] ?? null,
|
||||
'OSS_REGION' => $request->storage['region'] ?? null,
|
||||
'OSS_BUCKET' => $request->storage['bucket'] ?? null,
|
||||
],
|
||||
];
|
||||
|
||||
// Storage credentials for storage
|
||||
|
||||
@@ -24,6 +24,7 @@ class UploadRequest extends FormRequest
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'filename' => 'required|string',
|
||||
'folder_id' => 'nullable|uuid',
|
||||
'file' => ['required', 'file', new DisabledMimetypes],
|
||||
];
|
||||
|
||||
1577
app/Http/helpers.php
1577
app/Http/helpers.php
File diff suppressed because it is too large
Load Diff
@@ -22,10 +22,17 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$get_time_locale = App::getLocale() . '_' . mb_strtoupper(App::getLocale());
|
||||
try {
|
||||
$app_locale = get_setting('language') ?? 'en';
|
||||
} catch (\PDOException $exception) {
|
||||
$app_locale = 'en';
|
||||
}
|
||||
|
||||
// Set locale for application
|
||||
app()->setLocale($app_locale);
|
||||
|
||||
// Set locale for carbon dates
|
||||
setlocale(LC_TIME, $get_time_locale);
|
||||
setlocale(LC_TIME, $app_locale . '_' . mb_strtoupper($app_locale));
|
||||
|
||||
// Get all migrations with all directories
|
||||
$this->loadMigrationsFrom(
|
||||
|
||||
@@ -146,9 +146,9 @@ class FileManagerService
|
||||
|
||||
// Store zip record
|
||||
return Zip::create([
|
||||
'user_id' => $shared->user_id ?? Auth::id(),
|
||||
'user_id' => $shared->user_id ?? Auth::id(),
|
||||
'shared_token' => $shared->token ?? null,
|
||||
'basename' => $zip_name,
|
||||
'basename' => $zip_name,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -163,11 +163,11 @@ class FileManagerService
|
||||
{
|
||||
return Folder::create([
|
||||
'parent_id' => $request->parent_id,
|
||||
'author' => $shared ? 'visitor' : 'user',
|
||||
'user_id' => $shared ? $shared->user_id : Auth::id(),
|
||||
'name' => $request->name,
|
||||
'color' => $request->color ?? null,
|
||||
'emoji' => $request->emoji ?? null,
|
||||
'author' => $shared ? 'visitor' : 'user',
|
||||
'user_id' => $shared ? $shared->user_id : Auth::id(),
|
||||
'name' => $request->name,
|
||||
'color' => $request->color ?? null,
|
||||
'emoji' => $request->emoji ?? null,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -398,16 +398,16 @@ class FileManagerService
|
||||
|
||||
// Return new file
|
||||
return UserFile::create([
|
||||
'mimetype' => get_file_type_from_mimetype($file_mimetype),
|
||||
'type' => get_file_type($file_mimetype),
|
||||
'mimetype' => get_file_type_from_mimetype($file_mimetype),
|
||||
'type' => get_file_type($file_mimetype),
|
||||
'folder_id' => $request->folder_id,
|
||||
'metadata' => $metadata,
|
||||
'name' => $user_file_name,
|
||||
'basename' => $disk_file_name,
|
||||
'author' => $shared ? 'visitor' : 'user',
|
||||
'metadata' => $metadata,
|
||||
'name' => $request->filename,
|
||||
'basename' => $disk_file_name,
|
||||
'author' => $shared ? 'visitor' : 'user',
|
||||
'thumbnail' => $thumbnail,
|
||||
'filesize' => $file_size,
|
||||
'user_id' => $user_id,
|
||||
'filesize' => $file_size,
|
||||
'user_id' => $user_id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,8 +34,12 @@ class LanguageService
|
||||
];
|
||||
})->toArray();
|
||||
|
||||
DB::table('language_translations')
|
||||
->insert($translations);
|
||||
$chunks = array_chunk($translations, 100);
|
||||
|
||||
foreach ($chunks as $chunk) {
|
||||
DB::table('language_translations')
|
||||
->insert($chunk);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,9 +85,13 @@ class LanguageService
|
||||
];
|
||||
})->toArray();
|
||||
|
||||
// Store translations into database
|
||||
DB::table('language_translations')
|
||||
->insert($translations);
|
||||
$chunks = array_chunk($translations, 100);
|
||||
|
||||
foreach ($chunks as $chunk) {
|
||||
// Store translations into database
|
||||
DB::table('language_translations')
|
||||
->insert($chunk);
|
||||
}
|
||||
|
||||
// Flush cache
|
||||
cache()->forget("language-translations-$locale");
|
||||
|
||||
1220
composer.lock
generated
1220
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -53,6 +53,16 @@ return [
|
||||
'visibility' => 'public',
|
||||
],
|
||||
|
||||
'oss' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('OSS_ACCESS_KEY_ID'),
|
||||
'secret' => env('OSS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('OSS_REGION'),
|
||||
'bucket' => env('OSS_BUCKET'),
|
||||
'endpoint' => env('OSS_ENDPOINT'),
|
||||
'url' => env('OSS_URL'),
|
||||
],
|
||||
|
||||
's3' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
|
||||
2
public/chunks/environment-setup.js
vendored
2
public/chunks/environment-setup.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
public/js/main.js
vendored
2
public/js/main.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,93 +1,76 @@
|
||||
{
|
||||
"/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~4509a016.js": "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~4509a016.js?id=45d7e5434df0aecfb75f",
|
||||
"/chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chu~e360f8a1.js": "/chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chu~e360f8a1.js?id=3cebd29d3da07a4c05b3",
|
||||
"/chunks/files~chunks/oasis/invoices~chunks/oasis/invoices/list~chunks/platform~chunks/shared~chunks/s~40cda2f4.js": "/chunks/files~chunks/oasis/invoices~chunks/oasis/invoices/list~chunks/platform~chunks/shared~chunks/s~40cda2f4.js?id=fa0e58359856d9130736",
|
||||
"/chunks/admin~chunks/oasis/invoices~chunks/platform~chunks/shared.js": "/chunks/admin~chunks/oasis/invoices~chunks/platform~chunks/shared.js?id=011ce4838e92b1305062",
|
||||
"/chunks/files~chunks/oasis/invoices/list~chunks/shared/file-browser.js": "/chunks/files~chunks/oasis/invoices/list~chunks/shared/file-browser.js?id=90ab4213c8bc4f2dc49c",
|
||||
"/chunks/files~chunks/shared/file-browser~chunks/shared/single-file.js": "/chunks/files~chunks/shared/file-browser~chunks/shared/single-file.js?id=1821f82af383dfa66b44",
|
||||
"/vendors~chunks/oasis/invoices~chunks/platform~chunks/shared.js": "/vendors~chunks/oasis/invoices~chunks/platform~chunks/shared.js?id=b12439bd716b954a8c85",
|
||||
"/chunks/admin.js": "/chunks/admin.js?id=6651ac701af49d31f446",
|
||||
"/chunks/dashboard~chunks/dashboard-oasis.js": "/chunks/dashboard~chunks/dashboard-oasis.js?id=d293faf181dee7b2f16f",
|
||||
"/chunks/files~chunks/shared/file-browser.js": "/chunks/files~chunks/shared/file-browser.js?id=a86fb952ff091cb75302",
|
||||
"/js/main.js": "/js/main.js?id=1db8e24a9b460680b472",
|
||||
"/css/app.css": "/css/app.css?id=b1fc602730eb3f4c9e6e",
|
||||
"/chunks/admin-account.js": "/chunks/admin-account.js?id=2423b39e710cb3ca960e",
|
||||
"/chunks/app-appearance.js": "/chunks/app-appearance.js?id=f35ee7159e406d0872e3",
|
||||
"/chunks/app-billings.js": "/chunks/app-billings.js?id=181cfe1c7cfa5f9bd6d9",
|
||||
"/chunks/app-email.js": "/chunks/app-email.js?id=9a2a5bb99759f34a4d6e",
|
||||
"/chunks/app-index.js": "/chunks/app-index.js?id=43da97f81dfe83e1741e",
|
||||
"/chunks/app-language.js": "/chunks/app-language.js?id=49e12163fded858bdc8a",
|
||||
"/chunks/app-others.js": "/chunks/app-others.js?id=b758fce43fbcbbe60570",
|
||||
"/chunks/app-payments.js": "/chunks/app-payments.js?id=54c7b0884601a8d53d7f",
|
||||
"/chunks/app-settings.js": "/chunks/app-settings.js?id=670fa78fbf081ed2e5d0",
|
||||
"/chunks/app-setup.js": "/chunks/app-setup.js?id=c33cebbfb2deba113cd6",
|
||||
"/chunks/billings-detail.js": "/chunks/billings-detail.js?id=dd34a8eca7e9148dc00f",
|
||||
"/chunks/contact-us.js": "/chunks/contact-us.js?id=4a3d11afbbdf1f0ce00b",
|
||||
"/chunks/create-new-password.js": "/chunks/create-new-password.js?id=de009cbd9120153b8d77",
|
||||
"/chunks/dashboard.js": "/chunks/dashboard.js?id=5ec1163c6c6c2fe76164",
|
||||
"/chunks/dashboard-oasis.js": "/chunks/dashboard-oasis.js?id=b26c3869ca423c97a518",
|
||||
"/chunks/database.js": "/chunks/database.js?id=ad83e1ef292d55ce0f60",
|
||||
"/chunks/dynamic-page.js": "/chunks/dynamic-page.js?id=b7631d625e19e6379379",
|
||||
"/chunks/environment-setup.js": "/chunks/environment-setup.js?id=56221f707c25a1443d3f",
|
||||
"/chunks/files.js": "/chunks/files.js?id=398f44112c8a6b2f0375",
|
||||
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=6a6c6e4a054c182e7f1b",
|
||||
"/chunks/homepage.js": "/chunks/homepage.js?id=30c1da2c5a7c50433408",
|
||||
"/chunks/installation-disclaimer.js": "/chunks/installation-disclaimer.js?id=b9e17524a42dadd47933",
|
||||
"/chunks/invoices.js": "/chunks/invoices.js?id=3548624f826db0791cdc",
|
||||
"/chunks/not-found-shared.js": "/chunks/not-found-shared.js?id=161b237a59f7b12cbebb",
|
||||
"/chunks/oasis/homepage.js": "/chunks/oasis/homepage.js?id=ffc11719994316206ce6",
|
||||
"/chunks/oasis/invoices.js": "/chunks/oasis/invoices.js?id=ae8b4a77ed5fee43cf19",
|
||||
"/chunks/oasis/invoices/client.js": "/chunks/oasis/invoices/client.js?id=4d532deff5f73e453f14",
|
||||
"/chunks/oasis/invoices/client-detail.js": "/chunks/oasis/invoices/client-detail.js?id=b10ec393290687809a9e",
|
||||
"/chunks/oasis/invoices/client-invoices.js": "/chunks/oasis/invoices/client-invoices.js?id=7e790f07e34503e77f17",
|
||||
"/chunks/oasis/invoices/create-client.js": "/chunks/oasis/invoices/create-client.js?id=67c008dfcaa34b486f0a",
|
||||
"/chunks/oasis/invoices/create-invoice.js": "/chunks/oasis/invoices/create-invoice.js?id=38eab1e081968e2f92a0",
|
||||
"/chunks/oasis/invoices/edit-invoice.js": "/chunks/oasis/invoices/edit-invoice.js?id=4deeef2efcbc076372d7",
|
||||
"/chunks/oasis/invoices/list.js": "/chunks/oasis/invoices/list.js?id=2a8fdf19b4d5ba654b50",
|
||||
"/chunks/oasis/invoices/profile.js": "/chunks/oasis/invoices/profile.js?id=bcdcaecdc07a887873ba",
|
||||
"/chunks/oasis/platba.js": "/chunks/oasis/platba.js?id=d4995d5732c2ced6044b",
|
||||
"/chunks/oasis/sign-up.js": "/chunks/oasis/sign-up.js?id=7a1fc14cedf369d5767c",
|
||||
"/chunks/oasis/upgrade-billing.js": "/chunks/oasis/upgrade-billing.js?id=7b8c3ed338b3527de92d",
|
||||
"/chunks/oasis/upgrade-plan.js": "/chunks/oasis/upgrade-plan.js?id=87e5e1f6a9c8b95aeeb8",
|
||||
"/chunks/oasis/user-create.js": "/chunks/oasis/user-create.js?id=2e2f854eefca3a312e8b",
|
||||
"/chunks/oasis/users.js": "/chunks/oasis/users.js?id=4f848eaf4234cd759316",
|
||||
"/chunks/page-edit.js": "/chunks/page-edit.js?id=5fff761a6746d936d67c",
|
||||
"/chunks/pages.js": "/chunks/pages.js?id=9e9769b8076198daeeb3",
|
||||
"/chunks/plan.js": "/chunks/plan.js?id=4b97d06a46ac3c9de837",
|
||||
"/chunks/plan-create.js": "/chunks/plan-create.js?id=999e93aa2a566f14ed8d",
|
||||
"/chunks/plan-delete.js": "/chunks/plan-delete.js?id=ea0eed6cccee2a1a8ddf",
|
||||
"/chunks/plan-settings.js": "/chunks/plan-settings.js?id=1126e53c651aaea7bbdc",
|
||||
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=978075c87b6e885b9d58",
|
||||
"/chunks/plans.js": "/chunks/plans.js?id=860196d2bf0e816291c0",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=b6bdb0cd2f9b7b8d4855",
|
||||
"/chunks/profile.js": "/chunks/profile.js?id=8ba097ae5c969050df27",
|
||||
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=2940170085b46476ab39",
|
||||
"/chunks/settings.js": "/chunks/settings.js?id=e49f2144f30dc33545cb",
|
||||
"/chunks/settings-create-payment-methods.js": "/chunks/settings-create-payment-methods.js?id=0344848f745ed16ad175",
|
||||
"/chunks/settings-invoices.js": "/chunks/settings-invoices.js?id=9c1eb9c787807866a63c",
|
||||
"/chunks/settings-password.js": "/chunks/settings-password.js?id=ba333a68c637a3f6bbae",
|
||||
"/chunks/settings-payment-methods.js": "/chunks/settings-payment-methods.js?id=71af14ca9f35110a9198",
|
||||
"/chunks/settings-storage.js": "/chunks/settings-storage.js?id=54ac9fe7a40b03b8932a",
|
||||
"/chunks/settings-subscription.js": "/chunks/settings-subscription.js?id=caa3e2abd06f1ace1e86",
|
||||
"/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=d0353ac99122ce69fb7f",
|
||||
"/chunks/shared.js": "/chunks/shared.js?id=7dcc6c332352c5187327",
|
||||
"/chunks/shared/authenticate.js": "/chunks/shared/authenticate.js?id=04ebff113f0a9ea98b8f",
|
||||
"/chunks/shared/file-browser.js": "/chunks/shared/file-browser.js?id=492256744959318a776b",
|
||||
"/chunks/shared/single-file.js": "/chunks/shared/single-file.js?id=3709b1398e729b0ebd8a",
|
||||
"/chunks/sign-in.js": "/chunks/sign-in.js?id=09ca5687a64a817c7939",
|
||||
"/chunks/sign-up.js": "/chunks/sign-up.js?id=0b5fc9e3bc1ca36bddb3",
|
||||
"/chunks/stripe-credentials.js": "/chunks/stripe-credentials.js?id=a76f57dd4c84fa0061e1",
|
||||
"/chunks/subscription-plans.js": "/chunks/subscription-plans.js?id=c4548079020bbe1ab0dd",
|
||||
"/chunks/subscription-service.js": "/chunks/subscription-service.js?id=17df1a56d18f7e86e3c7",
|
||||
"/chunks/upgrade-billing.js": "/chunks/upgrade-billing.js?id=27802eb733b20a9b7788",
|
||||
"/chunks/upgrade-plan.js": "/chunks/upgrade-plan.js?id=c2260d7040c92a985d2a",
|
||||
"/chunks/user.js": "/chunks/user.js?id=15386bc49540b6c82629",
|
||||
"/chunks/user-create.js": "/chunks/user-create.js?id=69e2414aee55a442ecb6",
|
||||
"/chunks/user-delete.js": "/chunks/user-delete.js?id=0db4e265ccc87fc88b29",
|
||||
"/chunks/user-detail.js": "/chunks/user-detail.js?id=f754db9616ad15281b68",
|
||||
"/chunks/user-invoices.js": "/chunks/user-invoices.js?id=11dd361e6030eeca9124",
|
||||
"/chunks/user-password.js": "/chunks/user-password.js?id=172c0c1f0d182b115932",
|
||||
"/chunks/user-storage.js": "/chunks/user-storage.js?id=12cc6d01aa23b8119c7c",
|
||||
"/chunks/user-subscription.js": "/chunks/user-subscription.js?id=b2e3257a0cfa8ad13358",
|
||||
"/chunks/users.js": "/chunks/users.js?id=b69d1f8566bad80dcf7e"
|
||||
"/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~2fac28cc.js": "/vendors~chunks/admin~chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~2fac28cc.js?id=59d8a92b461069b2d8ef",
|
||||
"/chunks/admin-account~chunks/app-setup~chunks/billings-detail~chunks/create-new-password~chunks/datab~5f8db287.js": "/chunks/admin-account~chunks/app-setup~chunks/billings-detail~chunks/create-new-password~chunks/datab~5f8db287.js?id=da9787176357b5821f88",
|
||||
"/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~8cc7d96f.js": "/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~8cc7d96f.js?id=dfc34718027ffe49c095",
|
||||
"/chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser.js": "/chunks/files~chunks/platform~chunks/shared~chunks/shared/file-browser.js?id=78490a539df6de210807",
|
||||
"/chunks/admin~chunks/platform~chunks/shared.js": "/chunks/admin~chunks/platform~chunks/shared.js?id=6db60bf5154ed8946420",
|
||||
"/chunks/files~chunks/shared/file-browser~chunks/shared/single-file.js": "/chunks/files~chunks/shared/file-browser~chunks/shared/single-file.js?id=78d379b1b282c3ad5c0c",
|
||||
"/chunks/files~chunks/shared/file-browser.js": "/chunks/files~chunks/shared/file-browser.js?id=c6362b7ef3e9b06d3af7",
|
||||
"/chunks/not-found.js": "/chunks/not-found.js?id=3278798d98bd131aa379",
|
||||
"/chunks/profile~chunks/settings-password.js": "/chunks/profile~chunks/settings-password.js?id=dbfcbb7580f69474cc13",
|
||||
"/vendors~chunks/platform~chunks/shared.js": "/vendors~chunks/platform~chunks/shared.js?id=16e4937273d68f83c37f",
|
||||
"/js/main.js": "/js/main.js?id=1ced39466ba657ce3e16",
|
||||
"/css/app.css": "/css/app.css?id=a8f94d0c5a6f4a1185b1",
|
||||
"/chunks/admin.js": "/chunks/admin.js?id=c23b5f524dd386d797e5",
|
||||
"/chunks/admin-account.js": "/chunks/admin-account.js?id=a73cbe625776f823eb4e",
|
||||
"/chunks/app-appearance.js": "/chunks/app-appearance.js?id=1542b65e6edae59f17aa",
|
||||
"/chunks/app-billings.js": "/chunks/app-billings.js?id=15318dba11818d6ec888",
|
||||
"/chunks/app-email.js": "/chunks/app-email.js?id=b023f73218dda4abd604",
|
||||
"/chunks/app-index.js": "/chunks/app-index.js?id=08b7878a3fcd087c23b3",
|
||||
"/chunks/app-language.js": "/chunks/app-language.js?id=ad245f54b99ec8979f9e",
|
||||
"/chunks/app-others.js": "/chunks/app-others.js?id=256f8a571e9535774643",
|
||||
"/chunks/app-payments.js": "/chunks/app-payments.js?id=b57048c4667935499d3e",
|
||||
"/chunks/app-settings.js": "/chunks/app-settings.js?id=c6f95c5841c36de9d030",
|
||||
"/chunks/app-setup.js": "/chunks/app-setup.js?id=c0898f22c12ee8a56916",
|
||||
"/chunks/billings-detail.js": "/chunks/billings-detail.js?id=622b5dca6425427f7ea0",
|
||||
"/chunks/contact-us.js": "/chunks/contact-us.js?id=9415844c1627d307d951",
|
||||
"/chunks/create-new-password.js": "/chunks/create-new-password.js?id=ad4ac6e1e79602cbb929",
|
||||
"/chunks/dashboard.js": "/chunks/dashboard.js?id=db35f7a287b6407fc4af",
|
||||
"/chunks/database.js": "/chunks/database.js?id=669e7798dcc456197402",
|
||||
"/chunks/dynamic-page.js": "/chunks/dynamic-page.js?id=c53bdc4a88bf3f2e5434",
|
||||
"/chunks/environment-setup.js": "/chunks/environment-setup.js?id=52cde925b9687de4c29a",
|
||||
"/chunks/files.js": "/chunks/files.js?id=0fa05841bb3895d2d5e5",
|
||||
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=0708aa3e04e6ed11c91d",
|
||||
"/chunks/homepage.js": "/chunks/homepage.js?id=44552c231f6791295903",
|
||||
"/chunks/installation-disclaimer.js": "/chunks/installation-disclaimer.js?id=922ecf4d086b03abfc04",
|
||||
"/chunks/invoices.js": "/chunks/invoices.js?id=85b17b9371f4df37c00a",
|
||||
"/chunks/page-edit.js": "/chunks/page-edit.js?id=7e04b66e4bccb47e7f3f",
|
||||
"/chunks/pages.js": "/chunks/pages.js?id=76341f611821d93f1696",
|
||||
"/chunks/plan.js": "/chunks/plan.js?id=d44c79f456ece7ed20ba",
|
||||
"/chunks/plan-create.js": "/chunks/plan-create.js?id=f14b6474cc894199f962",
|
||||
"/chunks/plan-delete.js": "/chunks/plan-delete.js?id=82741fb5261f08150514",
|
||||
"/chunks/plan-settings.js": "/chunks/plan-settings.js?id=8e901b7cce8fabec9042",
|
||||
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=700253b16769e8270c73",
|
||||
"/chunks/plans.js": "/chunks/plans.js?id=dd7e195bb66f245cebbd",
|
||||
"/chunks/platform.js": "/chunks/platform.js?id=f7073145d3e27be2c880",
|
||||
"/chunks/profile.js": "/chunks/profile.js?id=bd661b08717158c5af9e",
|
||||
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=333af0b6deb880990f39",
|
||||
"/chunks/settings.js": "/chunks/settings.js?id=7726657c717fa7650d10",
|
||||
"/chunks/settings-create-payment-methods.js": "/chunks/settings-create-payment-methods.js?id=08cc16a560d5cc9b25b7",
|
||||
"/chunks/settings-invoices.js": "/chunks/settings-invoices.js?id=5ef85da047b11e2f1a21",
|
||||
"/chunks/settings-password.js": "/chunks/settings-password.js?id=19b5f0850ba9d6aa049a",
|
||||
"/chunks/settings-payment-methods.js": "/chunks/settings-payment-methods.js?id=7cfbeae7706827cd858e",
|
||||
"/chunks/settings-storage.js": "/chunks/settings-storage.js?id=c4210c768fddec3ccf9f",
|
||||
"/chunks/settings-subscription.js": "/chunks/settings-subscription.js?id=a7c2580bf4280ca3c76b",
|
||||
"/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=d60972a2216523642850",
|
||||
"/chunks/shared.js": "/chunks/shared.js?id=e72e37ffad23a1ea2a8e",
|
||||
"/chunks/shared/authenticate.js": "/chunks/shared/authenticate.js?id=86820a408438c3513b20",
|
||||
"/chunks/shared/file-browser.js": "/chunks/shared/file-browser.js?id=74d47dd07002086ba1de",
|
||||
"/chunks/shared/single-file.js": "/chunks/shared/single-file.js?id=03fb36b0d38a3218221f",
|
||||
"/chunks/sign-in.js": "/chunks/sign-in.js?id=6a401ac37ac49a729e04",
|
||||
"/chunks/sign-up.js": "/chunks/sign-up.js?id=f26bca8e48b5cfb69f30",
|
||||
"/chunks/stripe-credentials.js": "/chunks/stripe-credentials.js?id=cd44b6cf8631f690a75d",
|
||||
"/chunks/subscription-plans.js": "/chunks/subscription-plans.js?id=4cdc01a909e277284b1d",
|
||||
"/chunks/subscription-service.js": "/chunks/subscription-service.js?id=418145ac6ba4a4ba2e4a",
|
||||
"/chunks/upgrade-billing.js": "/chunks/upgrade-billing.js?id=98181a3cdcc9cc6e55c2",
|
||||
"/chunks/upgrade-plan.js": "/chunks/upgrade-plan.js?id=2eee581bb1d2586b9249",
|
||||
"/chunks/user.js": "/chunks/user.js?id=290b4b63ed5a10a5ca3c",
|
||||
"/chunks/user-create.js": "/chunks/user-create.js?id=2bfca881534622e3aa5f",
|
||||
"/chunks/user-delete.js": "/chunks/user-delete.js?id=dc708437ba1e5ebc0a0d",
|
||||
"/chunks/user-detail.js": "/chunks/user-detail.js?id=70bac25962505a1eb468",
|
||||
"/chunks/user-invoices.js": "/chunks/user-invoices.js?id=5f5cee4fbc2d5f122114",
|
||||
"/chunks/user-password.js": "/chunks/user-password.js?id=3214eb9dadcbeb1e685f",
|
||||
"/chunks/user-storage.js": "/chunks/user-storage.js?id=bfecceeadc0a2a0faf64",
|
||||
"/chunks/user-subscription.js": "/chunks/user-subscription.js?id=724f2551c1945e1071e2",
|
||||
"/chunks/users.js": "/chunks/users.js?id=bb902543025cdf7a79f2"
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
this.$router.push({name: 'InstallationDisclaimer'})
|
||||
|
||||
if (installation === 'setup-done')
|
||||
this.$store.dispatch('getLanguageTranslations', this.$root.$data.config.language)
|
||||
this.$store.dispatch('getLanguageTranslations', this.$root.$data.config.locale)
|
||||
.then(() => {
|
||||
this.isLoaded = true
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div class="mobile-toolbar">
|
||||
|
||||
<!-- Go back-->
|
||||
<div @click="goBack" class="go-back-button">
|
||||
<chevron-left-icon :class="{'is-visible': browseHistory.length > 1}" size="17" class="icon-back" />
|
||||
<div @click="goBack" class="go-back-button" :class="{'is-visible': browseHistory.length > 1}">
|
||||
<chevron-left-icon size="17" class="icon-back" />
|
||||
</div>
|
||||
|
||||
<!--Folder Title-->
|
||||
@@ -103,23 +103,25 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.go-back-button {
|
||||
text-align: left;
|
||||
flex: 1;
|
||||
.go-back-button {
|
||||
text-align: left;
|
||||
flex: 1;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
pointer-events: none;
|
||||
|
||||
.icon-back {
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
margin-top: -2px;
|
||||
.icon-back {
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
&.is-visible {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.is-visible {
|
||||
pointer-events: initial;
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.directory-name {
|
||||
line-height: 1;
|
||||
|
||||
11
resources/js/helpers.js
vendored
11
resources/js/helpers.js
vendored
@@ -215,13 +215,13 @@ const Helpers = {
|
||||
|
||||
isNotGeneralError = true,
|
||||
|
||||
striped_name = item.file.name
|
||||
.replace(/[^A-Za-z 0-9 \.,\?""!@#\$%\^&\*\(\)-_=\+;:<>\/\\\|\}\{\[\]`~]*/g, ''),
|
||||
striped_spaces = item.file.name.replace(/\s/g, '-'),
|
||||
striped_to_safe_characters = striped_spaces.match(/^[A-Za-z0-9._~()'!*:@,;+?-\W]*$/g),
|
||||
|
||||
filename = Array(16)
|
||||
source_name = Array(16)
|
||||
.fill(0)
|
||||
.map(x => Math.random().toString(36).charAt(2))
|
||||
.join('') + '-' + striped_name + '.part'
|
||||
.join('') + '-' + striped_to_safe_characters + '.part'
|
||||
|
||||
do {
|
||||
let isLast = chunks.length === 1,
|
||||
@@ -229,7 +229,8 @@ const Helpers = {
|
||||
attempts = 0
|
||||
|
||||
// Set form data
|
||||
formData.set('file', chunk, filename);
|
||||
formData.set('filename', item.file.name);
|
||||
formData.set('file', chunk, source_name);
|
||||
formData.set('folder_id', item.folder_id)
|
||||
formData.set('is_last', isLast);
|
||||
|
||||
|
||||
2
resources/js/i18n/index.js
vendored
2
resources/js/i18n/index.js
vendored
@@ -4,7 +4,7 @@ import VueI18n from 'vue-i18n';
|
||||
Vue.use(VueI18n);
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale: config.language,
|
||||
locale: config.locale,
|
||||
silentTranslationWarn: true,
|
||||
});
|
||||
|
||||
|
||||
@@ -172,6 +172,9 @@ export default {
|
||||
|
||||
if (this.storage.driver === 'backblaze')
|
||||
this.storage.endpoint = 'https://s3.' + val + '.backblazeb2.com'
|
||||
|
||||
if (this.storage.driver === 'oss')
|
||||
this.storage.endpoint = 'https://' + val + '.aliyuncs.com'
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
@@ -189,12 +192,65 @@ export default {
|
||||
case 'backblaze':
|
||||
return this.backblazeRegions
|
||||
break
|
||||
case 'oss':
|
||||
return this.ossRegions
|
||||
break
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
ossRegions: [
|
||||
{
|
||||
label: 'China (Hangzhou)',
|
||||
value: 'oss-cn-hangzhou',
|
||||
},
|
||||
{
|
||||
label: 'China (Shanghai)',
|
||||
value: 'oss-cn-shanghai',
|
||||
},
|
||||
{
|
||||
label: 'China (Qingdao)',
|
||||
value: 'oss-cn-qingdao',
|
||||
},
|
||||
{
|
||||
label: 'China (Beijing)',
|
||||
value: 'oss-cn-beijing',
|
||||
},
|
||||
{
|
||||
label: 'China (Zhangjiakou)',
|
||||
value: 'oss-cn-zhangjiakou',
|
||||
},
|
||||
{
|
||||
label: 'China (Hohhot)',
|
||||
value: 'oss-cn-huhehaote',
|
||||
},
|
||||
{
|
||||
label: 'China (Ulanqab)',
|
||||
value: 'oss-cn-wulanchabu',
|
||||
},
|
||||
{
|
||||
label: 'China (Shenzhen)',
|
||||
value: 'oss-cn-shenzhen',
|
||||
},
|
||||
{
|
||||
label: 'China (Heyuan)',
|
||||
value: 'oss-cn-heyuan',
|
||||
},
|
||||
{
|
||||
label: 'China (Guangzhou)',
|
||||
value: 'oss-cn-guangzhou',
|
||||
},
|
||||
{
|
||||
label: 'China (Chengdu)',
|
||||
value: 'oss-cn-chengdu',
|
||||
},
|
||||
{
|
||||
label: 'China (Hong Kong)',
|
||||
value: 'oss-cn-hongkong',
|
||||
},
|
||||
],
|
||||
wasabiRegions: [
|
||||
{
|
||||
label: 'US East 1 (N. Virginia)',
|
||||
@@ -352,6 +408,10 @@ export default {
|
||||
label: 'Backblaze B2 Cloud Storage',
|
||||
value: 'backblaze',
|
||||
},
|
||||
{
|
||||
label: 'Alibaba Cloud OSS',
|
||||
value: 'oss',
|
||||
},
|
||||
],
|
||||
encryptionList: [
|
||||
{
|
||||
|
||||
@@ -40,8 +40,7 @@
|
||||
let config = {
|
||||
host: '{{ url('/') }}',
|
||||
api: '{{ url('/api') }}',
|
||||
locale: '{{ \Illuminate\Support\Facades\App::getLocale() }}',
|
||||
language: '{{ $settings->language ?? 'en' }}',
|
||||
locale: '{{ app()->getLocale() }}',
|
||||
|
||||
app_color: '{{ $settings->app_color ?? '#00BC7E' }}',
|
||||
app_logo: '{{ $settings->app_logo ?? null }}',
|
||||
|
||||
@@ -361,6 +361,7 @@ class AdminTest extends TestCase
|
||||
->create("fake-file-$index.pdf", 1200, 'application/pdf');
|
||||
|
||||
$this->postJson('/api/upload', [
|
||||
'filename' => $file->name,
|
||||
'file' => $file,
|
||||
'folder_id' => null,
|
||||
'is_last' => true,
|
||||
|
||||
@@ -248,18 +248,18 @@ class LanguageEditorTest extends TestCase
|
||||
]);
|
||||
|
||||
$this->assertEquals(
|
||||
__t('actions.close'),
|
||||
'Close'
|
||||
'Close',
|
||||
__t('actions.close')
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
__t('shared_link_email_subject', ['user' => 'John']),
|
||||
'🙋 John share some files with you. Look at it!'
|
||||
'🙋 John share some files with you. Look at it!',
|
||||
__t('shared_link_email_subject', ['user' => 'John'])
|
||||
);
|
||||
|
||||
$this->assertEquals(
|
||||
__t('test', ['name' => 'John', 'surname' => 'Doe']),
|
||||
'Hi, my name is John Doe'
|
||||
'Hi, my name is John Doe',
|
||||
__t('test', ['name' => 'John', 'surname' => 'Doe'])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ class FileTest extends TestCase
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
$this->postJson('/api/upload', [
|
||||
'filename' => $file->name,
|
||||
'file' => $file,
|
||||
'folder_id' => null,
|
||||
'is_last' => true,
|
||||
@@ -97,6 +98,7 @@ class FileTest extends TestCase
|
||||
Sanctum::actingAs($user);
|
||||
|
||||
$this->postJson('/api/upload', [
|
||||
'filename' => $file->name,
|
||||
'file' => $file,
|
||||
'folder_id' => null,
|
||||
'is_last' => true,
|
||||
@@ -266,6 +268,7 @@ class FileTest extends TestCase
|
||||
->create("fake-file-$index.pdf", 1200, 'application/pdf');
|
||||
|
||||
$this->postJson('/api/upload', [
|
||||
'filename' => $file->name,
|
||||
'file' => $file,
|
||||
'folder_id' => null,
|
||||
'is_last' => true,
|
||||
@@ -324,6 +327,7 @@ class FileTest extends TestCase
|
||||
->create("fake-file-$index.pdf", 1200, 'application/pdf');
|
||||
|
||||
$this->postJson('/api/upload', [
|
||||
'filename' => $file->name,
|
||||
'file' => $file,
|
||||
'folder_id' => null,
|
||||
'is_last' => true,
|
||||
|
||||
@@ -415,6 +415,7 @@ class FolderTest extends TestCase
|
||||
->create("fake-file-$index.pdf", 1200, 'application/pdf');
|
||||
|
||||
$this->postJson('/api/upload', [
|
||||
'filename' => $file->name,
|
||||
'file' => $file,
|
||||
'folder_id' => $folder->id,
|
||||
'is_last' => true,
|
||||
@@ -483,6 +484,7 @@ class FolderTest extends TestCase
|
||||
->create("fake-file-$index.pdf", 1200, 'application/pdf');
|
||||
|
||||
$this->postJson('/api/upload', [
|
||||
'filename' => $file->name,
|
||||
'file' => $file,
|
||||
'folder_id' => $folder->id,
|
||||
'is_last' => true,
|
||||
|
||||
@@ -89,6 +89,7 @@ class TrashTest extends TestCase
|
||||
->image('fake-image.jpg');
|
||||
|
||||
$this->postJson('/api/upload', [
|
||||
'filename' => $image->name,
|
||||
'file' => $image,
|
||||
'folder_id' => null,
|
||||
'is_last' => true,
|
||||
|
||||
@@ -7,4 +7,9 @@ use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
abstract class TestCase extends BaseTestCase
|
||||
{
|
||||
use CreatesApplication;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user