mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-05-30 23:44:41 +00:00
license upgrade function
This commit is contained in:
@@ -905,7 +905,7 @@ return [
|
|||||||
'total_x_of_x_members' => 'Total {use} of {total} Members',
|
'total_x_of_x_members' => 'Total {use} of {total} Members',
|
||||||
'go_back_from_x' => 'Go back from {location}',
|
'go_back_from_x' => 'Go back from {location}',
|
||||||
'new_team_invitation' => 'New Team Invitation',
|
'new_team_invitation' => 'New Team Invitation',
|
||||||
'x_invite_to_join_team' => ":name invite you to join into Team Folder.",
|
'x_invite_to_join_team' => ':name invite you to join into Team Folder.',
|
||||||
'team_invitation_notify_title' => 'You are invited to collaboration with team folder in :app',
|
'team_invitation_notify_title' => 'You are invited to collaboration with team folder in :app',
|
||||||
'team_invitation_notify_desc' => 'You are invited to collaboration with team folder',
|
'team_invitation_notify_desc' => 'You are invited to collaboration with team folder',
|
||||||
'team_invitation_notify_desc_without_account' => 'You are invited to collaboration with team folder. But at first, you have to create an account to proceed into team folder.',
|
'team_invitation_notify_desc_without_account' => 'You are invited to collaboration with team folder. But at first, you have to create an account to proceed into team folder.',
|
||||||
@@ -915,12 +915,12 @@ return [
|
|||||||
'file_request_filled_desc' => "Your file request for ':name' folder was filled successfully.",
|
'file_request_filled_desc' => "Your file request for ':name' folder was filled successfully.",
|
||||||
'show_files' => 'Show Files',
|
'show_files' => 'Show Files',
|
||||||
'file_request_filled_mail' => "Your file request was fulfilled in your ':name' folder",
|
'file_request_filled_mail' => "Your file request was fulfilled in your ':name' folder",
|
||||||
'file_request_filled_mail_note' => "We are emailing you because your file request was fulfilled. Please click on the link below to show uploaded files.",
|
'file_request_filled_mail_note' => 'We are emailing you because your file request was fulfilled. Please click on the link below to show uploaded files.',
|
||||||
'thanks_salutation' => 'Thank you for using our application!',
|
'thanks_salutation' => 'Thank you for using our application!',
|
||||||
'upload_your_files' => 'Upload your Files',
|
'upload_your_files' => 'Upload your Files',
|
||||||
'file_request_optional_message' => "PS: :name left you a message: :notes",
|
'file_request_optional_message' => 'PS: :name left you a message: :notes',
|
||||||
'file_request_notify_title' => ':name Request You for File Upload',
|
'file_request_notify_title' => ':name Request You for File Upload',
|
||||||
'file_request_notify_description' => "We are emailing you because :name requested files from you. Please click on the link below and upload your files for :name.",
|
'file_request_notify_description' => 'We are emailing you because :name requested files from you. Please click on the link below and upload your files for :name.',
|
||||||
'user_action_not_allowed' => 'This user action is not allowed.',
|
'user_action_not_allowed' => 'This user action is not allowed.',
|
||||||
'pcs.' => 'Pcs.',
|
'pcs.' => 'Pcs.',
|
||||||
'mem.' => 'Mem.',
|
'mem.' => 'Mem.',
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'version' => '2.0.5',
|
'version' => '2.0.6',
|
||||||
|
|
||||||
'is_demo' => env('APP_DEMO', false),
|
'is_demo' => env('APP_DEMO', false),
|
||||||
|
|
||||||
|
|||||||
+70
-70
@@ -1,75 +1,75 @@
|
|||||||
{
|
{
|
||||||
"/js/main.js": "/js/main.js",
|
"/js/main.js": "/js/main.js",
|
||||||
"/chunks/request.js": "/chunks/request.js?id=37e3e34fbcc98d4c",
|
"/chunks/request.js": "/chunks/request.js?id=5b796b8410a96a49",
|
||||||
"/chunks/request-upload.js": "/chunks/request-upload.js?id=2a6d910114ffb8d2",
|
"/chunks/request-upload.js": "/chunks/request-upload.js?id=b1aaf8357a30794a",
|
||||||
"/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=3c2fc454c3fce8d2",
|
"/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=19a0784e59d768ec",
|
||||||
"/chunks/status-check.js": "/chunks/status-check.js?id=783c6143db13e6c0",
|
"/chunks/status-check.js": "/chunks/status-check.js?id=51a75f0b3b260189",
|
||||||
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=c1df85c34d7e9521",
|
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=df5bd89528649783",
|
||||||
"/chunks/database.js": "/chunks/database.js?id=d4f38bfdef26b0d9",
|
"/chunks/database.js": "/chunks/database.js?id=15cc488117dccf7b",
|
||||||
"/chunks/environment-setup.js": "/chunks/environment-setup.js?id=730fb9166467e30c",
|
"/chunks/environment-setup.js": "/chunks/environment-setup.js?id=e1ad83583367917a",
|
||||||
"/chunks/app-setup.js": "/chunks/app-setup.js?id=c2c7385ecb0fae87",
|
"/chunks/app-setup.js": "/chunks/app-setup.js?id=288594cd7f628cf8",
|
||||||
"/chunks/admin-account.js": "/chunks/admin-account.js?id=d21b66f2b6e1638e",
|
"/chunks/admin-account.js": "/chunks/admin-account.js?id=916450217130f3b8",
|
||||||
"/chunks/shared.js": "/chunks/shared.js?id=52ff66b9c01f84ef",
|
"/chunks/shared.js": "/chunks/shared.js?id=96268e9b7e8e8a19",
|
||||||
"/chunks/shared/browser.js": "/chunks/shared/browser.js?id=a9710655d75c8079",
|
"/chunks/shared/browser.js": "/chunks/shared/browser.js?id=3dc8fdb008b6ff5f",
|
||||||
"/chunks/shared/single-file.js": "/chunks/shared/single-file.js?id=c013d98f7386c448",
|
"/chunks/shared/single-file.js": "/chunks/shared/single-file.js?id=9ccb8bb19b95a23f",
|
||||||
"/chunks/shared/authenticate.js": "/chunks/shared/authenticate.js?id=ca8cc89fe5982782",
|
"/chunks/shared/authenticate.js": "/chunks/shared/authenticate.js?id=672e931a9fb0b672",
|
||||||
"/chunks/not-found.js": "/chunks/not-found.js?id=4cb8d3a7a2212c3c",
|
"/chunks/not-found.js": "/chunks/not-found.js?id=9f6ce23ce5d969f1",
|
||||||
"/chunks/temporary-unavailable.js": "/chunks/temporary-unavailable.js?id=c71981d946a9ca71",
|
"/chunks/temporary-unavailable.js": "/chunks/temporary-unavailable.js?id=f564565faa09d6d6",
|
||||||
"/chunks/admin.js": "/chunks/admin.js?id=4c86279cd6e85aa5",
|
"/chunks/admin.js": "/chunks/admin.js?id=5220642a9e4d30d4",
|
||||||
"/chunks/dashboard.js": "/chunks/dashboard.js?id=d8740b43db79abfe",
|
"/chunks/dashboard.js": "/chunks/dashboard.js?id=133a58e66dfd8072",
|
||||||
"/chunks/invoices.js": "/chunks/invoices.js?id=70fb9a603be2f554",
|
"/chunks/invoices.js": "/chunks/invoices.js?id=1416cbf6d1a593ac",
|
||||||
"/chunks/subscriptions.js": "/chunks/subscriptions.js?id=94e96e1bb505ae59",
|
"/chunks/subscriptions.js": "/chunks/subscriptions.js?id=5bf6704f5b599f36",
|
||||||
"/chunks/pages.js": "/chunks/pages.js?id=d1f5d211e9dfc4ae",
|
"/chunks/pages.js": "/chunks/pages.js?id=c8380d571e91e8be",
|
||||||
"/chunks/page-edit.js": "/chunks/page-edit.js?id=184547a95a64a121",
|
"/chunks/page-edit.js": "/chunks/page-edit.js?id=fb3f9eda3dc1d15c",
|
||||||
"/chunks/plans.js": "/chunks/plans.js?id=f6e9d2f34fac6d79",
|
"/chunks/plans.js": "/chunks/plans.js?id=c8506e0e20966ef7",
|
||||||
"/chunks/users.js": "/chunks/users.js?id=651b8af7afecc88e",
|
"/chunks/users.js": "/chunks/users.js?id=ec687ee365c4248a",
|
||||||
"/chunks/user-create.js": "/chunks/user-create.js?id=d24c5037b91a2fa2",
|
"/chunks/user-create.js": "/chunks/user-create.js?id=8dd9d29f024132f5",
|
||||||
"/chunks/plan-create/fixed.js": "/chunks/plan-create/fixed.js?id=20a6ee217157864f",
|
"/chunks/plan-create/fixed.js": "/chunks/plan-create/fixed.js?id=b24d8dbe1f0f706f",
|
||||||
"/chunks/plan-create/metered.js": "/chunks/plan-create/metered.js?id=617982724a144a43",
|
"/chunks/plan-create/metered.js": "/chunks/plan-create/metered.js?id=d9f1bcb1fe44a6ae",
|
||||||
"/chunks/user.js": "/chunks/user.js?id=dae4ac26750f99d0",
|
"/chunks/user.js": "/chunks/user.js?id=c191b906a0496fe5",
|
||||||
"/chunks/user-detail.js": "/chunks/user-detail.js?id=d56437755ba2c6cc",
|
"/chunks/user-detail.js": "/chunks/user-detail.js?id=f9e17ff98354e984",
|
||||||
"/chunks/user-storage.js": "/chunks/user-storage.js?id=c26b370f6f4323fe",
|
"/chunks/user-storage.js": "/chunks/user-storage.js?id=a8e0bce4703232a0",
|
||||||
"/chunks/user-subscription.js": "/chunks/user-subscription.js?id=6d7d1235d1ae5bf2",
|
"/chunks/user-subscription.js": "/chunks/user-subscription.js?id=bfe357e0ea955be0",
|
||||||
"/chunks/user-password.js": "/chunks/user-password.js?id=acd9b49cca55d161",
|
"/chunks/user-password.js": "/chunks/user-password.js?id=23d3aee39f539a3c",
|
||||||
"/chunks/user-delete.js": "/chunks/user-delete.js?id=47d44b2f8e4e620c",
|
"/chunks/user-delete.js": "/chunks/user-delete.js?id=827a05e01cbc657d",
|
||||||
"/chunks/plan.js": "/chunks/plan.js?id=d8ffa85dc9b68966",
|
"/chunks/plan.js": "/chunks/plan.js?id=4b267375ea9f19b3",
|
||||||
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=3010ddb4ba7419e9",
|
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=a956ceca6865c50c",
|
||||||
"/chunks/plan-settings.js": "/chunks/plan-settings.js?id=d3c236e167831f25",
|
"/chunks/plan-settings.js": "/chunks/plan-settings.js?id=715ee86991d5e4db",
|
||||||
"/chunks/plan-delete.js": "/chunks/plan-delete.js?id=44ad905bfe1ae983",
|
"/chunks/plan-delete.js": "/chunks/plan-delete.js?id=1ad77372d342326f",
|
||||||
"/chunks/payments.js": "/chunks/payments.js?id=051e8246e2b5c9d0",
|
"/chunks/payments.js": "/chunks/payments.js?id=dc4586691c25de6f",
|
||||||
"/chunks/payments/billings.js": "/chunks/payments/billings.js?id=7ec4ad9b9755b2b8",
|
"/chunks/payments/billings.js": "/chunks/payments/billings.js?id=dd6c9d6a29a47808",
|
||||||
"/chunks/payments/settings.js": "/chunks/payments/settings.js?id=6644b642875c732f",
|
"/chunks/payments/settings.js": "/chunks/payments/settings.js?id=5b139952f337c83e",
|
||||||
"/chunks/app-settings.js": "/chunks/app-settings.js?id=692d3291fb9d2cf7",
|
"/chunks/app-settings.js": "/chunks/app-settings.js?id=55da23af2b076069",
|
||||||
"/chunks/app-appearance.js": "/chunks/app-appearance.js?id=27652021b725b9e7",
|
"/chunks/app-appearance.js": "/chunks/app-appearance.js?id=a694a01f3641712c",
|
||||||
"/chunks/app-index.js": "/chunks/app-index.js?id=968d5378d871f070",
|
"/chunks/app-index.js": "/chunks/app-index.js?id=efdbfa062749ca00",
|
||||||
"/chunks/app-environment.js": "/chunks/app-environment.js?id=95721b77904eb196",
|
"/chunks/app-environment.js": "/chunks/app-environment.js?id=9632034e8ded7d34",
|
||||||
"/chunks/app-others.js": "/chunks/app-others.js?id=2c024715a619858e",
|
"/chunks/app-others.js": "/chunks/app-others.js?id=0f84e2ed1230558e",
|
||||||
"/chunks/app-sign-in-out.js": "/chunks/app-sign-in-out.js?id=ea65b443a513ad8c",
|
"/chunks/app-sign-in-out.js": "/chunks/app-sign-in-out.js?id=1cfffc99465b9a7a",
|
||||||
"/chunks/app-adsense.js": "/chunks/app-adsense.js?id=c4c4cda03202a49a",
|
"/chunks/app-adsense.js": "/chunks/app-adsense.js?id=a5dc9e715f8561bd",
|
||||||
"/chunks/app-server.js": "/chunks/app-server.js?id=307fce5c9d192bf3",
|
"/chunks/app-server.js": "/chunks/app-server.js?id=4510d63685353c68",
|
||||||
"/chunks/app-language.js": "/chunks/app-language.js?id=51c79c7bdb8f9382",
|
"/chunks/app-language.js": "/chunks/app-language.js?id=7e5f3d5ec447e397",
|
||||||
"/chunks/homepage.js": "/chunks/homepage.js?id=dab18013ce4a716e",
|
"/chunks/homepage.js": "/chunks/homepage.js?id=6c36b3e1f95c071d",
|
||||||
"/chunks/dynamic-page.js": "/chunks/dynamic-page.js?id=e110e8923b6ca22f",
|
"/chunks/dynamic-page.js": "/chunks/dynamic-page.js?id=2504793131107b1f",
|
||||||
"/chunks/contact-us.js": "/chunks/contact-us.js?id=54d3469e6d46cef6",
|
"/chunks/contact-us.js": "/chunks/contact-us.js?id=2e0b16655d2d85d7",
|
||||||
"/chunks/successfully-email-verified.js": "/chunks/successfully-email-verified.js?id=3153532f0d2273c8",
|
"/chunks/successfully-email-verified.js": "/chunks/successfully-email-verified.js?id=25b805ade5230382",
|
||||||
"/chunks/successfully-email-send.js": "/chunks/successfully-email-send.js?id=d630ed9f6f558509",
|
"/chunks/successfully-email-send.js": "/chunks/successfully-email-send.js?id=f4562229776d9f56",
|
||||||
"/chunks/sign-in.js": "/chunks/sign-in.js?id=73e0fd17a1b1677d",
|
"/chunks/sign-in.js": "/chunks/sign-in.js?id=295d214d04f2a86d",
|
||||||
"/chunks/sign-up.js": "/chunks/sign-up.js?id=920ebe5b86e59c09",
|
"/chunks/sign-up.js": "/chunks/sign-up.js?id=77351b7631a6ee6c",
|
||||||
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=9c62b8573fbdd567",
|
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=50a1bc5e4ed86ec9",
|
||||||
"/chunks/create-new-password.js": "/chunks/create-new-password.js?id=926b35b6745d99ba",
|
"/chunks/create-new-password.js": "/chunks/create-new-password.js?id=f652de052dba55c1",
|
||||||
"/chunks/settings.js": "/chunks/settings.js?id=efd739cafc57e762",
|
"/chunks/settings.js": "/chunks/settings.js?id=356111c5ced7b42b",
|
||||||
"/chunks/profile.js": "/chunks/profile.js?id=e92af0c70da9aa83",
|
"/chunks/profile.js": "/chunks/profile.js?id=7d3719710c55ceeb",
|
||||||
"/chunks/settings-password.js": "/chunks/settings-password.js?id=080d3133ed6bc14c",
|
"/chunks/settings-password.js": "/chunks/settings-password.js?id=11d4331650cac280",
|
||||||
"/chunks/settings-storage.js": "/chunks/settings-storage.js?id=736118b6409186cc",
|
"/chunks/settings-storage.js": "/chunks/settings-storage.js?id=994b669a56fd417b",
|
||||||
"/chunks/billing.js": "/chunks/billing.js?id=86f8963f7e09b2a8",
|
"/chunks/billing.js": "/chunks/billing.js?id=c00460dcfd3403a8",
|
||||||
"/chunks/platform.js": "/chunks/platform.js?id=26226482ea064001",
|
"/chunks/platform.js": "/chunks/platform.js?id=86aefe46c825e07d",
|
||||||
"/chunks/files.js": "/chunks/files.js?id=5d6eb9b9f9ecd296",
|
"/chunks/files.js": "/chunks/files.js?id=060b1a34dfdbe97c",
|
||||||
"/chunks/recent-uploads.js": "/chunks/recent-uploads.js?id=827d3a5dcce159b5",
|
"/chunks/recent-uploads.js": "/chunks/recent-uploads.js?id=0f63bbc02ad8f3e1",
|
||||||
"/chunks/my-shared-items.js": "/chunks/my-shared-items.js?id=2a4e4e0db02cbcbb",
|
"/chunks/my-shared-items.js": "/chunks/my-shared-items.js?id=0a06d32b4cf8b52c",
|
||||||
"/chunks/trash.js": "/chunks/trash.js?id=8362aa0f91231350",
|
"/chunks/trash.js": "/chunks/trash.js?id=ac5389500f8f7912",
|
||||||
"/chunks/team-folders.js": "/chunks/team-folders.js?id=0a46fecf35a23406",
|
"/chunks/team-folders.js": "/chunks/team-folders.js?id=c0a03c6937856ca1",
|
||||||
"/chunks/shared-with-me.js": "/chunks/shared-with-me.js?id=77a33583775c6d8f",
|
"/chunks/shared-with-me.js": "/chunks/shared-with-me.js?id=88fa008db0c6a4f6",
|
||||||
"/chunks/invitation.js": "/chunks/invitation.js?id=64a211c90b505767",
|
"/chunks/invitation.js": "/chunks/invitation.js?id=9ed8456c9d6d5ce1",
|
||||||
"/css/tailwind.css": "/css/tailwind.css",
|
"/css/tailwind.css": "/css/tailwind.css",
|
||||||
"/css/app.css": "/css/app.css"
|
"/css/app.css": "/css/app.css"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<key-icon v-if="icon === 'key'" size="22" class="vue-feather text-theme dark-text-theme mr-3" />
|
<key-icon v-if="icon === 'key'" size="22" class="vue-feather text-theme dark-text-theme mr-3" />
|
||||||
<users-icon v-if="icon === 'users'" size="22" class="vue-feather text-theme dark-text-theme mr-3" />
|
<users-icon v-if="icon === 'users'" size="22" class="vue-feather text-theme dark-text-theme mr-3" />
|
||||||
<wifi-icon v-if="icon === 'wifi'" size="22" class="vue-feather text-theme dark-text-theme mr-3" />
|
<wifi-icon v-if="icon === 'wifi'" size="22" class="vue-feather text-theme dark-text-theme mr-3" />
|
||||||
|
<trending-up-icon v-if="icon === 'trending-up'" size="22" class="vue-feather text-theme dark-text-theme mr-3" />
|
||||||
<b class="text-md font-bold dark:text-gray-200 sm:text-lg">
|
<b class="text-md font-bold dark:text-gray-200 sm:text-lg">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</b>
|
</b>
|
||||||
@@ -26,6 +27,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
|
TrendingUpIcon,
|
||||||
WifiIcon,
|
WifiIcon,
|
||||||
ListIcon,
|
ListIcon,
|
||||||
MailIcon,
|
MailIcon,
|
||||||
@@ -50,6 +52,7 @@ export default {
|
|||||||
name: 'FormLabel',
|
name: 'FormLabel',
|
||||||
props: ['icon'],
|
props: ['icon'],
|
||||||
components: {
|
components: {
|
||||||
|
TrendingUpIcon,
|
||||||
WifiIcon,
|
WifiIcon,
|
||||||
ListIcon,
|
ListIcon,
|
||||||
MailIcon,
|
MailIcon,
|
||||||
|
|||||||
@@ -1,107 +1,108 @@
|
|||||||
<template>
|
<template>
|
||||||
<PageTab :is-loading="isLoading">
|
<PageTab :is-loading="isLoading">
|
||||||
<!--Store & Upload-->
|
|
||||||
|
<!--Store & Upload-->
|
||||||
<div v-if="app" class="card shadow-card">
|
<div v-if="app" class="card shadow-card">
|
||||||
<FormLabel>
|
<FormLabel>
|
||||||
{{ $t('storage_upload') }}
|
{{ $t('storage_upload') }}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
|
||||||
<!--Available only when is not metered billing-->
|
<!--Available only when is not metered billing-->
|
||||||
<div v-if="config.subscriptionType !== 'metered'">
|
<div v-if="config.subscriptionType !== 'metered'">
|
||||||
<AppInputSwitch
|
<AppInputSwitch
|
||||||
:title="$t('admin_settings.others.storage_limit')"
|
:title="$t('admin_settings.others.storage_limit')"
|
||||||
:description="$t('admin_settings.others.storage_limit_help')"
|
:description="$t('admin_settings.others.storage_limit_help')"
|
||||||
>
|
>
|
||||||
<SwitchInput
|
<SwitchInput
|
||||||
@input="$updateText('/admin/settings', 'storage_limitation', app.storageLimitation)"
|
@input="$updateText('/admin/settings', 'storage_limitation', app.storageLimitation)"
|
||||||
v-model="app.storageLimitation"
|
v-model="app.storageLimitation"
|
||||||
:state="app.storageLimitation"
|
:state="app.storageLimitation"
|
||||||
class="switch"
|
class="switch"
|
||||||
/>
|
/>
|
||||||
</AppInputSwitch>
|
</AppInputSwitch>
|
||||||
|
|
||||||
<AppInputText v-if="app.storageLimitation" :title="$t('admin_settings.others.default_storage')">
|
<AppInputText v-if="app.storageLimitation" :title="$t('admin_settings.others.default_storage')">
|
||||||
<input
|
<input
|
||||||
@input="$updateText('/admin/settings', 'default_max_storage_amount', app.defaultStorage)"
|
@input="$updateText('/admin/settings', 'default_max_storage_amount', app.defaultStorage)"
|
||||||
v-model="app.defaultStorage"
|
v-model="app.defaultStorage"
|
||||||
min="1"
|
min="1"
|
||||||
max="999999999"
|
max="999999999"
|
||||||
:placeholder="$t('admin_settings.others.default_storage_plac')"
|
:placeholder="$t('admin_settings.others.default_storage_plac')"
|
||||||
type="number"
|
type="number"
|
||||||
class="focus-border-theme input-dark"
|
class="focus-border-theme input-dark"
|
||||||
/>
|
/>
|
||||||
</AppInputText>
|
</AppInputText>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AppInputText
|
<AppInputText
|
||||||
:title="$t('admin_settings.others.upload_limit')"
|
:title="$t('admin_settings.others.upload_limit')"
|
||||||
:description="$t('admin_settings.others.upload_limit_help')"
|
:description="$t('admin_settings.others.upload_limit_help')"
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
@input="$updateText('/admin/settings', 'upload_limit', app.uploadLimit, true)"
|
@input="$updateText('/admin/settings', 'upload_limit', app.uploadLimit, true)"
|
||||||
v-model="app.uploadLimit"
|
v-model="app.uploadLimit"
|
||||||
:placeholder="$t('admin_settings.others.upload_limit_plac')"
|
:placeholder="$t('admin_settings.others.upload_limit_plac')"
|
||||||
type="number"
|
type="number"
|
||||||
min="0"
|
min="0"
|
||||||
step="1"
|
step="1"
|
||||||
class="focus-border-theme input-dark"
|
class="focus-border-theme input-dark"
|
||||||
/>
|
/>
|
||||||
</AppInputText>
|
</AppInputText>
|
||||||
|
|
||||||
<AppInputText
|
<AppInputText
|
||||||
:title="$t('admin_settings.others.mimetypes_blacklist')"
|
:title="$t('admin_settings.others.mimetypes_blacklist')"
|
||||||
:description="$t('admin_settings.others.mimetypes_blacklist_help')"
|
:description="$t('admin_settings.others.mimetypes_blacklist_help')"
|
||||||
:is-last="true"
|
:is-last="true"
|
||||||
>
|
>
|
||||||
<textarea
|
<textarea
|
||||||
rows="2"
|
rows="2"
|
||||||
@input="$updateText('/admin/settings', 'mimetypes_blacklist', app.mimetypesBlacklist, true)"
|
@input="$updateText('/admin/settings', 'mimetypes_blacklist', app.mimetypesBlacklist, true)"
|
||||||
v-model="app.mimetypesBlacklist"
|
v-model="app.mimetypesBlacklist"
|
||||||
:placeholder="$t('admin_settings.others.mimetypes_blacklist_plac')"
|
:placeholder="$t('admin_settings.others.mimetypes_blacklist_plac')"
|
||||||
type="text"
|
type="text"
|
||||||
class="focus-border-theme input-dark"
|
class="focus-border-theme input-dark"
|
||||||
/>
|
/>
|
||||||
</AppInputText>
|
</AppInputText>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ReCaptcha -->
|
<!-- ReCaptcha -->
|
||||||
<div v-if="app" class="card shadow-card">
|
<div v-if="app" class="card shadow-card">
|
||||||
<FormLabel icon="shield">
|
<FormLabel icon="shield">
|
||||||
{{ $t('reCaptcha') }}
|
{{ $t('reCaptcha') }}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
|
|
||||||
<AppInputSwitch
|
<AppInputSwitch
|
||||||
:title="$t('allow_recaptcha')"
|
:title="$t('allow_recaptcha')"
|
||||||
:description="$t('allow_recaptcha_note')"
|
:description="$t('allow_recaptcha_note')"
|
||||||
:is-last="!recaptcha.allowedService"
|
:is-last="!recaptcha.allowedService"
|
||||||
>
|
>
|
||||||
<SwitchInput
|
<SwitchInput
|
||||||
@input="$updateText('/admin/settings', 'allowed_recaptcha', recaptcha.allowedService)"
|
@input="$updateText('/admin/settings', 'allowed_recaptcha', recaptcha.allowedService)"
|
||||||
v-model="recaptcha.allowedService"
|
v-model="recaptcha.allowedService"
|
||||||
class="switch"
|
class="switch"
|
||||||
:state="recaptcha.allowedService"
|
:state="recaptcha.allowedService"
|
||||||
/>
|
/>
|
||||||
</AppInputSwitch>
|
</AppInputSwitch>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="config.isRecaptchaConfigured && recaptcha.allowedService"
|
v-if="config.isRecaptchaConfigured && recaptcha.allowedService"
|
||||||
@click="recaptcha.isVisibleCredentialsForm = !recaptcha.isVisibleCredentialsForm"
|
@click="recaptcha.isVisibleCredentialsForm = !recaptcha.isVisibleCredentialsForm"
|
||||||
class="flex cursor-pointer items-center"
|
class="flex cursor-pointer items-center"
|
||||||
:class="{ 'mb-4': recaptcha.isVisibleCredentialsForm }"
|
:class="{ 'mb-4': recaptcha.isVisibleCredentialsForm }"
|
||||||
>
|
>
|
||||||
<edit2-icon size="12" class="vue-feather text-theme mr-2" />
|
<edit2-icon size="12" class="vue-feather text-theme mr-2" />
|
||||||
<b class="text-xs">{{ $t('update_your_credentials') }}</b>
|
<b class="text-xs">{{ $t('update_your_credentials') }}</b>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--Set up recaptcha credentials-->
|
<!--Set up recaptcha credentials-->
|
||||||
<ValidationObserver
|
<ValidationObserver
|
||||||
v-if="(!config.isRecaptchaConfigured || recaptcha.isVisibleCredentialsForm) && recaptcha.allowedService"
|
v-if="(!config.isRecaptchaConfigured || recaptcha.isVisibleCredentialsForm) && recaptcha.allowedService"
|
||||||
@submit.prevent="storeCredentials('recaptcha')"
|
@submit.prevent="storeCredentials('recaptcha')"
|
||||||
ref="credentialsForm"
|
ref="credentialsForm"
|
||||||
v-slot="{ invalid }"
|
v-slot="{ invalid }"
|
||||||
tag="form"
|
tag="form"
|
||||||
class="rounded-xl p-5 shadow-lg"
|
class="rounded-xl p-5 shadow-lg"
|
||||||
>
|
>
|
||||||
<FormLabel v-if="!config.isRecaptchaConfigured" icon="shield">
|
<FormLabel v-if="!config.isRecaptchaConfigured" icon="shield">
|
||||||
{{ $t('configure_your_credentials') }}
|
{{ $t('configure_your_credentials') }}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
@@ -109,34 +110,34 @@
|
|||||||
<ValidationProvider tag="div" mode="passive" name="Site Key" rules="required" v-slot="{ errors }">
|
<ValidationProvider tag="div" mode="passive" name="Site Key" rules="required" v-slot="{ errors }">
|
||||||
<AppInputText :title="$t('Site Key')" :error="errors[0]">
|
<AppInputText :title="$t('Site Key')" :error="errors[0]">
|
||||||
<input
|
<input
|
||||||
v-model="recaptcha.credentials.client_id"
|
v-model="recaptcha.credentials.client_id"
|
||||||
:placeholder="$t('Paste your Site Key here')"
|
:placeholder="$t('Paste your Site Key here')"
|
||||||
type="text"
|
type="text"
|
||||||
:class="{ '!border-rose-600': errors[0] }"
|
:class="{ '!border-rose-600': errors[0] }"
|
||||||
class="focus-border-theme input-dark"
|
class="focus-border-theme input-dark"
|
||||||
/>
|
/>
|
||||||
</AppInputText>
|
</AppInputText>
|
||||||
</ValidationProvider>
|
</ValidationProvider>
|
||||||
|
|
||||||
<ValidationProvider tag="div" mode="passive" name="Secret key" rules="required" v-slot="{ errors }">
|
<ValidationProvider tag="div" mode="passive" name="Secret key" rules="required" v-slot="{ errors }">
|
||||||
<AppInputText :title="$t('Secret Key')" :error="errors[0]">
|
<AppInputText :title="$t('Secret Key')" :error="errors[0]">
|
||||||
<input
|
<input
|
||||||
v-model="recaptcha.credentials.client_secret"
|
v-model="recaptcha.credentials.client_secret"
|
||||||
:placeholder="$t('Paste your Secret key here')"
|
:placeholder="$t('Paste your Secret key here')"
|
||||||
type="text"
|
type="text"
|
||||||
:class="{ '!border-rose-600': errors[0] }"
|
:class="{ '!border-rose-600': errors[0] }"
|
||||||
class="focus-border-theme input-dark"
|
class="focus-border-theme input-dark"
|
||||||
/>
|
/>
|
||||||
</AppInputText>
|
</AppInputText>
|
||||||
</ValidationProvider>
|
</ValidationProvider>
|
||||||
|
|
||||||
<ButtonBase
|
<ButtonBase
|
||||||
:disabled="isLoading"
|
:disabled="isLoading"
|
||||||
:loading="isLoading"
|
:loading="isLoading"
|
||||||
button-style="theme"
|
button-style="theme"
|
||||||
type="submit"
|
type="submit"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
>
|
>
|
||||||
{{ $t('store_credentials') }}
|
{{ $t('store_credentials') }}
|
||||||
</ButtonBase>
|
</ButtonBase>
|
||||||
</ValidationObserver>
|
</ValidationObserver>
|
||||||
@@ -184,7 +185,48 @@
|
|||||||
</AppInputText>
|
</AppInputText>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Subscription -->
|
<!--Upgrade License-->
|
||||||
|
<div v-if="!config.isSaaS" class="card shadow-card">
|
||||||
|
<FormLabel icon="trending-up">
|
||||||
|
{{ $t('Upgrade your License') }}
|
||||||
|
</FormLabel>
|
||||||
|
|
||||||
|
<ValidationObserver
|
||||||
|
ref="upgradeLicense"
|
||||||
|
@submit.prevent="upgradeLicense"
|
||||||
|
v-slot="{ invalid }"
|
||||||
|
tag="form"
|
||||||
|
class="mt-6"
|
||||||
|
>
|
||||||
|
<ValidationProvider
|
||||||
|
tag="div"
|
||||||
|
v-slot="{ errors }"
|
||||||
|
mode="passive"
|
||||||
|
name="Purchase Code"
|
||||||
|
rules="required"
|
||||||
|
>
|
||||||
|
<AppInputText
|
||||||
|
:error="errors[0]"
|
||||||
|
:is-last="true"
|
||||||
|
>
|
||||||
|
<div class="space-y-4 sm:flex sm:space-x-4 sm:space-y-0">
|
||||||
|
<input
|
||||||
|
v-model="purchaseCode"
|
||||||
|
:placeholder="$t('Paste your Purchase code here...')"
|
||||||
|
type="text"
|
||||||
|
class="focus-border-theme input-dark"
|
||||||
|
:class="{ '!border-rose-600': errors[0] }"
|
||||||
|
/>
|
||||||
|
<ButtonBase type="submit" button-style="theme" :loading="isLoadingUpgradingButton" class="w-full sm:w-auto">
|
||||||
|
{{ $t('Upgrade') }}
|
||||||
|
</ButtonBase>
|
||||||
|
</div>
|
||||||
|
</AppInputText>
|
||||||
|
</ValidationProvider>
|
||||||
|
</ValidationObserver>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Subscription -->
|
||||||
<div v-if="app && config.isSaaS" class="card shadow-card">
|
<div v-if="app && config.isSaaS" class="card shadow-card">
|
||||||
<FormLabel icon="credit-card">
|
<FormLabel icon="credit-card">
|
||||||
{{ $t('subscription') }}
|
{{ $t('subscription') }}
|
||||||
@@ -203,8 +245,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { Edit2Icon } from 'vue-feather-icons'
|
import {Edit2Icon} from 'vue-feather-icons'
|
||||||
import { ValidationProvider, ValidationObserver } from 'vee-validate/dist/vee-validate.full'
|
import {ValidationProvider, ValidationObserver} from 'vee-validate/dist/vee-validate.full'
|
||||||
import SwitchInput from '../../../../components/Others/Forms/SwitchInput'
|
import SwitchInput from '../../../../components/Others/Forms/SwitchInput'
|
||||||
import AppInputButton from '../../../../components/Admin/AppInputButton'
|
import AppInputButton from '../../../../components/Admin/AppInputButton'
|
||||||
import AppInputSwitch from '../../../../components/Admin/AppInputSwitch'
|
import AppInputSwitch from '../../../../components/Admin/AppInputSwitch'
|
||||||
@@ -212,47 +254,88 @@ import FormLabel from '../../../../components/Others/Forms/FormLabel'
|
|||||||
import ButtonBase from '../../../../components/FilesView/ButtonBase'
|
import ButtonBase from '../../../../components/FilesView/ButtonBase'
|
||||||
import AppInputText from '../../../../components/Admin/AppInputText'
|
import AppInputText from '../../../../components/Admin/AppInputText'
|
||||||
import PageTab from '../../../../components/Others/Layout/PageTab'
|
import PageTab from '../../../../components/Others/Layout/PageTab'
|
||||||
import { required } from 'vee-validate/dist/rules'
|
import {required} from 'vee-validate/dist/rules'
|
||||||
import { events } from '../../../../bus'
|
import {events} from '../../../../bus'
|
||||||
import { mapGetters } from 'vuex'
|
import {mapGetters} from 'vuex'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import SelectInput from "../../../../components/Others/Forms/SelectInput";
|
import SelectInput from "../../../../components/Others/Forms/SelectInput";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppOthers',
|
name: 'AppOthers',
|
||||||
components: {
|
components: {
|
||||||
SelectInput,
|
SelectInput,
|
||||||
AppInputButton,
|
AppInputButton,
|
||||||
ValidationObserver,
|
ValidationObserver,
|
||||||
ValidationProvider,
|
ValidationProvider,
|
||||||
AppInputSwitch,
|
AppInputSwitch,
|
||||||
AppInputText,
|
AppInputText,
|
||||||
SwitchInput,
|
SwitchInput,
|
||||||
ButtonBase,
|
ButtonBase,
|
||||||
Edit2Icon,
|
Edit2Icon,
|
||||||
FormLabel,
|
FormLabel,
|
||||||
required,
|
required,
|
||||||
PageTab,
|
PageTab,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['subscriptionTypes', 'config']),
|
...mapGetters(['subscriptionTypes', 'config']),
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isLoading: true,
|
isLoading: true,
|
||||||
isFlushingCache: false,
|
isLoadingUpgradingButton: false,
|
||||||
app: undefined,
|
isFlushingCache: false,
|
||||||
recaptcha: {
|
app: undefined,
|
||||||
allowedService: false,
|
purchaseCode: undefined,
|
||||||
isVisibleCredentialsForm: false,
|
recaptcha: {
|
||||||
credentials: {
|
allowedService: false,
|
||||||
key: undefined,
|
isVisibleCredentialsForm: false,
|
||||||
secret: undefined,
|
credentials: {
|
||||||
},
|
key: undefined,
|
||||||
},
|
secret: undefined,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async upgradeLicense() {
|
||||||
|
this.isLoadingUpgradingButton = true
|
||||||
|
// Validate fields
|
||||||
|
const isValid = await this.$refs.upgradeLicense.validate()
|
||||||
|
|
||||||
|
if (!isValid) return
|
||||||
|
|
||||||
|
axios.post('/api/admin/upgrade-license', {
|
||||||
|
purchaseCode: this.purchaseCode
|
||||||
|
})
|
||||||
|
.then((response) => {
|
||||||
|
this.$store.dispatch('getLanguageTranslations', this.config.locale)
|
||||||
|
|
||||||
|
this.$store.commit('REPLACE_CONFIG_VALUE', {
|
||||||
|
key: 'isSaaS',
|
||||||
|
value: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
events.$emit('toaster', {
|
||||||
|
type: 'success',
|
||||||
|
message: this.$t('Your license was successfully upgraded'),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
if (error.response.status === 400) {
|
||||||
|
events.$emit('alert:open', {
|
||||||
|
title: this.$t('Purchase code is invalid or is not Extended License'),
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
events.$emit('alert:open', {
|
||||||
|
title: this.$t('popup_error.title'),
|
||||||
|
message: this.$t('popup_error.message'),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
this.isLoadingUpgradingButton = false
|
||||||
|
})
|
||||||
|
},
|
||||||
subscriptionTypeChange(type) {
|
subscriptionTypeChange(type) {
|
||||||
events.$emit('confirm:open', {
|
events.$emit('confirm:open', {
|
||||||
title: this.$t(''),
|
title: this.$t(''),
|
||||||
@@ -265,84 +348,84 @@ export default {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async storeCredentials(service) {
|
async storeCredentials(service) {
|
||||||
// Validate fields
|
// Validate fields
|
||||||
const isValid = await this.$refs.credentialsForm.validate()
|
const isValid = await this.$refs.credentialsForm.validate()
|
||||||
|
|
||||||
if (!isValid) return
|
if (!isValid) return
|
||||||
|
|
||||||
// Start loading
|
// Start loading
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
|
|
||||||
// Send request to get verify account
|
// Send request to get verify account
|
||||||
axios
|
axios
|
||||||
.post('/api/admin/settings/social-service', {
|
.post('/api/admin/settings/social-service', {
|
||||||
client_id: this[service].credentials.client_id,
|
client_id: this[service].credentials.client_id,
|
||||||
client_secret: this[service].credentials.client_secret,
|
client_secret: this[service].credentials.client_secret,
|
||||||
service: service,
|
service: service,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// Commit credentials
|
// Commit credentials
|
||||||
this.$store.commit('SET_SOCIAL_LOGIN_CONFIGURED', service)
|
this.$store.commit('SET_SOCIAL_LOGIN_CONFIGURED', service)
|
||||||
|
|
||||||
this[service].allowedService = true
|
this[service].allowedService = true
|
||||||
this[service].isVisibleCredentialsForm = false
|
this[service].isVisibleCredentialsForm = false
|
||||||
|
|
||||||
// Show toaster
|
// Show toaster
|
||||||
events.$emit('toaster', {
|
events.$emit('toaster', {
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: this.$t('toaster.credentials_set', {
|
message: this.$t('toaster.credentials_set', {
|
||||||
service: service,
|
service: service,
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (error.response.status === 500) {
|
if (error.response.status === 500) {
|
||||||
this.isError = true
|
this.isError = true
|
||||||
this.errorMessage = error.response.data.message
|
this.errorMessage = error.response.data.message
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => (this.isLoading = false))
|
.finally(() => (this.isLoading = false))
|
||||||
},
|
},
|
||||||
flushCache() {
|
flushCache() {
|
||||||
this.isFlushingCache = true
|
this.isFlushingCache = true
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.get('/api/admin/settings/flush-cache')
|
.get('/api/admin/settings/flush-cache')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
events.$emit('toaster', {
|
events.$emit('toaster', {
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: 'Your cache was successfully deleted.',
|
message: 'Your cache was successfully deleted.',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.isFlushingCache = false
|
this.isFlushingCache = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.recaptcha.allowedService = this.config.allowedRecaptcha
|
this.recaptcha.allowedService = this.config.allowedRecaptcha
|
||||||
|
|
||||||
axios
|
axios
|
||||||
.get('/api/admin/settings', {
|
.get('/api/admin/settings', {
|
||||||
params: {
|
params: {
|
||||||
column: 'contact_email|google_analytics|default_max_storage_amount|storage_limitation|mimetypes_blacklist|upload_limit|subscriptionType',
|
column: 'contact_email|google_analytics|default_max_storage_amount|storage_limitation|mimetypes_blacklist|upload_limit|subscriptionType',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
|
|
||||||
this.app = {
|
this.app = {
|
||||||
contactMail: response.data.contact_email,
|
contactMail: response.data.contact_email,
|
||||||
googleAnalytics: response.data.google_analytics,
|
googleAnalytics: response.data.google_analytics,
|
||||||
defaultStorage: response.data.default_max_storage_amount,
|
defaultStorage: response.data.default_max_storage_amount,
|
||||||
storageLimitation: parseInt(response.data.storage_limitation),
|
storageLimitation: parseInt(response.data.storage_limitation),
|
||||||
mimetypesBlacklist: response.data.mimetypes_blacklist,
|
mimetypesBlacklist: response.data.mimetypes_blacklist,
|
||||||
uploadLimit: response.data.upload_limit,
|
uploadLimit: response.data.upload_limit,
|
||||||
subscriptionType: response.data.subscriptionType,
|
subscriptionType: response.data.subscriptionType,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
events.$on('action:confirmed', (data) => {
|
events.$on('action:confirmed', (data) => {
|
||||||
if (data.operation === 'change-subscription-type') {
|
if (data.operation === 'change-subscription-type') {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ 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\UpgradeLicenseController;
|
||||||
use Domain\Settings\Controllers\GetServerStatusController;
|
use Domain\Settings\Controllers\GetServerStatusController;
|
||||||
use Domain\Settings\Controllers\GetSettingsValueController;
|
use Domain\Settings\Controllers\GetSettingsValueController;
|
||||||
use Domain\Admin\Controllers\Dashboard\GetNewbiesController;
|
use Domain\Admin\Controllers\Dashboard\GetNewbiesController;
|
||||||
@@ -65,3 +66,5 @@ Route::apiResource('/languages', LanguageController::class);
|
|||||||
|
|
||||||
// Server Status
|
// Server Status
|
||||||
Route::get('/status', GetServerStatusController::class);
|
Route::get('/status', GetServerStatusController::class);
|
||||||
|
|
||||||
|
Route::post('/upgrade-license', UpgradeLicenseController::class);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace App\Providers;
|
namespace App\Providers;
|
||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
|
||||||
use Schema;
|
use Schema;
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Socialite\Controllers;
|
namespace App\Socialite\Controllers;
|
||||||
|
|
||||||
use App\Users\Models\User;
|
use App\Users\Models\User;
|
||||||
@@ -8,15 +7,16 @@ use App\Http\Controllers\Controller;
|
|||||||
use Laravel\Socialite\Facades\Socialite;
|
use Laravel\Socialite\Facades\Socialite;
|
||||||
use App\Users\Actions\CreateNewUserAction;
|
use App\Users\Actions\CreateNewUserAction;
|
||||||
use Illuminate\Contracts\Auth\StatefulGuard;
|
use Illuminate\Contracts\Auth\StatefulGuard;
|
||||||
use VueFileManager\Subscription\Domain\Plans\Exceptions\MeteredBillingPlanDoesntExist;
|
|
||||||
use VueFileManager\Subscription\Domain\Plans\Models\Plan;
|
use VueFileManager\Subscription\Domain\Plans\Models\Plan;
|
||||||
|
use VueFileManager\Subscription\Domain\Plans\Exceptions\MeteredBillingPlanDoesntExist;
|
||||||
|
|
||||||
class SocialiteCallbackController extends Controller
|
class SocialiteCallbackController extends Controller
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
protected StatefulGuard $guard,
|
protected StatefulGuard $guard,
|
||||||
public CreateNewUserAction $createNewUser,
|
public CreateNewUserAction $createNewUser,
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws MeteredBillingPlanDoesntExist
|
* @throws MeteredBillingPlanDoesntExist
|
||||||
@@ -60,7 +60,7 @@ class SocialiteCallbackController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if account registration is enabled
|
// Check if account registration is enabled
|
||||||
if (!$isAllowedRegistration) {
|
if (! $isAllowedRegistration) {
|
||||||
return response([
|
return response([
|
||||||
'type' => 'error',
|
'type' => 'error',
|
||||||
'message' => 'User registration is not allowed',
|
'message' => 'User registration is not allowed',
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Users\Actions;
|
namespace App\Users\Actions;
|
||||||
|
|
||||||
use App\Users\Rules\PasswordValidationRules;
|
|
||||||
use Illuminate\Support\Facades\Hash;
|
use Illuminate\Support\Facades\Hash;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
|
use App\Users\Rules\PasswordValidationRules;
|
||||||
use Laravel\Fortify\Contracts\UpdatesUserPasswords;
|
use Laravel\Fortify\Contracts\UpdatesUserPasswords;
|
||||||
|
|
||||||
class UpdateUserPassword implements UpdatesUserPasswords
|
class UpdateUserPassword implements UpdatesUserPasswords
|
||||||
@@ -25,7 +24,7 @@ class UpdateUserPassword implements UpdatesUserPasswords
|
|||||||
'current_password' => ['required', 'string'],
|
'current_password' => ['required', 'string'],
|
||||||
'password' => $this->passwordRules(),
|
'password' => $this->passwordRules(),
|
||||||
])->after(function ($validator) use ($user, $input) {
|
])->after(function ($validator) use ($user, $input) {
|
||||||
if (!isset($input['current_password']) || !Hash::check($input['current_password'], $user->password)) {
|
if (! isset($input['current_password']) || ! Hash::check($input['current_password'], $user->password)) {
|
||||||
$validator->errors()->add('current_password', __t('password_doesnt_match'));
|
$validator->errors()->add('current_password', __t('password_doesnt_match'));
|
||||||
}
|
}
|
||||||
})->validateWithBag('updatePassword');
|
})->validateWithBag('updatePassword');
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ class GenerateImageThumbnailAction
|
|||||||
collect(config("vuefilemanager.image_sizes.$execution"))
|
collect(config("vuefilemanager.image_sizes.$execution"))
|
||||||
->each(function ($size) use ($userId, $fileName, $imageWidth) {
|
->each(function ($size) use ($userId, $fileName, $imageWidth) {
|
||||||
if ($imageWidth > $size['size']) {
|
if ($imageWidth > $size['size']) {
|
||||||
|
|
||||||
// Create intervention image
|
// Create intervention image
|
||||||
$intervention = Image::make(
|
$intervention = Image::make(
|
||||||
Storage::disk('local')->path("temp/$userId/$fileName")
|
Storage::disk('local')->path("temp/$userId/$fileName")
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ class MoveFileToExternalStorageAction
|
|||||||
|
|
||||||
// If file is bigger than 5.2 MB then run multipart upload
|
// If file is bigger than 5.2 MB then run multipart upload
|
||||||
if ($filesize > 5242880) {
|
if ($filesize > 5242880) {
|
||||||
|
|
||||||
// Get client
|
// Get client
|
||||||
$client = Storage::disk('s3')->getClient();
|
$client = Storage::disk('s3')->getClient();
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
namespace Domain\Files\Controllers;
|
namespace Domain\Files\Controllers;
|
||||||
|
|
||||||
use Domain\Files\Models\File;
|
use Domain\Files\Models\File;
|
||||||
use Illuminate\Http\Response;
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Domain\Files\Requests\UploadRequest;
|
use Domain\Files\Requests\UploadRequest;
|
||||||
use Domain\Files\Resources\FileResource;
|
use Domain\Files\Resources\FileResource;
|
||||||
@@ -21,7 +20,8 @@ class UploadFileController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Upload file for authenticated master|editor user
|
* Upload file for authenticated master|editor user
|
||||||
*/
|
*/
|
||||||
public function __invoke(UploadRequest $request) {
|
public function __invoke(UploadRequest $request)
|
||||||
|
{
|
||||||
if (is_demo_account()) {
|
if (is_demo_account()) {
|
||||||
return ($this->fakeUploadFile)($request);
|
return ($this->fakeUploadFile)($request);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Domain\Files\Requests;
|
namespace Domain\Files\Requests;
|
||||||
|
|
||||||
use Domain\Admin\Rules\DisabledMimetypes;
|
use Domain\Admin\Rules\DisabledMimetypes;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Domain\Items\Controllers;
|
namespace Domain\Items\Controllers;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use Domain\Files\Models\File;
|
use Domain\Files\Models\File;
|
||||||
use Domain\Files\Resources\FileResource;
|
|
||||||
use Domain\Folders\Models\Folder;
|
use Domain\Folders\Models\Folder;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
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\Items\Actions\RenameFileOrFolderAction;
|
use Domain\Items\Actions\RenameFileOrFolderAction;
|
||||||
|
|||||||
@@ -0,0 +1,102 @@
|
|||||||
|
<?php
|
||||||
|
namespace Domain\Settings\Controllers;
|
||||||
|
|
||||||
|
use DB;
|
||||||
|
use Artisan;
|
||||||
|
use Illuminate\Http\Response;
|
||||||
|
use Domain\Settings\Models\Setting;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
|
use Domain\Localization\Models\Language;
|
||||||
|
use Illuminate\Contracts\Foundation\Application;
|
||||||
|
use Illuminate\Contracts\Routing\ResponseFactory;
|
||||||
|
use Domain\Settings\Requests\UpgradeLicenseRequest;
|
||||||
|
|
||||||
|
class UpgradeLicenseController extends Controller
|
||||||
|
{
|
||||||
|
public function __invoke(UpgradeLicenseRequest $request): Response|Application|ResponseFactory
|
||||||
|
{
|
||||||
|
// Verify purchase code
|
||||||
|
$response = Http::get("https://verify.vuefilemanager.com/api/verify-code/{$request->input('purchaseCode')}");
|
||||||
|
|
||||||
|
if ($response->successful() && $response->body() === 'b6896a44017217c36f4a6fdc56699728') {
|
||||||
|
// Store default settings for extended version
|
||||||
|
collect([
|
||||||
|
[
|
||||||
|
'name' => 'license',
|
||||||
|
'value' => 'extended',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'purchase_code',
|
||||||
|
'value' => $request->input('purchaseCode'),
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'section_pricing_content',
|
||||||
|
'value' => 1,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'paypal_payment_description',
|
||||||
|
'value' => 'Available PayPal Credit, Debit or Credit Card.',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'paystack_payment_description',
|
||||||
|
'value' => 'Available Bank Account, USSD, Mobile Money, Apple Pay.',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'stripe_payment_description',
|
||||||
|
'value' => 'Available credit card or Apple Pay.',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'allowed_registration_bonus',
|
||||||
|
'value' => 0,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'registration_bonus_amount',
|
||||||
|
'value' => 0,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'pricing_title',
|
||||||
|
'value' => 'Pick the <span class="text-theme">Best Plan</span> For Your Needs',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'pricing_description',
|
||||||
|
'value' => 'Your private cloud storage software build on Laravel & Vue.js. No limits & no monthly fees. Truly freedom.',
|
||||||
|
],
|
||||||
|
])->each(function ($col) {
|
||||||
|
Setting::updateOrCreate([
|
||||||
|
'name' => $col['name'],
|
||||||
|
], [
|
||||||
|
'value' => $col['value'],
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Seed translations for extended version
|
||||||
|
Language::all()
|
||||||
|
->each(function ($lang) {
|
||||||
|
$translations = collect(
|
||||||
|
config('language-translations.extended')
|
||||||
|
)
|
||||||
|
->map(fn ($value, $key) => [
|
||||||
|
'lang' => $lang->locale,
|
||||||
|
'value' => $value,
|
||||||
|
'key' => $key,
|
||||||
|
])->toArray();
|
||||||
|
|
||||||
|
$chunks = array_chunk($translations, 100);
|
||||||
|
|
||||||
|
foreach ($chunks as $chunk) {
|
||||||
|
DB::table('language_translations')
|
||||||
|
->insert($chunk);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Clear config and cache
|
||||||
|
Artisan::call('config:clear');
|
||||||
|
Artisan::call('cache:clear');
|
||||||
|
|
||||||
|
return response('Your license was successfully upgraded', 201);
|
||||||
|
}
|
||||||
|
|
||||||
|
return response('Purchase code is invalid or is not Extended License.', 400);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
namespace Domain\Settings\Requests;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
|
||||||
|
class UpgradeLicenseRequest extends FormRequest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Determine if the user is authorized to make this request.
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function authorize()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the validation rules that apply to the request.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'purchaseCode' => 'required|string',
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,6 @@ namespace Domain\SetupWizard\Controllers;
|
|||||||
|
|
||||||
use Artisan;
|
use Artisan;
|
||||||
use App\Users\Models\User;
|
use App\Users\Models\User;
|
||||||
use Domain\SetupWizard\Actions\CreateDiskDirectoriesAction;
|
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
use Domain\Settings\Models\Setting;
|
use Domain\Settings\Models\Setting;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
@@ -12,6 +11,7 @@ use Domain\Pages\Actions\SeedDefaultPagesAction;
|
|||||||
use Domain\Settings\Actions\SeedDefaultSettingsAction;
|
use Domain\Settings\Actions\SeedDefaultSettingsAction;
|
||||||
use Domain\SetupWizard\Requests\StoreAdminAccountRequest;
|
use Domain\SetupWizard\Requests\StoreAdminAccountRequest;
|
||||||
use Domain\Localization\Actions\SeedDefaultLanguageAction;
|
use Domain\Localization\Actions\SeedDefaultLanguageAction;
|
||||||
|
use Domain\SetupWizard\Actions\CreateDiskDirectoriesAction;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create and login admin account
|
* Create and login admin account
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class InvitationIntoTeamFolder extends Notification implements ShouldQueue
|
|||||||
return [
|
return [
|
||||||
'category' => 'team-invitation',
|
'category' => 'team-invitation',
|
||||||
'title' => __t('new_team_invitation'),
|
'title' => __t('new_team_invitation'),
|
||||||
'description' => __t('x_invite_to_join_team', ['name' => $this->invitation->inviter->settings->name,]),
|
'description' => __t('x_invite_to_join_team', ['name' => $this->invitation->inviter->settings->name, ]),
|
||||||
'action' => [
|
'action' => [
|
||||||
'type' => 'invitation',
|
'type' => 'invitation',
|
||||||
'params' => [
|
'params' => [
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Domain\UploadRequest\Notifications;
|
namespace Domain\UploadRequest\Notifications;
|
||||||
|
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
@@ -19,7 +18,8 @@ class UploadRequestFulfilledNotification extends Notification implements ShouldQ
|
|||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public UploadRequest $uploadRequest
|
public UploadRequest $uploadRequest
|
||||||
) {}
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the notification's delivery channels.
|
* Get the notification's delivery channels.
|
||||||
@@ -50,7 +50,7 @@ class UploadRequestFulfilledNotification extends Notification implements ShouldQ
|
|||||||
return [
|
return [
|
||||||
'category' => 'file-request',
|
'category' => 'file-request',
|
||||||
'title' => __t('file_request_filled'),
|
'title' => __t('file_request_filled'),
|
||||||
'description' => __t('file_request_filled_desc', ['name' => $this->uploadRequest->parent->name,]),
|
'description' => __t('file_request_filled_desc', ['name' => $this->uploadRequest->parent->name, ]),
|
||||||
'action' => [
|
'action' => [
|
||||||
'type' => 'route',
|
'type' => 'route',
|
||||||
'params' => [
|
'params' => [
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Tests\App\Users;
|
namespace Tests\App\Users;
|
||||||
|
|
||||||
use Storage;
|
use Storage;
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ class AdminLanguageTranslatorTest extends TestCase
|
|||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertJsonFragment([
|
->assertJsonFragment([
|
||||||
'locale' => 'en',
|
'locale' => 'en',
|
||||||
'close' => 'Close',
|
'close' => 'Close',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ class AdminLanguageTranslatorTest extends TestCase
|
|||||||
->getJson("/api/admin/languages/$language->id")
|
->getJson("/api/admin/languages/$language->id")
|
||||||
->assertStatus(200)
|
->assertStatus(200)
|
||||||
->assertJsonFragment([
|
->assertJsonFragment([
|
||||||
'close' => 'Close',
|
'close' => 'Close',
|
||||||
'locale' => 'en',
|
'locale' => 'en',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ use Tests\TestCase;
|
|||||||
use App\Users\Models\User;
|
use App\Users\Models\User;
|
||||||
use Illuminate\Http\UploadedFile;
|
use Illuminate\Http\UploadedFile;
|
||||||
use Domain\Settings\Models\Setting;
|
use Domain\Settings\Models\Setting;
|
||||||
|
use Illuminate\Support\Facades\Http;
|
||||||
use Domain\Settings\Actions\SeedDefaultSettingsAction;
|
use Domain\Settings\Actions\SeedDefaultSettingsAction;
|
||||||
|
use Domain\Localization\Actions\SeedDefaultLanguageAction;
|
||||||
|
|
||||||
class SettingsTest extends TestCase
|
class SettingsTest extends TestCase
|
||||||
{
|
{
|
||||||
@@ -241,4 +243,64 @@ class SettingsTest extends TestCase
|
|||||||
'host' => null,
|
'host' => null,
|
||||||
])->assertStatus(204);
|
])->assertStatus(204);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function it_upgrade_license()
|
||||||
|
{
|
||||||
|
Http::fake([
|
||||||
|
'https://verify.vuefilemanager.com/api/verify-code/*' => Http::response('b6896a44017217c36f4a6fdc56699728'),
|
||||||
|
]);
|
||||||
|
|
||||||
|
collect([
|
||||||
|
[
|
||||||
|
'name' => 'license',
|
||||||
|
'value' => 'regular',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'purchase_code',
|
||||||
|
'value' => '22b28b36-6d84-41b2-a920-a884b2bf63b6',
|
||||||
|
],
|
||||||
|
])->each(function ($col) {
|
||||||
|
Setting::updateOrCreate([
|
||||||
|
'name' => $col['name'],
|
||||||
|
], [
|
||||||
|
'value' => $col['value'],
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
resolve(SeedDefaultLanguageAction::class)();
|
||||||
|
|
||||||
|
$admin = User::factory()
|
||||||
|
->create(['role' => 'admin']);
|
||||||
|
|
||||||
|
$this
|
||||||
|
->actingAs($admin)
|
||||||
|
->postJson('/api/admin/upgrade-license', [
|
||||||
|
'purchaseCode' => '6ab28b36-6d84-41b2-a920-a884b2bf63b6',
|
||||||
|
])->assertStatus(201);
|
||||||
|
|
||||||
|
collect([
|
||||||
|
[
|
||||||
|
'name' => 'license',
|
||||||
|
'value' => 'extended',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'purchase_code',
|
||||||
|
'value' => '6ab28b36-6d84-41b2-a920-a884b2bf63b6',
|
||||||
|
],
|
||||||
|
])->each(function ($col) {
|
||||||
|
$this->assertDatabaseHas('settings', [
|
||||||
|
'name' => $col['name'],
|
||||||
|
'value' => $col['value'],
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
$this->assertDatabaseHas('language_translations', [
|
||||||
|
'key' => 'go_to_subscription',
|
||||||
|
'value' => 'Go to Subscription',
|
||||||
|
'lang' => 'en',
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,21 +61,21 @@ class SetupWizardTest extends TestCase
|
|||||||
Setting::all()->each->delete();
|
Setting::all()->each->delete();
|
||||||
|
|
||||||
$this->postJson('/api/setup/app-setup', [
|
$this->postJson('/api/setup/app-setup', [
|
||||||
'color' => '#00BC72',
|
'color' => '#00BC72',
|
||||||
'title' => 'VueFileManager',
|
'title' => 'VueFileManager',
|
||||||
'description' => 'The best file manager on the internet',
|
'description' => 'The best file manager on the internet',
|
||||||
'googleAnalytics' => 'UA-12345678-1',
|
'googleAnalytics' => 'UA-12345678-1',
|
||||||
'contactMail' => 'john@doe.com',
|
'contactMail' => 'john@doe.com',
|
||||||
'subscriptionType' => 'metered',
|
'subscriptionType' => 'metered',
|
||||||
'userVerification' => 1,
|
'userVerification' => 1,
|
||||||
'userRegistration' => 1,
|
'userRegistration' => 1,
|
||||||
'storageLimitation' => 1,
|
'storageLimitation' => 1,
|
||||||
'defaultStorage' => 10,
|
'defaultStorage' => 10,
|
||||||
'logo' => UploadedFile::fake()->image('fake-logo.jpg'),
|
'logo' => UploadedFile::fake()->image('fake-logo.jpg'),
|
||||||
'logo_dark' => UploadedFile::fake()->image('fake-logo-dark.jpg'),
|
'logo_dark' => UploadedFile::fake()->image('fake-logo-dark.jpg'),
|
||||||
'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(204);
|
||||||
|
|
||||||
$this
|
$this
|
||||||
|
|||||||
Reference in New Issue
Block a user