mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-06 02:33:48 +00:00
Admin & User account frontend consolidation
This commit is contained in:
@@ -185,7 +185,8 @@ class UserController extends Controller
|
||||
'password' => Hash::make($request->password),
|
||||
]);
|
||||
|
||||
// Create settings
|
||||
UserSettings::unguard();
|
||||
|
||||
$user
|
||||
->settings()
|
||||
->create([
|
||||
@@ -194,6 +195,8 @@ class UserController extends Controller
|
||||
'storage_capacity' => $request->storage_capacity,
|
||||
]);
|
||||
|
||||
UserSettings::reguard();
|
||||
|
||||
return response(new UserResource($user), 201);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,11 +48,13 @@ class BrowseController extends Controller
|
||||
// Get folders and files
|
||||
$folders = Folder::with(['parent:id,name', 'shared:token,id,item_id,permission,is_protected,expire_in'])
|
||||
->where('parent_id', $root_id)
|
||||
->where('user_id', Auth::id())
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
$files = File::with(['parent:id,name', 'shared:token,id,item_id,permission,is_protected,expire_in'])
|
||||
->where('folder_id', $root_id)
|
||||
->where('user_id', Auth::id())
|
||||
->sortable()
|
||||
->get();
|
||||
|
||||
@@ -172,6 +174,7 @@ class BrowseController extends Controller
|
||||
{
|
||||
$folders = Folder::with('folders:id,parent_id,id,name')
|
||||
->where('parent_id', null)
|
||||
->where('user_id', Auth::id())
|
||||
->sortable()
|
||||
->get(['id', 'parent_id', 'id', 'name']);
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ class ServeSharedController extends Controller
|
||||
|
||||
$image = File::where('user_id', $shared->user_id)
|
||||
->where('type', 'image')
|
||||
->where('unique_id', $shared->item_id)
|
||||
->where('id', $shared->item_id)
|
||||
->first();
|
||||
|
||||
if ($image) {
|
||||
@@ -196,7 +196,7 @@ class ServeSharedController extends Controller
|
||||
|
||||
// Return record
|
||||
return File::where('user_id', $shared->user_id)
|
||||
->where('unique_id', $shared->item_id)
|
||||
->where('id', $shared->item_id)
|
||||
->firstOrFail(['name', 'basename', 'thumbnail', 'type', 'filesize', 'mimetype']);
|
||||
}
|
||||
|
||||
@@ -215,16 +215,16 @@ class ServeSharedController extends Controller
|
||||
$this->helper->check_item_access($shared->item_id, $shared);
|
||||
|
||||
// Get folders
|
||||
$folders = Folder::with('folders:id,parent_id,unique_id,name')
|
||||
$folders = Folder::with('folders:id,parent_id,id,name')
|
||||
->where('parent_id', $shared->item_id)
|
||||
->where('user_id', $shared->user_id)
|
||||
->sortable()
|
||||
->get(['id', 'parent_id', 'unique_id', 'name']);
|
||||
->get(['id', 'parent_id', 'id', 'name']);
|
||||
|
||||
// Return folder tree
|
||||
return [
|
||||
[
|
||||
'unique_id' => $shared->item_id,
|
||||
'id' => $shared->item_id,
|
||||
'name' => __('vuefilemanager.home'),
|
||||
'location' => 'public',
|
||||
'folders' => $folders,
|
||||
@@ -254,7 +254,7 @@ class ServeSharedController extends Controller
|
||||
->get();
|
||||
|
||||
// Get all children content
|
||||
$foldersIds = Folder::with('folders:id,parent_id,unique_id,name')
|
||||
$foldersIds = Folder::with('folders:id,parent_id,id,name')
|
||||
->where('user_id', $shared->user_id)
|
||||
->where('parent_id', $shared->item_id)
|
||||
->get();
|
||||
@@ -269,7 +269,7 @@ class ServeSharedController extends Controller
|
||||
|
||||
// Filter folders to only accessible folders
|
||||
$folders = $searched_folders->filter(function ($folder) use ($accessible_folder_ids) {
|
||||
return in_array($folder->unique_id, $accessible_folder_ids);
|
||||
return in_array($folder->id, $accessible_folder_ids);
|
||||
});
|
||||
|
||||
// Collect folders and files to single array
|
||||
|
||||
@@ -27,7 +27,7 @@ class DeleteItemRequest extends FormRequest
|
||||
return [
|
||||
'data[*].force_delete' => 'required|boolean',
|
||||
'data[*].type' => 'required|string',
|
||||
'data[*].unique_id' => 'required|integer'
|
||||
'data[*].id' => 'required|integer'
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,15 +42,15 @@ class UserResource extends JsonResource
|
||||
'id' => $this->id,
|
||||
'type' => 'settings',
|
||||
'attributes' => [
|
||||
'avatar' => $this->settings->avatar,
|
||||
'billing_name' => $this->settings->name,
|
||||
'billing_address' => $this->settings->address,
|
||||
'billing_state' => $this->settings->state,
|
||||
'billing_city' => $this->settings->city,
|
||||
'billing_postal_code' => $this->settings->postal_code,
|
||||
'billing_country' => $this->settings->country,
|
||||
'billing_phone_number' => $this->settings->phone_number,
|
||||
'timezone' => $this->settings->timezone
|
||||
'avatar' => $this->settings->avatar,
|
||||
'name' => $this->settings->name,
|
||||
'address' => $this->settings->address,
|
||||
'state' => $this->settings->state,
|
||||
'city' => $this->settings->city,
|
||||
'postal_code' => $this->settings->postal_code,
|
||||
'country' => $this->settings->country,
|
||||
'phone_number' => $this->settings->phone_number,
|
||||
'timezone' => $this->settings->timezone
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
"/chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chu~2d9ff916.js": "/chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chu~2d9ff916.js?id=f8aa71af8223ad1df2a0",
|
||||
"/chunks/admin-account~chunks/app-setup~chunks/billings-detail~chunks/create-new-password~chunks/datab~01aef58e.js": "/chunks/admin-account~chunks/app-setup~chunks/billings-detail~chunks/create-new-password~chunks/datab~01aef58e.js?id=bc5af3a7a82d95c71c52",
|
||||
"/chunks/admin~chunks/files~chunks/settings~chunks/shared-files~chunks/shared-page.js": "/chunks/admin~chunks/files~chunks/settings~chunks/shared-files~chunks/shared-page.js?id=dfc7c9e8edb8146d9bd0",
|
||||
"/chunks/app-appearance.js": "/chunks/app-appearance.js?id=461130dc9ddda9c3e94e",
|
||||
"/chunks/app-appearance.js": "/chunks/app-appearance.js?id=bc5212d24fc85d890346",
|
||||
"/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~605f4c49.js": "/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~605f4c49.js?id=1ae1e65bb6a5ed7c3e10",
|
||||
"/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=459aa0e9effdb1a44ce2",
|
||||
"/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~b9e5655a.js": "/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~b9e5655a.js?id=f3f0a717f5806faf488c",
|
||||
"/chunks/app-billings.js": "/chunks/app-billings.js?id=89de5679d1cd8047f47c",
|
||||
"/chunks/app-email.js": "/chunks/app-email.js?id=a80a64a4ec22e4d2e03d",
|
||||
"/chunks/app-index.js": "/chunks/app-index.js?id=b7966950a821c2d1561f",
|
||||
"/chunks/app-others.js": "/chunks/app-others.js?id=998b74c9a395c76dddd1",
|
||||
"/chunks/app-payments.js": "/chunks/app-payments.js?id=b68c7953a62e26107acb",
|
||||
"/chunks/app-billings.js": "/chunks/app-billings.js?id=3b65bf2075874bc5fc91",
|
||||
"/chunks/app-email.js": "/chunks/app-email.js?id=74820d141e0e11e73bbf",
|
||||
"/chunks/app-index.js": "/chunks/app-index.js?id=9324e4f8e1ffcb626ac9",
|
||||
"/chunks/app-others.js": "/chunks/app-others.js?id=be675a004b52fe2a5071",
|
||||
"/chunks/app-payments.js": "/chunks/app-payments.js?id=836a75f58dad670c65b0",
|
||||
"/chunks/app-settings.js": "/chunks/app-settings.js?id=368b31bcef5716a6b884",
|
||||
"/chunks/app-settings~chunks/dashboard~chunks/invoices~chunks/page-edit~chunks/pages~chunks/plan~chunk~8a0e1d25.js": "/chunks/app-settings~chunks/dashboard~chunks/invoices~chunks/page-edit~chunks/pages~chunks/plan~chunk~8a0e1d25.js?id=e71bb0286189734a8aec",
|
||||
"/chunks/app-setup.js": "/chunks/app-setup.js?id=4112238baf5cc574afb1",
|
||||
@@ -22,65 +22,124 @@
|
||||
"/chunks/contact-us.js": "/chunks/contact-us.js?id=d72e3c4daa900092a3c3",
|
||||
"/chunks/contact-us~chunks/dynamic-page~chunks/landing-page.js": "/chunks/contact-us~chunks/dynamic-page~chunks/landing-page.js?id=bea1c83df0a0b8141b5b",
|
||||
"/chunks/create-new-password.js": "/chunks/create-new-password.js?id=08ef47a59c4d6340ff5a",
|
||||
"/chunks/dashboard.js": "/chunks/dashboard.js?id=aa35b53d6813332579a8",
|
||||
"/chunks/dashboard.js": "/chunks/dashboard.js?id=ea9d0dfc247abcaa5edc",
|
||||
"/chunks/dashboard~chunks/invoices~chunks/pages~chunks/plan-subscribers~chunks/plans~chunks/settings-i~0e2a0654.js": "/chunks/dashboard~chunks/invoices~chunks/pages~chunks/plan-subscribers~chunks/plans~chunks/settings-i~0e2a0654.js?id=b32bd13f9927b553b7a3",
|
||||
"/chunks/database.js": "/chunks/database.js?id=a877c2f9792396cba0c9",
|
||||
"/chunks/dynamic-page.js": "/chunks/dynamic-page.js?id=5c3460801e1960b361be",
|
||||
"/chunks/environment-setup.js": "/chunks/environment-setup.js?id=b835f8fdedb4bc19f4a5",
|
||||
"/chunks/files.js": "/chunks/files.js?id=c4a3a295c64cadca5fe1",
|
||||
"/chunks/files.js": "/chunks/files.js?id=9b47294bd85e1f1db78e",
|
||||
"/chunks/files~chunks/settings-subscription~chunks/shared-files~chunks/shared-page~chunks/user-subscription.js": "/chunks/files~chunks/settings-subscription~chunks/shared-files~chunks/shared-page~chunks/user-subscription.js?id=bfc9bbbc5c50bc21cad7",
|
||||
"/chunks/files~chunks/shared-files~chunks/shared-page.js": "/chunks/files~chunks/shared-files~chunks/shared-page.js?id=fcfb659af2fbff3992a7",
|
||||
"/chunks/files~chunks/shared-page.js": "/chunks/files~chunks/shared-page.js?id=a8c91010ab23e11e39d1",
|
||||
"/chunks/files~chunks/shared-files~chunks/shared-page.js": "/chunks/files~chunks/shared-files~chunks/shared-page.js?id=b60552f07141e4e4d4a6",
|
||||
"/chunks/files~chunks/shared-page.js": "/chunks/files~chunks/shared-page.js?id=c869bb74e66efcad0288",
|
||||
"/chunks/forgotten-password.js": "/chunks/forgotten-password.js?id=7f6474e743f5e147705a",
|
||||
"/chunks/installation-disclaimer.js": "/chunks/installation-disclaimer.js?id=7e924ee2e747d16a2810",
|
||||
"/chunks/invoices.js": "/chunks/invoices.js?id=054419f3a5e20c88a43b",
|
||||
"/chunks/invoices.js": "/chunks/invoices.js?id=198f163d6377feda0dd0",
|
||||
"/chunks/landing-page.js": "/chunks/landing-page.js?id=0e919a402129ab433555",
|
||||
"/chunks/not-found-shared.js": "/chunks/not-found-shared.js?id=1a749c690540349c5276",
|
||||
"/chunks/page-edit.js": "/chunks/page-edit.js?id=9a1ca9eefd4c02203cf5",
|
||||
"/chunks/pages.js": "/chunks/pages.js?id=b2605d41be8c599439c4",
|
||||
"/chunks/plan.js": "/chunks/plan.js?id=4a568fef0d2f64863538",
|
||||
"/chunks/plan-create.js": "/chunks/plan-create.js?id=0891373d600612e1d05c",
|
||||
"/chunks/plan-delete.js": "/chunks/plan-delete.js?id=85e6c8a7dfb7756fa8ad",
|
||||
"/chunks/plan-settings.js": "/chunks/plan-settings.js?id=710a1d7a15b162ba0ce3",
|
||||
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=ca0c3e768cd3ebe76739",
|
||||
"/chunks/plans.js": "/chunks/plans.js?id=f200c1c92480ea2abecd",
|
||||
"/chunks/profile.js": "/chunks/profile.js?id=32f60791adeedc97eee8",
|
||||
"/chunks/page-edit.js": "/chunks/page-edit.js?id=8cbcd452e90411768917",
|
||||
"/chunks/pages.js": "/chunks/pages.js?id=9e3edf996d3f82b0fd7b",
|
||||
"/chunks/plan.js": "/chunks/plan.js?id=ec407870cb21cf8a4d03",
|
||||
"/chunks/plan-create.js": "/chunks/plan-create.js?id=ededfc60ead29ad7f756",
|
||||
"/chunks/plan-delete.js": "/chunks/plan-delete.js?id=4a0cc9bcab4a667145dc",
|
||||
"/chunks/plan-settings.js": "/chunks/plan-settings.js?id=356dad7055651e0381f4",
|
||||
"/chunks/plan-subscribers.js": "/chunks/plan-subscribers.js?id=cfb3435e6013159f0e1c",
|
||||
"/chunks/plans.js": "/chunks/plans.js?id=860475f77ed02b538e02",
|
||||
"/chunks/profile.js": "/chunks/profile.js?id=822812c633278c31acef",
|
||||
"/chunks/profile~chunks/settings-password.js": "/chunks/profile~chunks/settings-password.js?id=f32a0aa48b017ab8d29f",
|
||||
"/chunks/purchase-code.js": "/chunks/purchase-code.js?id=d364c8a71495404871a5",
|
||||
"/chunks/settings.js": "/chunks/settings.js?id=57a84555bb4089da3be2",
|
||||
"/chunks/settings.js": "/chunks/settings.js?id=29d7f69b6af89219b201",
|
||||
"/chunks/settings-create-payment-methods.js": "/chunks/settings-create-payment-methods.js?id=2b284137d3ddc6f9df2a",
|
||||
"/chunks/settings-invoices.js": "/chunks/settings-invoices.js?id=4cbe90ad2c1b6ddaf3e5",
|
||||
"/chunks/settings-password.js": "/chunks/settings-password.js?id=77c9549276bf5eda2bf6",
|
||||
"/chunks/settings-payment-methods.js": "/chunks/settings-payment-methods.js?id=a865bd36a948958cb704",
|
||||
"/chunks/settings-storage.js": "/chunks/settings-storage.js?id=ef3826e9dfb07f199df3",
|
||||
"/chunks/settings-storage.js": "/chunks/settings-storage.js?id=664a8840225f3e43f6ef",
|
||||
"/chunks/settings-subscription.js": "/chunks/settings-subscription.js?id=c9dbe62a0fcc2f86f7ee",
|
||||
"/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=7e5e05c018ddecf29567",
|
||||
"/chunks/setup-wizard.js": "/chunks/setup-wizard.js?id=c6b88005b133268ed88f",
|
||||
"/chunks/shared-files.js": "/chunks/shared-files.js?id=e6f7de2910d85a2dd3e4",
|
||||
"/chunks/shared-page.js": "/chunks/shared-page.js?id=f1276490cd24473cd50b",
|
||||
"/chunks/shared-page.js": "/chunks/shared-page.js?id=04a3534a1a31f006d7de",
|
||||
"/chunks/sign-in.js": "/chunks/sign-in.js?id=7990aa527e933e0f0ebf",
|
||||
"/chunks/sign-up.js": "/chunks/sign-up.js?id=2bc6c1353362c0063d45",
|
||||
"/chunks/stripe-credentials.js": "/chunks/stripe-credentials.js?id=8bfaa10b8499114b79a2",
|
||||
"/chunks/subscription-plans.js": "/chunks/subscription-plans.js?id=1790ab9aa493a483cf3c",
|
||||
"/chunks/subscription-service.js": "/chunks/subscription-service.js?id=8fc09aa45881d0c04e17",
|
||||
"/chunks/upgrade.js": "/chunks/upgrade.js?id=0e9a429679fe180f649e",
|
||||
"/chunks/upgrade.js": "/chunks/upgrade.js?id=6f401f5d12d22bfde1c9",
|
||||
"/chunks/upgrade-billing.js": "/chunks/upgrade-billing.js?id=8a1684e4910b4729ce56",
|
||||
"/chunks/upgrade-billing~chunks/upgrade-plan.js": "/chunks/upgrade-billing~chunks/upgrade-plan.js?id=94cfb5164e5e7f0c2943",
|
||||
"/chunks/upgrade-plan.js": "/chunks/upgrade-plan.js?id=2ce4b7a0ff69e192a968",
|
||||
"/chunks/user.js": "/chunks/user.js?id=15546fc4913e749b7e67",
|
||||
"/chunks/user-create.js": "/chunks/user-create.js?id=63e90b9f77be0c7c0d6f",
|
||||
"/chunks/user-delete.js": "/chunks/user-delete.js?id=0f5036bce016ef6d9ae0",
|
||||
"/chunks/user-detail.js": "/chunks/user-detail.js?id=fb9eb769caee40f5e130",
|
||||
"/chunks/user-invoices.js": "/chunks/user-invoices.js?id=485ff8cb55e409fb36de",
|
||||
"/chunks/user-password.js": "/chunks/user-password.js?id=98871ec6e84b1d14c1e3",
|
||||
"/chunks/user-storage.js": "/chunks/user-storage.js?id=cb587cf1144a5bf79e76",
|
||||
"/chunks/user-subscription.js": "/chunks/user-subscription.js?id=da505396e6266a67cba1",
|
||||
"/chunks/users.js": "/chunks/users.js?id=be2f08e5c0cb8803fd8d",
|
||||
"/js/main.48bc6ba4c58c916b18bb.hot-update.js": "/js/main.48bc6ba4c58c916b18bb.hot-update.js",
|
||||
"/chunks/files~chunks/shared-files~chunks/shared-page.f1b079b97f8091b2390c.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.f1b079b97f8091b2390c.hot-update.js",
|
||||
"/chunks/files~chunks/shared-files~chunks/shared-page.e8a29f26d160f2731420.hot-update.js": "/chunks/files~chunks/shared-files~chunks/shared-page.e8a29f26d160f2731420.hot-update.js",
|
||||
"/chunks/files.04a4918321ccf1ee0426.hot-update.js": "/chunks/files.04a4918321ccf1ee0426.hot-update.js",
|
||||
"/chunks/files.1e310970710676459f34.hot-update.js": "/chunks/files.1e310970710676459f34.hot-update.js",
|
||||
"/chunks/files.b7c6ed65657ab8a91afe.hot-update.js": "/chunks/files.b7c6ed65657ab8a91afe.hot-update.js",
|
||||
"/chunks/files.c9883bd526f46929296f.hot-update.js": "/chunks/files.c9883bd526f46929296f.hot-update.js",
|
||||
"/chunks/files.9282ec4668bf89e4551f.hot-update.js": "/chunks/files.9282ec4668bf89e4551f.hot-update.js"
|
||||
"/chunks/user.js": "/chunks/user.js?id=84b618a67038150688c6",
|
||||
"/chunks/user-create.js": "/chunks/user-create.js?id=9ad6e67ec0ed39a42339",
|
||||
"/chunks/user-delete.js": "/chunks/user-delete.js?id=9e462fe395ddbc4ccc01",
|
||||
"/chunks/user-detail.js": "/chunks/user-detail.js?id=2fccb58814a6d1f8cd69",
|
||||
"/chunks/user-invoices.js": "/chunks/user-invoices.js?id=80fb7bdc658126447241",
|
||||
"/chunks/user-password.js": "/chunks/user-password.js?id=ac44036993054f1a1b41",
|
||||
"/chunks/user-storage.js": "/chunks/user-storage.js?id=d989f56de65842d84727",
|
||||
"/chunks/user-subscription.js": "/chunks/user-subscription.js?id=ce13a0e7a3ee2b607278",
|
||||
"/chunks/users.js": "/chunks/users.js?id=b26ed0a3ad0087236fd9",
|
||||
"/js/main.acd102588e8a8be37f5a.hot-update.js": "/js/main.acd102588e8a8be37f5a.hot-update.js",
|
||||
"/chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chu~c7a13fb0.js": "/chunks/admin-account~chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chu~c7a13fb0.js?id=5842ebc2d92f96d9a14e",
|
||||
"/chunks/admin-account~chunks/app-setup~chunks/billings-detail~chunks/create-new-password~chunks/datab~7cf65924.js": "/chunks/admin-account~chunks/app-setup~chunks/billings-detail~chunks/create-new-password~chunks/datab~7cf65924.js?id=e1ae154ca60eff2f45be",
|
||||
"/chunks/upgrade.acd102588e8a8be37f5a.hot-update.js": "/chunks/upgrade.acd102588e8a8be37f5a.hot-update.js",
|
||||
"/js/main.50cf26e4dfe081f6e9d8.hot-update.js": "/js/main.50cf26e4dfe081f6e9d8.hot-update.js",
|
||||
"/chunks/setup-wizard.50cf26e4dfe081f6e9d8.hot-update.js": "/chunks/setup-wizard.50cf26e4dfe081f6e9d8.hot-update.js",
|
||||
"/chunks/settings.cee80629f3ef6d9a48d3.hot-update.js": "/chunks/settings.cee80629f3ef6d9a48d3.hot-update.js",
|
||||
"/chunks/profile.b8afc7952982a4fd4d0e.hot-update.js": "/chunks/profile.b8afc7952982a4fd4d0e.hot-update.js",
|
||||
"/chunks/profile.c6e207e3f2b5aa2cfff3.hot-update.js": "/chunks/profile.c6e207e3f2b5aa2cfff3.hot-update.js",
|
||||
"/chunks/profile.192c927aaed6e7cbdc00.hot-update.js": "/chunks/profile.192c927aaed6e7cbdc00.hot-update.js",
|
||||
"/chunks/profile.87eff7a19b5e01529315.hot-update.js": "/chunks/profile.87eff7a19b5e01529315.hot-update.js",
|
||||
"/chunks/dashboard.95d674ae20c836e40e96.hot-update.js": "/chunks/dashboard.95d674ae20c836e40e96.hot-update.js",
|
||||
"/chunks/dashboard.4faee9d07770e137375f.hot-update.js": "/chunks/dashboard.4faee9d07770e137375f.hot-update.js",
|
||||
"/chunks/dashboard.1f3f20e8f882567968b5.hot-update.js": "/chunks/dashboard.1f3f20e8f882567968b5.hot-update.js",
|
||||
"/chunks/dashboard.975afd2837cb09ec3d93.hot-update.js": "/chunks/dashboard.975afd2837cb09ec3d93.hot-update.js",
|
||||
"/chunks/dashboard.c44958949b4aa0440320.hot-update.js": "/chunks/dashboard.c44958949b4aa0440320.hot-update.js",
|
||||
"/chunks/dashboard.7584873af2dfc8636e4d.hot-update.js": "/chunks/dashboard.7584873af2dfc8636e4d.hot-update.js",
|
||||
"/chunks/dashboard.7dd853280ea6d580a0fc.hot-update.js": "/chunks/dashboard.7dd853280ea6d580a0fc.hot-update.js",
|
||||
"/chunks/users.3cb9c0872f96ecbf98f0.hot-update.js": "/chunks/users.3cb9c0872f96ecbf98f0.hot-update.js",
|
||||
"/chunks/users.79bdec551cc28db9798e.hot-update.js": "/chunks/users.79bdec551cc28db9798e.hot-update.js",
|
||||
"/chunks/users.5f63771757ee59c71ab7.hot-update.js": "/chunks/users.5f63771757ee59c71ab7.hot-update.js",
|
||||
"/chunks/users.67da0a6baae8b441589b.hot-update.js": "/chunks/users.67da0a6baae8b441589b.hot-update.js",
|
||||
"/chunks/user.3fddfa5cd493ba39284d.hot-update.js": "/chunks/user.3fddfa5cd493ba39284d.hot-update.js",
|
||||
"/chunks/user.138e6b07b04d718ef7b4.hot-update.js": "/chunks/user.138e6b07b04d718ef7b4.hot-update.js",
|
||||
"/chunks/user.076cb56294ad6ec281a6.hot-update.js": "/chunks/user.076cb56294ad6ec281a6.hot-update.js",
|
||||
"/chunks/user.22613097b84c3ddb703c.hot-update.js": "/chunks/user.22613097b84c3ddb703c.hot-update.js",
|
||||
"/chunks/user.851daea4573084138b30.hot-update.js": "/chunks/user.851daea4573084138b30.hot-update.js",
|
||||
"/chunks/user.ee41abbb94245be22dd2.hot-update.js": "/chunks/user.ee41abbb94245be22dd2.hot-update.js",
|
||||
"/chunks/user.3f1437b24d3353d099a4.hot-update.js": "/chunks/user.3f1437b24d3353d099a4.hot-update.js",
|
||||
"/chunks/user.1d618db9e20455d8bf22.hot-update.js": "/chunks/user.1d618db9e20455d8bf22.hot-update.js",
|
||||
"/chunks/user-detail.f6d70e1f13d33dcfcae7.hot-update.js": "/chunks/user-detail.f6d70e1f13d33dcfcae7.hot-update.js",
|
||||
"/chunks/user-delete.6fba20937425844d9cf5.hot-update.js": "/chunks/user-delete.6fba20937425844d9cf5.hot-update.js",
|
||||
"/chunks/user-storage.4fbcc4fac1376d1e478e.hot-update.js": "/chunks/user-storage.4fbcc4fac1376d1e478e.hot-update.js",
|
||||
"/chunks/user-storage.146ee3ac909f1fb1f5c3.hot-update.js": "/chunks/user-storage.146ee3ac909f1fb1f5c3.hot-update.js",
|
||||
"/chunks/user-detail.bf5b21de12e279d5e41d.hot-update.js": "/chunks/user-detail.bf5b21de12e279d5e41d.hot-update.js",
|
||||
"/chunks/user-invoices.bf5b21de12e279d5e41d.hot-update.js": "/chunks/user-invoices.bf5b21de12e279d5e41d.hot-update.js",
|
||||
"/chunks/user-password.bf5b21de12e279d5e41d.hot-update.js": "/chunks/user-password.bf5b21de12e279d5e41d.hot-update.js",
|
||||
"/chunks/user-storage.3d71713649a1be81cc7a.hot-update.js": "/chunks/user-storage.3d71713649a1be81cc7a.hot-update.js",
|
||||
"/chunks/user-subscription.759a864602c6db4bd639.hot-update.js": "/chunks/user-subscription.759a864602c6db4bd639.hot-update.js",
|
||||
"/chunks/user-create.df9e613449e0abc9c927.hot-update.js": "/chunks/user-create.df9e613449e0abc9c927.hot-update.js",
|
||||
"/chunks/invoices.5198b050405708b07643.hot-update.js": "/chunks/invoices.5198b050405708b07643.hot-update.js",
|
||||
"/chunks/pages.fecc0d5d9a54471490cc.hot-update.js": "/chunks/pages.fecc0d5d9a54471490cc.hot-update.js",
|
||||
"/chunks/plan-create.ca500945cbeeb35e4763.hot-update.js": "/chunks/plan-create.ca500945cbeeb35e4763.hot-update.js",
|
||||
"/chunks/plans.ca500945cbeeb35e4763.hot-update.js": "/chunks/plans.ca500945cbeeb35e4763.hot-update.js",
|
||||
"/chunks/dashboard.ae8b35b4b0e457789953.hot-update.js": "/chunks/dashboard.ae8b35b4b0e457789953.hot-update.js",
|
||||
"/chunks/page-edit.ae8b35b4b0e457789953.hot-update.js": "/chunks/page-edit.ae8b35b4b0e457789953.hot-update.js",
|
||||
"/chunks/plan.ae8b35b4b0e457789953.hot-update.js": "/chunks/plan.ae8b35b4b0e457789953.hot-update.js",
|
||||
"/chunks/plan-delete.ae8b35b4b0e457789953.hot-update.js": "/chunks/plan-delete.ae8b35b4b0e457789953.hot-update.js",
|
||||
"/chunks/plan-settings.ae8b35b4b0e457789953.hot-update.js": "/chunks/plan-settings.ae8b35b4b0e457789953.hot-update.js",
|
||||
"/chunks/plan-subscribers.ae8b35b4b0e457789953.hot-update.js": "/chunks/plan-subscribers.ae8b35b4b0e457789953.hot-update.js",
|
||||
"/chunks/plans.ae8b35b4b0e457789953.hot-update.js": "/chunks/plans.ae8b35b4b0e457789953.hot-update.js",
|
||||
"/chunks/app-payments.fbf17904c778df71a5a2.hot-update.js": "/chunks/app-payments.fbf17904c778df71a5a2.hot-update.js",
|
||||
"/chunks/app-appearance.8f581dd73cc45c256cab.hot-update.js": "/chunks/app-appearance.8f581dd73cc45c256cab.hot-update.js",
|
||||
"/chunks/app-billings.8f581dd73cc45c256cab.hot-update.js": "/chunks/app-billings.8f581dd73cc45c256cab.hot-update.js",
|
||||
"/chunks/app-email.8f581dd73cc45c256cab.hot-update.js": "/chunks/app-email.8f581dd73cc45c256cab.hot-update.js",
|
||||
"/chunks/app-index.8f581dd73cc45c256cab.hot-update.js": "/chunks/app-index.8f581dd73cc45c256cab.hot-update.js",
|
||||
"/chunks/app-others.8f581dd73cc45c256cab.hot-update.js": "/chunks/app-others.8f581dd73cc45c256cab.hot-update.js",
|
||||
"/js/main.8b15852e6652ad7df4c4.hot-update.js": "/js/main.8b15852e6652ad7df4c4.hot-update.js",
|
||||
"/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~152bcf79.js": "/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~152bcf79.js?id=1a78f1864cdc370970bf",
|
||||
"/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~e724aa94.js": "/chunks/app-appearance~chunks/app-billings~chunks/app-email~chunks/app-index~chunks/app-others~chunks~e724aa94.js?id=bef61fb2d7f2feeedb08",
|
||||
"/chunks/user-delete.8b15852e6652ad7df4c4.hot-update.js": "/chunks/user-delete.8b15852e6652ad7df4c4.hot-update.js",
|
||||
"/js/main.89fde28708af035907b2.hot-update.js": "/js/main.89fde28708af035907b2.hot-update.js",
|
||||
"/chunks/user-delete.89fde28708af035907b2.hot-update.js": "/chunks/user-delete.89fde28708af035907b2.hot-update.js",
|
||||
"/chunks/app-appearance.547cc213dbf1b7f47fa1.hot-update.js": "/chunks/app-appearance.547cc213dbf1b7f47fa1.hot-update.js",
|
||||
"/chunks/profile.db40feee26819d8809b4.hot-update.js": "/chunks/profile.db40feee26819d8809b4.hot-update.js",
|
||||
"/chunks/profile.aa9ff62154eb1cc577e3.hot-update.js": "/chunks/profile.aa9ff62154eb1cc577e3.hot-update.js",
|
||||
"/chunks/settings-storage.d3303207e2c793d85f99.hot-update.js": "/chunks/settings-storage.d3303207e2c793d85f99.hot-update.js"
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ export default {
|
||||
rootDirectory: {
|
||||
name: this.$t('locations.home'),
|
||||
location: 'base',
|
||||
unique_id: 0
|
||||
id: undefined
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<WidgetWrapper :icon="icon" :title="title">
|
||||
<DatatableWrapper @init="isLoading = false" api="/api/dashboard/new-users" :paginator="false" :columns="columns" class="table table-users">
|
||||
<DatatableWrapper @init="isLoading = false" api="/api/admin/dashboard/newbies" :paginator="false" :columns="columns" class="table table-users">
|
||||
<template slot-scope="{ row }">
|
||||
<tr>
|
||||
<td style="width: 300px">
|
||||
<router-link :to="{name: 'UserDetail', params: {id: row.data.id}}">
|
||||
<DatatableCellImage
|
||||
:image="row.data.attributes.avatar"
|
||||
:title="row.data.attributes.name"
|
||||
:image="row.data.relationships.settings.data.attributes.avatar"
|
||||
:title="row.data.relationships.settings.data.attributes.name"
|
||||
:description="row.data.attributes.email"
|
||||
/>
|
||||
</router-link>
|
||||
@@ -19,7 +19,7 @@
|
||||
</td>
|
||||
<td>
|
||||
<span class="cell-item">
|
||||
{{ row.relationships.storage.data.attributes.used_formatted }}
|
||||
{{ row.data.attributes.storage.used_formatted }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
@@ -30,10 +30,10 @@
|
||||
<td>
|
||||
<div class="action-icons">
|
||||
<router-link :to="{name: 'UserDetail', params: {id: row.data.id}}">
|
||||
<edit-2-icon size="15" class="icon icon-edit"></edit-2-icon>
|
||||
<Edit2Icon size="15" class="icon icon-edit" />
|
||||
</router-link>
|
||||
<router-link :to="{name: 'UserDelete', params: {id: row.data.id}}">
|
||||
<trash2-icon size="15" class="icon icon-trash"></trash2-icon>
|
||||
<Trash2Icon size="15" class="icon icon-trash" />
|
||||
</router-link>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
tabindex="-1"
|
||||
>
|
||||
<div
|
||||
class="files-container"
|
||||
ref="fileContainer"
|
||||
:class="{'is-fileinfo-visible': fileInfoVisible && !$isMinimalScale() , 'mobile-multi-select' : mobileMultiSelect}"
|
||||
@click.self="filesContainerClick"
|
||||
class="files-container"
|
||||
ref="fileContainer"
|
||||
:class="{'is-fileinfo-visible': fileInfoVisible && !$isMinimalScale() , 'mobile-multi-select' : mobileMultiSelect}"
|
||||
@click.self="filesContainerClick"
|
||||
>
|
||||
<!--MobileToolbar-->
|
||||
<MobileToolbar />
|
||||
@@ -25,20 +25,20 @@
|
||||
<!--Item previews list-->
|
||||
<div v-if="isList" class="file-list-wrapper">
|
||||
<transition-group
|
||||
name="file"
|
||||
tag="section"
|
||||
class="file-list"
|
||||
:class="FilePreviewType"
|
||||
name="file"
|
||||
tag="section"
|
||||
class="file-list"
|
||||
:class="FilePreviewType"
|
||||
>
|
||||
<FileItemList
|
||||
@dragstart="dragStart(item)"
|
||||
@drop.stop.native.prevent="dragFinish(item, $event)"
|
||||
@contextmenu.native.prevent="contextMenu($event, item)"
|
||||
:item="item"
|
||||
v-for="item in data"
|
||||
:key="item.unique_id"
|
||||
class="file-item"
|
||||
:class="draggedItems.includes(item) ? 'dragged' : '' "
|
||||
@dragstart="dragStart(item)"
|
||||
@drop.stop.native.prevent="dragFinish(item, $event)"
|
||||
@contextmenu.native.prevent="contextMenu($event, item)"
|
||||
:item="item"
|
||||
v-for="item in data"
|
||||
:key="item.id"
|
||||
class="file-item"
|
||||
:class="draggedItems.includes(item) ? 'dragged' : '' "
|
||||
/>
|
||||
</transition-group>
|
||||
</div>
|
||||
@@ -46,47 +46,47 @@
|
||||
<!--Item previews grid-->
|
||||
<div v-if="isGrid" class="file-grid-wrapper">
|
||||
<transition-group
|
||||
name="file"
|
||||
tag="section"
|
||||
class="file-list"
|
||||
:class="FilePreviewType"
|
||||
name="file"
|
||||
tag="section"
|
||||
class="file-list"
|
||||
:class="FilePreviewType"
|
||||
>
|
||||
<FileItemGrid
|
||||
@dragstart="dragStart(item)"
|
||||
@drop.native.prevent="dragFinish(item, $event)"
|
||||
@contextmenu.native.prevent="contextMenu($event, item)"
|
||||
:item="item"
|
||||
v-for="item in data"
|
||||
:key="item.unique_id"
|
||||
class="file-item"
|
||||
:class="draggedItems.includes(item) ? 'dragged' : '' "
|
||||
@dragstart="dragStart(item)"
|
||||
@drop.native.prevent="dragFinish(item, $event)"
|
||||
@contextmenu.native.prevent="contextMenu($event, item)"
|
||||
:item="item"
|
||||
v-for="item in data"
|
||||
:key="item.id"
|
||||
class="file-item"
|
||||
:class="draggedItems.includes(item) ? 'dragged' : '' "
|
||||
/>
|
||||
</transition-group>
|
||||
</div>
|
||||
|
||||
<!--Show empty page if folder is empty-->
|
||||
<EmptyPage v-if="! isSearching"/>
|
||||
<EmptyPage v-if="! isSearching" />
|
||||
|
||||
<!--Show empty page if no search results-->
|
||||
<EmptyMessage
|
||||
v-if="isSearching && isEmpty"
|
||||
:message="$t('messages.nothing_was_found')"
|
||||
icon="eye-slash"
|
||||
v-if="isSearching && isEmpty"
|
||||
:message="$t('messages.nothing_was_found')"
|
||||
icon="eye-slash"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!--File Info Panel-->
|
||||
<div v-if="! $isMinimalScale()" class="file-info-container" :class="{ 'is-fileinfo-visible': fileInfoVisible }">
|
||||
<!--File info panel-->
|
||||
<FileInfoPanel v-if="fileInfoDetail.length === 1"/>
|
||||
<FileInfoPanel v-if="fileInfoDetail.length === 1" />
|
||||
|
||||
<MultiSelected v-if="fileInfoDetail.length > 1"
|
||||
:title="$t('file_detail.selected_multiple')"
|
||||
:subtitle="this.fileInfoDetail.length + ' ' + $tc('file_detail.items', this.fileInfoDetail.length)"
|
||||
<MultiSelected v-if="fileInfoDetail.length > 1"
|
||||
:title="$t('file_detail.selected_multiple')"
|
||||
:subtitle="this.fileInfoDetail.length + ' ' + $tc('file_detail.items', this.fileInfoDetail.length)"
|
||||
/>
|
||||
|
||||
<!--If file info panel empty show message-->
|
||||
<EmptyMessage v-if="fileInfoDetail.length === 0" :message="$t('messages.nothing_to_preview')" icon="eye-off"/>
|
||||
<EmptyMessage v-if="fileInfoDetail.length === 0" :message="$t('messages.nothing_to_preview')" icon="eye-off" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -140,11 +140,11 @@
|
||||
draggedItems() {
|
||||
//Set opacity for dragged items
|
||||
|
||||
if(!this.fileInfoDetail.includes(this.draggingId)){
|
||||
if (!this.fileInfoDetail.includes(this.draggingId)) {
|
||||
return [this.draggingId]
|
||||
}
|
||||
|
||||
if(this.fileInfoDetail.includes(this.draggingId)) {
|
||||
if (this.fileInfoDetail.includes(this.draggingId)) {
|
||||
return this.fileInfoDetail
|
||||
}
|
||||
}
|
||||
@@ -158,13 +158,13 @@
|
||||
},
|
||||
methods: {
|
||||
deleteItems() {
|
||||
if(this.fileInfoDetail.length > 0 && this.$checkPermission('master') || this.$checkPermission('editor')) {
|
||||
if (this.fileInfoDetail.length > 0 && this.$checkPermission('master') || this.$checkPermission('editor')) {
|
||||
this.$store.dispatch('deleteItem')
|
||||
}
|
||||
},
|
||||
dropUpload(event) {
|
||||
// Upload external file
|
||||
this.$uploadExternalFiles(event, this.currentFolder.unique_id)
|
||||
this.$uploadExternalFiles(event, this.currentFolder.id)
|
||||
|
||||
this.isDragging = false
|
||||
},
|
||||
@@ -191,29 +191,27 @@
|
||||
if (data.type !== 'folder' || this.draggingId === data) return
|
||||
|
||||
//Prevent move selected folder to folder if in beteewn selected folders
|
||||
if(this.fileInfoDetail.find(item => item === data && this.fileInfoDetail.length > 1)) return
|
||||
if (this.fileInfoDetail.find(item => item === data && this.fileInfoDetail.length > 1)) return
|
||||
|
||||
// Move folder to new parent
|
||||
|
||||
//Move item if is not included in selected items
|
||||
if(!this.fileInfoDetail.includes(this.draggingId)){
|
||||
this.$store.dispatch('moveItem', {to_item:data ,noSelectedItem:this.draggingId})
|
||||
//Move item if is not included in selected items
|
||||
if (!this.fileInfoDetail.includes(this.draggingId)) {
|
||||
this.$store.dispatch('moveItem', {to_item: data, noSelectedItem: this.draggingId})
|
||||
}
|
||||
|
||||
//Move selected items to folder
|
||||
if(this.fileInfoDetail.length > 0 && this.fileInfoDetail.includes(this.draggingId)){
|
||||
this.$store.dispatch('moveItem', {to_item:data ,noSelectedItem: null})
|
||||
if (this.fileInfoDetail.length > 0 && this.fileInfoDetail.includes(this.draggingId)) {
|
||||
this.$store.dispatch('moveItem', {to_item: data, noSelectedItem: null})
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
// Get unique_id of current folder
|
||||
const unique_id = data.type !== 'folder' ? this.currentFolder.unique_id : data.unique_id
|
||||
// Get id of current folder
|
||||
const id = data.type !== 'folder' ? this.currentFolder.id : data.id
|
||||
|
||||
// Upload external file
|
||||
this.$uploadExternalFiles(event, unique_id)
|
||||
this.$uploadExternalFiles(event, id)
|
||||
}
|
||||
|
||||
this.isDragging = false
|
||||
@@ -222,38 +220,41 @@
|
||||
events.$emit('contextMenu:show', event, item)
|
||||
},
|
||||
filesContainerClick() {
|
||||
|
||||
// Deselect itms clicked by outside
|
||||
|
||||
// Deselect items clicked by outside
|
||||
this.$store.commit('CLEAR_FILEINFO_DETAIL')
|
||||
}
|
||||
},
|
||||
created() {
|
||||
events.$on('mobileSelecting:start' , () => {
|
||||
this.mobileMultiSelect =true
|
||||
events.$on('mobileSelecting:start', () => {
|
||||
this.mobileMultiSelect = true
|
||||
})
|
||||
|
||||
events.$on('mobileSelecting:stop' , () => {
|
||||
this.mobileMultiSelect = false
|
||||
events.$on('mobileSelecting:stop', () => {
|
||||
this.mobileMultiSelect = false
|
||||
})
|
||||
|
||||
events.$on('drop', () => {
|
||||
this.isDragging = false
|
||||
|
||||
setTimeout(() => {
|
||||
this.draggingId = undefined
|
||||
}, 10);
|
||||
}, 10)
|
||||
})
|
||||
|
||||
events.$on('fileItem:deselect', () =>
|
||||
events.$on('fileItem:deselect', () => {
|
||||
this.$store.commit('CLEAR_FILEINFO_DETAIL')
|
||||
)
|
||||
})
|
||||
|
||||
events.$on('scrollTop', () => {
|
||||
|
||||
// Scroll top
|
||||
var container = document.getElementsByClassName(
|
||||
'files-container'
|
||||
)[0]
|
||||
|
||||
if (container) container.scrollTop = 0
|
||||
if (container)
|
||||
container.scrollTop = 0
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -265,9 +266,9 @@
|
||||
|
||||
.file-list {
|
||||
.dragged {
|
||||
/deep/.is-dragenter {
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
/deep/ .is-dragenter {
|
||||
border: 2px solid transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,7 +280,7 @@
|
||||
position: fixed;
|
||||
pointer-events: none;
|
||||
z-index: 100;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.mobile-multi-select {
|
||||
@@ -433,7 +434,7 @@
|
||||
.mobile-search {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
.file-info-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<!-- MultiSelecting for the mobile version -->
|
||||
<div :class="{'check-select-folder' : this.item.type === 'folder', 'check-select' : this.item.type !== 'folder'}" v-if="multiSelectMode">
|
||||
<div class="select-box" :class="{'select-box-active' : isClicked } ">
|
||||
<CheckIcon v-if="isClicked" class="icon" size="17"/>
|
||||
<CheckIcon v-if="isClicked" class="icon" size="17" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,19 +20,19 @@
|
||||
</span>
|
||||
|
||||
<!--Folder thumbnail-->
|
||||
<FontAwesomeIcon v-if="isFile || (isImage && !item.thumbnail)" class="file-icon" icon="file"/>
|
||||
<FontAwesomeIcon v-if="isFile || (isImage && !item.thumbnail)" class="file-icon" icon="file" />
|
||||
|
||||
<!--Image thumbnail-->
|
||||
<img loading="lazy" v-if="isImage && item.thumbnail" class="image" :src="item.thumbnail" :alt="item.name"/>
|
||||
<img loading="lazy" v-if="isImage && item.thumbnail" class="image" :src="item.thumbnail" :alt="item.name" />
|
||||
|
||||
<!--Else show only folder icon-->
|
||||
<FolderIcon v-if="isFolder" :item="item" location="file-item-grid" class="folder"/>
|
||||
<!--Else show only folder icon-->
|
||||
<FolderIcon v-if="isFolder" :item="item" location="file-item-grid" class="folder" />
|
||||
</div>
|
||||
|
||||
<!--Name-->
|
||||
<div class="item-name">
|
||||
<!--Name-->
|
||||
<b :ref="this.item.unique_id" @input="renameItem" @keydown.delete.stop @click.stop :contenteditable="canEditName" class="name">
|
||||
<b :ref="this.item.id" @input="renameItem" @keydown.delete.stop @click.stop :contenteditable="canEditName" class="name">
|
||||
{{ itemName }}
|
||||
</b>
|
||||
|
||||
@@ -66,11 +66,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { LinkIcon, UserPlusIcon, CheckIcon } from 'vue-feather-icons'
|
||||
import {LinkIcon, UserPlusIcon, CheckIcon} from 'vue-feather-icons'
|
||||
import FolderIcon from '@/components/FilesView/FolderIcon'
|
||||
import { debounce } from 'lodash'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { events } from '@/bus'
|
||||
import {debounce} from 'lodash'
|
||||
import {mapGetters} from 'vuex'
|
||||
import {events} from '@/bus'
|
||||
|
||||
export default {
|
||||
name: 'FileItemGrid',
|
||||
@@ -85,23 +85,23 @@ export default {
|
||||
...mapGetters([
|
||||
'FilePreviewType', 'sharedDetail', 'fileInfoDetail', 'data'
|
||||
]),
|
||||
folderEmojiOrColor(){
|
||||
folderEmojiOrColor() {
|
||||
|
||||
// If folder have set some color
|
||||
if(this.item.icon_color) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs[`folder${this.item.unique_id}`].firstElementChild.style.fill = `${this.item.icon_color}`
|
||||
// If folder have set some color
|
||||
if (this.item.icon_color) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs[`folder${this.item.id}`].firstElementChild.style.fill = this.item.icon_color
|
||||
})
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
// If folder have set some emoji
|
||||
if(this.item.icon_emoji)
|
||||
if (this.item.icon_emoji)
|
||||
return this.item.icon_emoji
|
||||
|
||||
},
|
||||
isClicked() {
|
||||
return this.fileInfoDetail.some(element => element.unique_id == this.item.unique_id)
|
||||
return this.fileInfoDetail.some(element => element.id === this.item.id)
|
||||
},
|
||||
isFolder() {
|
||||
return this.item.type === 'folder'
|
||||
@@ -177,10 +177,10 @@ export default {
|
||||
|
||||
// After click deselect new folder rename input
|
||||
document.getSelection().removeAllRanges();
|
||||
|
||||
|
||||
if (e.ctrlKey || e.metaKey && !e.shiftKey) {
|
||||
// Click + Ctrl
|
||||
if (this.fileInfoDetail.some(item => item.unique_id === this.item.unique_id)) {
|
||||
if (this.fileInfoDetail.some(item => item.id === this.item.id)) {
|
||||
this.$store.commit('REMOVE_ITEM_FILEINFO_DETAIL', this.item)
|
||||
} else {
|
||||
this.$store.commit('GET_FILEINFO_DETAIL', this.item)
|
||||
@@ -218,9 +218,9 @@ export default {
|
||||
if (this.$isMobile() && this.isFolder) {
|
||||
// Go to folder
|
||||
if (this.$isThisLocation('public')) {
|
||||
this.$store.dispatch('browseShared', [{ folder: this.item, back: false, init: false }])
|
||||
this.$store.dispatch('browseShared', [{folder: this.item, back: false, init: false}])
|
||||
} else {
|
||||
this.$store.dispatch('getFolder', [{ folder: this.item, back: false, init: false }])
|
||||
this.$store.dispatch('getFolder', [{folder: this.item, back: false, init: false}])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,21 +233,12 @@ export default {
|
||||
}
|
||||
|
||||
if (this.multiSelectMode && this.$isMobile()) {
|
||||
if (this.fileInfoDetail.some(item => item.unique_id === this.item.unique_id)) {
|
||||
if (this.fileInfoDetail.some(item => item.id === this.item.id)) {
|
||||
this.$store.commit('REMOVE_ITEM_FILEINFO_DETAIL', this.item)
|
||||
} else {
|
||||
this.$store.commit('GET_FILEINFO_DETAIL', this.item)
|
||||
}
|
||||
}
|
||||
// Get target classname
|
||||
let itemClass = e.target.className
|
||||
|
||||
if (
|
||||
['name', 'icon', 'file-link', 'file-icon-text'].includes(
|
||||
itemClass
|
||||
)
|
||||
)
|
||||
return
|
||||
},
|
||||
goToItem() {
|
||||
if (this.isImage || this.isVideo || this.isAudio) {
|
||||
@@ -262,19 +253,19 @@ export default {
|
||||
this.$store.commit('CLEAR_FILEINFO_DETAIL')
|
||||
|
||||
if (this.$isThisLocation('public')) {
|
||||
this.$store.dispatch('browseShared', [{ folder: this.item, back: false, init: false }])
|
||||
this.$store.dispatch('browseShared', [{folder: this.item, back: false, init: false}])
|
||||
} else {
|
||||
this.$store.dispatch('getFolder', [{ folder: this.item, back: false, init: false }])
|
||||
this.$store.dispatch('getFolder', [{folder: this.item, back: false, init: false}])
|
||||
}
|
||||
}
|
||||
},
|
||||
renameItem: debounce(function(e) {
|
||||
renameItem: debounce(function (e) {
|
||||
|
||||
// Prevent submit empty string
|
||||
if (e.target.innerText.trim() === '') return
|
||||
|
||||
this.$store.dispatch('renameItem', {
|
||||
unique_id: this.item.unique_id,
|
||||
id: this.item.id,
|
||||
type: this.item.type,
|
||||
name: e.target.innerText
|
||||
})
|
||||
@@ -283,10 +274,10 @@ export default {
|
||||
created() {
|
||||
this.itemName = this.item.name
|
||||
|
||||
events.$on('newFolder:focus', (unique_id) => {
|
||||
events.$on('newFolder:focus', (id) => {
|
||||
|
||||
if(this.item.unique_id == unique_id && !this.$isMobile()) {
|
||||
this.$refs[unique_id].focus()
|
||||
if (this.item.id === id && !this.$isMobile()) {
|
||||
this.$refs[id].focus()
|
||||
document.execCommand('selectAll')
|
||||
}
|
||||
})
|
||||
@@ -302,7 +293,7 @@ export default {
|
||||
})
|
||||
// Change item name
|
||||
events.$on('change:name', (item) => {
|
||||
if (this.item.unique_id == item.unique_id) this.itemName = item.name
|
||||
if (this.item.id === item.id) this.itemName = item.name
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -559,7 +550,7 @@ export default {
|
||||
.file-icon-text {
|
||||
@include font-size(12);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.folder {
|
||||
width: 75px;
|
||||
@@ -569,7 +560,7 @@ export default {
|
||||
|
||||
/deep/ .folder-icon {
|
||||
@include font-size(75)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.image {
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<!--Name-->
|
||||
<div class="item-name">
|
||||
<b :ref="this.item.unique_id" @input="renameItem" @keydown.delete.stop @click.stop :contenteditable="canEditName" class="name">
|
||||
<b :ref="this.item.id" @input="renameItem" @keydown.delete.stop @click.stop :contenteditable="canEditName" class="name">
|
||||
{{ itemName }}
|
||||
</b>
|
||||
|
||||
@@ -91,7 +91,7 @@ export default {
|
||||
computed: {
|
||||
...mapGetters(['FilePreviewType', 'fileInfoDetail', 'data']),
|
||||
isClicked() {
|
||||
return this.fileInfoDetail.some(element => element.unique_id == this.item.unique_id)
|
||||
return this.fileInfoDetail.some(element => element.id === this.item.id)
|
||||
},
|
||||
isFolder() {
|
||||
return this.item.type === 'folder'
|
||||
@@ -175,7 +175,7 @@ export default {
|
||||
if ((e.ctrlKey || e.metaKey) && !e.shiftKey) {
|
||||
// Click + Ctrl
|
||||
|
||||
if (this.fileInfoDetail.some(item => item.unique_id === this.item.unique_id)) {
|
||||
if (this.fileInfoDetail.some(item => item.id === this.item.id)) {
|
||||
this.$store.commit('REMOVE_ITEM_FILEINFO_DETAIL', this.item)
|
||||
} else {
|
||||
this.$store.commit('GET_FILEINFO_DETAIL', this.item)
|
||||
@@ -209,6 +209,7 @@ export default {
|
||||
}
|
||||
|
||||
if (!this.mobileMultiSelect && this.$isMobile()) {
|
||||
|
||||
// Open in mobile version on first click
|
||||
if (this.$isMobile() && this.isFolder) {
|
||||
// Go to folder
|
||||
@@ -228,17 +229,12 @@ export default {
|
||||
}
|
||||
|
||||
if (this.mobileMultiSelect && this.$isMobile()) {
|
||||
if (this.fileInfoDetail.some(item => item.unique_id === this.item.unique_id)) {
|
||||
if (this.fileInfoDetail.some(item => item.id === this.item.id)) {
|
||||
this.$store.commit('REMOVE_ITEM_FILEINFO_DETAIL', this.item)
|
||||
} else {
|
||||
this.$store.commit('GET_FILEINFO_DETAIL', this.item)
|
||||
}
|
||||
}
|
||||
|
||||
// Get target classname
|
||||
let itemClass = e.target.className
|
||||
|
||||
if (['name', 'icon', 'file-link', 'file-icon-text'].includes(itemClass)) return
|
||||
},
|
||||
goToItem() {
|
||||
if (this.isImage || this.isVideo || this.isAudio) {
|
||||
@@ -249,7 +245,7 @@ export default {
|
||||
|
||||
} else if (this.isFolder) {
|
||||
|
||||
//Clear selected items after open another folder
|
||||
// Clear selected items after open another folder
|
||||
this.$store.commit('CLEAR_FILEINFO_DETAIL')
|
||||
|
||||
if (this.$isThisLocation('public')) {
|
||||
@@ -264,7 +260,7 @@ export default {
|
||||
if (e.target.innerText.trim() === '') return
|
||||
|
||||
this.$store.dispatch('renameItem', {
|
||||
unique_id: this.item.unique_id,
|
||||
id: this.item.id,
|
||||
type: this.item.type,
|
||||
name: e.target.innerText
|
||||
})
|
||||
@@ -274,10 +270,10 @@ export default {
|
||||
|
||||
this.itemName = this.item.name
|
||||
|
||||
events.$on('newFolder:focus', (unique_id) => {
|
||||
events.$on('newFolder:focus', (id) => {
|
||||
|
||||
if(this.item.unique_id == unique_id && !this.$isMobile()) {
|
||||
this.$refs[unique_id].focus()
|
||||
if(this.item.id === id && !this.$isMobile()) {
|
||||
this.$refs[id].focus()
|
||||
document.execCommand('selectAll')
|
||||
}
|
||||
})
|
||||
@@ -294,7 +290,7 @@ export default {
|
||||
|
||||
// Change item name
|
||||
events.$on('change:name', (item) => {
|
||||
if (this.item.unique_id == item.unique_id) this.itemName = item.name
|
||||
if (this.item.id === item.id) this.itemName = item.name
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ export default {
|
||||
},
|
||||
choseActiveFile() {
|
||||
this.sliderFile.forEach((element, index) => {
|
||||
if (element.unique_id == this.fileInfoDetail[0].unique_id) {
|
||||
if (element.id == this.fileInfoDetail[0].id) {
|
||||
this.currentIndex = index
|
||||
}
|
||||
})
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<!-- If is emoji selected -->
|
||||
<div class="select-input" v-if="selectedEmoji && selectedEmoji !== 'default'">
|
||||
<div @click.stop="resetEmoji" class="select-input-icon-wrapper">
|
||||
<x-icon size="14" class="select-input-icon"/>
|
||||
<x-icon size="14" class="select-input-icon" />
|
||||
</div>
|
||||
<Emoji class="emoji-preview" :emoji="selectedEmoji" location="emoji-picker-preview" />
|
||||
<span>{{ selectedEmoji.name }}</span>
|
||||
@@ -19,7 +19,7 @@
|
||||
<span> {{ $t('popup_rename.set_emoji_input_placeholder') }}</span>
|
||||
</div>
|
||||
|
||||
<chevron-down-icon class="row-icon" size="19"/>
|
||||
<chevron-down-icon class="row-icon" size="19" />
|
||||
</div>
|
||||
|
||||
<!-- Emojis List -->
|
||||
@@ -27,7 +27,7 @@
|
||||
<div v-if="selectOpen">
|
||||
<!-- Spinner -->
|
||||
<div v-if="!loadedList" class="emoji-wrapper">
|
||||
<Spinner/>
|
||||
<Spinner />
|
||||
</div>
|
||||
|
||||
<!-- List -->
|
||||
@@ -64,7 +64,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<span class="not-found" v-if="filteredEmojis.length === 0 && filteredEmojisLoaded"> {{ $t('popup_rename.emoji_list_not_found') }}</span>
|
||||
<Spinner v-if=" ! filteredEmojisLoaded "/>
|
||||
<Spinner v-if=" ! filteredEmojisLoaded " />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -74,17 +74,17 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ChevronDownIcon, XIcon } from 'vue-feather-icons'
|
||||
import {ChevronDownIcon, XIcon} from 'vue-feather-icons'
|
||||
import Spinner from '@/components/FilesView/Spinner'
|
||||
import Emoji from '@/components/Others/Emoji'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { groupBy } from 'lodash'
|
||||
import { events } from '@/bus'
|
||||
import {mapGetters} from 'vuex'
|
||||
import {groupBy} from 'lodash'
|
||||
import {events} from '@/bus'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'EmojiPicker',
|
||||
props: [ 'pickedEmoji' ],
|
||||
props: ['pickedEmoji'],
|
||||
components: {
|
||||
ChevronDownIcon,
|
||||
Spinner,
|
||||
@@ -92,9 +92,9 @@ export default {
|
||||
XIcon,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([ 'emojis' ]),
|
||||
...mapGetters(['emojis']),
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
selectedEmoji: this.pickedEmoji,
|
||||
searchInput: '',
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
allEmoji() {
|
||||
return groupBy(this.emojis.emojisList, 'group')
|
||||
},
|
||||
checkGroupInView: _.debounce( function() {
|
||||
checkGroupInView: _.debounce(function () {
|
||||
|
||||
this.emojis.emojisGroups.forEach(group => {
|
||||
|
||||
@@ -127,7 +127,7 @@ export default {
|
||||
|
||||
let group = document.getElementById(`group-${name}`)
|
||||
|
||||
group.scrollIntoView({ behavior: 'smooth' })
|
||||
group.scrollIntoView({behavior: 'smooth'})
|
||||
|
||||
this.groupInView = name
|
||||
},
|
||||
@@ -139,12 +139,12 @@ export default {
|
||||
|
||||
this.filteredEmojis = [],
|
||||
|
||||
this.filterEmojis()
|
||||
this.filterEmojis()
|
||||
|
||||
},
|
||||
filterEmojis: _.debounce(function() {
|
||||
filterEmojis: _.debounce(function () {
|
||||
|
||||
this.filteredEmojis = this.emojis.emojisList.filter(emoji => emoji.name.includes( this.searchInput.toLowerCase() ))
|
||||
this.filteredEmojis = this.emojis.emojisList.filter(emoji => emoji.name.includes(this.searchInput.toLowerCase()))
|
||||
|
||||
this.filteredEmojisLoaded = true
|
||||
|
||||
@@ -156,14 +156,16 @@ export default {
|
||||
this.selectOpen = !this.selectOpen
|
||||
|
||||
// Load emojis from server just if not loaded already
|
||||
if (this.selectOpen && ! this.emojis) {
|
||||
this.$store.dispatch('getEmojisList').then((loaded) => {
|
||||
this.loadedList = loaded
|
||||
})
|
||||
if (this.selectOpen && !this.emojis) {
|
||||
|
||||
axios.get('/assets/emojis.json')
|
||||
.then(response => {
|
||||
this.$store.commit('LOAD_EMOJIS_LIST', response.data[0])
|
||||
})
|
||||
}
|
||||
|
||||
// Simulate loading for the emojisList processing
|
||||
if(this.emojis) {
|
||||
if (this.emojis) {
|
||||
setTimeout(() => {
|
||||
this.loadedList = true
|
||||
}, 20);
|
||||
@@ -189,7 +191,7 @@ export default {
|
||||
this.$emit('input', 'default')
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
mounted() {
|
||||
|
||||
this.selectOpen = false
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ export default {
|
||||
if (this.pickedItem.name && this.pickedItem.name !== '') {
|
||||
|
||||
let item = {
|
||||
unique_id: this.pickedItem.unique_id,
|
||||
id: this.pickedItem.id,
|
||||
type: this.pickedItem.type,
|
||||
name: this.pickedItem.name,
|
||||
icon: this.setFolderIcon ? this.setFolderIcon : null
|
||||
|
||||
@@ -157,7 +157,7 @@ export default {
|
||||
password: undefined,
|
||||
permission: undefined,
|
||||
type: undefined,
|
||||
unique_id: undefined,
|
||||
id: undefined,
|
||||
emails: undefined
|
||||
},
|
||||
pickedItem: undefined,
|
||||
@@ -231,7 +231,7 @@ export default {
|
||||
this.pickedItem = args.item
|
||||
|
||||
this.shareOptions.type = args.item.type
|
||||
this.shareOptions.unique_id = args.item.unique_id
|
||||
this.shareOptions.id = args.item.id
|
||||
})
|
||||
|
||||
// Close popup
|
||||
@@ -245,7 +245,7 @@ export default {
|
||||
isPassword: false,
|
||||
expiration: undefined,
|
||||
type: undefined,
|
||||
unique_id: undefined,
|
||||
id: undefined,
|
||||
emails: undefined
|
||||
}
|
||||
this.isGeneratedShared = false
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
|
||||
<TreeMenuNavigator :disabled="disableChildren" :depth="depth + 1" v-if="isVisible" :nodes="item" v-for="item in nodes.folders"
|
||||
:key="item.unique_id"/>
|
||||
:key="item.id"/>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
@@ -46,11 +46,11 @@
|
||||
|
||||
this.draggedItem.forEach(item => {
|
||||
//Disable the parent of the folder
|
||||
if(item.type === "folder" && this.nodes.unique_id === item.parent_id){
|
||||
if(item.type === "folder" && this.nodes.id === item.parent_id){
|
||||
disableFolder = true
|
||||
}
|
||||
//Disable the self folder with all children
|
||||
if (this.nodes.unique_id === item.unique_id && item.type === 'folder') {
|
||||
if (this.nodes.id === item.id && item.type === 'folder') {
|
||||
disableFolder = true
|
||||
this.disableChildren = true
|
||||
}
|
||||
@@ -141,7 +141,7 @@
|
||||
events.$on('show-folder', node => {
|
||||
this.isSelected = false
|
||||
|
||||
if (this.nodes.unique_id == node.unique_id)
|
||||
if (this.nodes.id == node.id)
|
||||
this.isSelected = true
|
||||
})
|
||||
}
|
||||
|
||||
2
resources/js/helpers.js
vendored
2
resources/js/helpers.js
vendored
@@ -85,7 +85,7 @@ const Helpers = {
|
||||
// Push items to file queue
|
||||
[...files].map(item => {
|
||||
this.$store.commit('ADD_FILES_TO_QUEUE', {
|
||||
parent_id: store.getters.currentFolder.unique_id,
|
||||
parent_id: store.getters.currentFolder.id,
|
||||
file: item,
|
||||
})
|
||||
});
|
||||
|
||||
9
resources/js/router.js
vendored
9
resources/js/router.js
vendored
@@ -485,15 +485,6 @@ const routesUser = [
|
||||
},
|
||||
]
|
||||
const routesMaintenance = [
|
||||
{
|
||||
name: 'Upgrade',
|
||||
path: '/upgrade',
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "chunks/upgrade" */ './views/Upgrade'),
|
||||
meta: {
|
||||
requiresAuth: false
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'SetupWizard',
|
||||
path: '/install',
|
||||
|
||||
17
resources/js/store/modules/app.js
vendored
17
resources/js/store/modules/app.js
vendored
@@ -1,7 +1,7 @@
|
||||
import i18n from '@/i18n/index'
|
||||
|
||||
const defaultState = {
|
||||
fileInfoPanelVisible: localStorage.getItem('file_info_visibility') == 'true' || true,
|
||||
fileInfoPanelVisible: localStorage.getItem('file_info_visibility') === 'true' || false,
|
||||
FilePreviewType: localStorage.getItem('preview_type') || 'list',
|
||||
config: undefined,
|
||||
index: undefined,
|
||||
@@ -968,21 +968,6 @@ const defaultState = {
|
||||
]
|
||||
}
|
||||
const actions = {
|
||||
getEmojisList: ({commit}) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
axios.get('/assets/emojis.json')
|
||||
.then((response) => {
|
||||
commit('LOAD_EMOJIS_LIST', response.data[0])
|
||||
|
||||
})
|
||||
.catch(() => Vue.prototype.$isSomethingWrong())
|
||||
.finally(() => {
|
||||
resolve(true)
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
changePreviewType: ({commit, state}, preview) => {
|
||||
|
||||
// Get preview type
|
||||
|
||||
30
resources/js/store/modules/fileBrowser.js
vendored
30
resources/js/store/modules/fileBrowser.js
vendored
@@ -72,7 +72,7 @@ const actions = {
|
||||
commit('STORE_PREVIOUS_FOLDER', getters.currentFolder)
|
||||
commit('STORE_CURRENT_FOLDER', {
|
||||
name: i18n.t('sidebar.latest'),
|
||||
unique_id: undefined,
|
||||
id: undefined,
|
||||
location: 'latest',
|
||||
})
|
||||
|
||||
@@ -92,7 +92,7 @@ const actions = {
|
||||
let currentFolder = {
|
||||
name: i18n.t('sidebar.my_shared'),
|
||||
location: 'shared',
|
||||
unique_id: undefined,
|
||||
id: undefined,
|
||||
}
|
||||
|
||||
commit('STORE_CURRENT_FOLDER', currentFolder)
|
||||
@@ -113,7 +113,7 @@ const actions = {
|
||||
commit('STORE_PREVIOUS_FOLDER', getters.currentFolder)
|
||||
commit('STORE_CURRENT_FOLDER', {
|
||||
name: i18n.t('sidebar.participant_uploads'),
|
||||
unique_id: undefined,
|
||||
id: undefined,
|
||||
location: 'participant_uploads',
|
||||
})
|
||||
|
||||
@@ -132,7 +132,7 @@ const actions = {
|
||||
|
||||
let trash = {
|
||||
name: i18n.t('locations.trash'),
|
||||
unique_id: undefined,
|
||||
id: undefined,
|
||||
location: 'trash-root',
|
||||
}
|
||||
|
||||
@@ -213,9 +213,9 @@ const mutations = {
|
||||
FLUSH_FOLDER_HISTORY(state) {
|
||||
state.browseHistory = []
|
||||
},
|
||||
FLUSH_SHARED(state, unique_id) {
|
||||
FLUSH_SHARED(state, id) {
|
||||
state.data.find(item => {
|
||||
if (item.unique_id == unique_id) item.shared = undefined
|
||||
if (item.id === id) item.shared = undefined
|
||||
})
|
||||
},
|
||||
STORE_PREVIOUS_FOLDER(state, folder) {
|
||||
@@ -226,13 +226,13 @@ const mutations = {
|
||||
},
|
||||
CHANGE_ITEM_NAME(state, updatedFile) {
|
||||
// Rename filename in file info detail
|
||||
if (state.fileInfoDetail && state.fileInfoDetail.unique_id == updatedFile.unique_id) {
|
||||
if (state.fileInfoDetail && state.fileInfoDetail.id === updatedFile.id) {
|
||||
state.fileInfoDetail = updatedFile
|
||||
}
|
||||
|
||||
// Rename item name in data view
|
||||
state.data.find(item => {
|
||||
if (item.unique_id == updatedFile.unique_id) {
|
||||
if (item.id === updatedFile.id) {
|
||||
item.name = updatedFile.name
|
||||
item.icon_color = updatedFile.icon_color ? updatedFile.icon_color : null
|
||||
item.icon_emoji = updatedFile.icon_emoji ? updatedFile.icon_emoji : null
|
||||
@@ -240,7 +240,7 @@ const mutations = {
|
||||
})
|
||||
},
|
||||
REMOVE_ITEM_FILEINFO_DETAIL(state,item) {
|
||||
state.fileInfoDetail = state.fileInfoDetail.filter(element => element.unique_id !== item.unique_id)
|
||||
state.fileInfoDetail = state.fileInfoDetail.filter(element => element.id !== item.id)
|
||||
},
|
||||
CLEAR_FILEINFO_DETAIL(state) {
|
||||
state.fileInfoDetail = []
|
||||
@@ -250,7 +250,7 @@ const mutations = {
|
||||
state.fileInfoDetail.push(item)
|
||||
},
|
||||
GET_FILEINFO_DETAIL(state, item) {
|
||||
let checkData = state.data.find(el => el.unique_id == item.unique_id)
|
||||
let checkData = state.data.find(el => el.id === item.id)
|
||||
if(state.fileInfoDetail.includes(checkData)) return
|
||||
|
||||
state.fileInfoDetail.push(checkData ? checkData : state.currentFolder)
|
||||
@@ -263,7 +263,7 @@ const mutations = {
|
||||
},
|
||||
UPDATE_SHARED_ITEM(state, data) {
|
||||
state.data.find(item => {
|
||||
if (item.unique_id == data.item_id) item.shared = data
|
||||
if (item.id === data.item_id) item.shared = data
|
||||
})
|
||||
},
|
||||
ADD_NEW_FOLDER(state, folder) {
|
||||
@@ -272,12 +272,12 @@ const mutations = {
|
||||
ADD_NEW_ITEMS(state, items) {
|
||||
state.data = state.data.concat(items)
|
||||
},
|
||||
REMOVE_ITEM(state, unique_id) {
|
||||
state.data = state.data.filter(el => el.unique_id !== unique_id)
|
||||
REMOVE_ITEM(state, id) {
|
||||
state.data = state.data.filter(el => el.id !== id)
|
||||
},
|
||||
INCREASE_FOLDER_ITEM(state, unique_id) {
|
||||
INCREASE_FOLDER_ITEM(state, id) {
|
||||
state.data.map(el => {
|
||||
if (el.unique_id && el.unique_id == unique_id) el.items++
|
||||
if (el.id && el.id === id) el.items++
|
||||
})
|
||||
},
|
||||
STORE_CURRENT_FOLDER(state, folder) {
|
||||
|
||||
44
resources/js/store/modules/fileFunctions.js
vendored
44
resources/js/store/modules/fileFunctions.js
vendored
@@ -26,8 +26,8 @@ const actions = {
|
||||
|
||||
// Get route
|
||||
let route = getters.sharedDetail && !getters.sharedDetail.protected
|
||||
? '/api/zip-folder/' + folder.unique_id + '/public/' + router.currentRoute.params.token
|
||||
: '/api/zip-folder/' + folder.unique_id
|
||||
? '/api/zip-folder/' + folder.id + '/public/' + router.currentRoute.params.token
|
||||
: '/api/zip-folder/' + folder.id
|
||||
|
||||
axios.get(route)
|
||||
.then(response => {
|
||||
@@ -44,8 +44,8 @@ const actions = {
|
||||
downloadFiles: ({ commit, getters }) => {
|
||||
let files = []
|
||||
|
||||
// get unique_ids of selected files
|
||||
getters.fileInfoDetail.forEach(file => files.push(file.unique_id))
|
||||
// get ids of selected files
|
||||
getters.fileInfoDetail.forEach(file => files.push(file.id))
|
||||
|
||||
// Get route
|
||||
let route = getters.sharedDetail && !getters.sharedDetail.protected
|
||||
@@ -81,7 +81,7 @@ const actions = {
|
||||
|
||||
items.forEach(data => itemsToMove.push({
|
||||
'force_delete': data.deleted_at ? true : false,
|
||||
'unique_id': data.unique_id,
|
||||
'id': data.id,
|
||||
'type': data.type
|
||||
}))
|
||||
|
||||
@@ -97,13 +97,13 @@ const actions = {
|
||||
axios
|
||||
.post(route, {
|
||||
_method: 'post',
|
||||
to_unique_id: to_item.unique_id,
|
||||
to_id: to_item.id,
|
||||
items: itemsToMove
|
||||
})
|
||||
.then(() => {
|
||||
itemsToMove.forEach(item => {
|
||||
commit('REMOVE_ITEM', item.unique_id)
|
||||
commit('INCREASE_FOLDER_ITEM', to_item.unique_id)
|
||||
commit('REMOVE_ITEM', item.id)
|
||||
commit('INCREASE_FOLDER_ITEM', to_item.id)
|
||||
|
||||
if (item.type === 'folder')
|
||||
dispatch('getAppData')
|
||||
@@ -122,7 +122,7 @@ const actions = {
|
||||
|
||||
axios
|
||||
.post(route, {
|
||||
parent_id: getters.currentFolder.unique_id,
|
||||
parent_id: getters.currentFolder.id,
|
||||
name: folder.name,
|
||||
icon: folder.icon
|
||||
})
|
||||
@@ -133,7 +133,7 @@ const actions = {
|
||||
|
||||
//Set focus on new folder name
|
||||
setTimeout(() => {
|
||||
events.$emit('newFolder:focus', response.data.unique_id)
|
||||
events.$emit('newFolder:focus', response.data.id)
|
||||
}, 10)
|
||||
|
||||
if (getters.currentFolder.location !== 'public')
|
||||
@@ -152,8 +152,8 @@ const actions = {
|
||||
|
||||
// Get route
|
||||
let route = getters.sharedDetail && !getters.sharedDetail.protected
|
||||
? '/api/rename-item/' + data.unique_id + '/public/' + router.currentRoute.params.token
|
||||
: '/api/rename-item/' + data.unique_id
|
||||
? '/api/rename-item/' + data.id + '/public/' + router.currentRoute.params.token
|
||||
: '/api/rename-item/' + data.id
|
||||
|
||||
axios
|
||||
.post(route, {
|
||||
@@ -209,7 +209,7 @@ const actions = {
|
||||
commit('SHIFT_FROM_FILE_QUEUE')
|
||||
|
||||
// Check if user is in uploading folder, if yes, than show new file
|
||||
if (response.data.folder_id == getters.currentFolder.unique_id) {
|
||||
if (response.data.folder_id == getters.currentFolder.id) {
|
||||
|
||||
// Add uploaded item into view
|
||||
commit('ADD_NEW_ITEMS', response.data)
|
||||
@@ -284,8 +284,8 @@ const actions = {
|
||||
restoreToHome = true
|
||||
|
||||
items.forEach(data => itemToRestore.push({
|
||||
'type': data.type,
|
||||
'unique_id': data.unique_id
|
||||
type: data.type,
|
||||
id: data.id
|
||||
}))
|
||||
|
||||
// Remove file preview
|
||||
@@ -298,7 +298,7 @@ const actions = {
|
||||
})
|
||||
.then(
|
||||
// Remove file
|
||||
items.forEach(data => commit('REMOVE_ITEM', data.unique_id))
|
||||
items.forEach(data => commit('REMOVE_ITEM', data.id))
|
||||
)
|
||||
.catch(() => Vue.prototype.$isSomethingWrong())
|
||||
},
|
||||
@@ -313,13 +313,13 @@ const actions = {
|
||||
|
||||
items.forEach(data => {
|
||||
itemsToDelete.push({
|
||||
'force_delete': data.deleted_at ? true : false,
|
||||
'type': data.type,
|
||||
'unique_id': data.unique_id
|
||||
force_delete: data.deleted_at ? true : false,
|
||||
type: data.type,
|
||||
id: data.id
|
||||
})
|
||||
|
||||
// Remove file
|
||||
commit('REMOVE_ITEM', data.unique_id)
|
||||
commit('REMOVE_ITEM', data.id)
|
||||
|
||||
// Remove item from sidebar
|
||||
if (getters.permission === 'master') {
|
||||
@@ -329,7 +329,7 @@ const actions = {
|
||||
}
|
||||
|
||||
// Remove file
|
||||
commit('REMOVE_ITEM', data.unique_id)
|
||||
commit('REMOVE_ITEM', data.id)
|
||||
|
||||
// Remove item from sidebar
|
||||
if (getters.permission === 'master') {
|
||||
@@ -361,7 +361,7 @@ const actions = {
|
||||
// If is folder, update app data
|
||||
if (data.type === 'folder') {
|
||||
|
||||
if (data.unique_id === getters.currentFolder.unique_id) {
|
||||
if (data.id === getters.currentFolder.id) {
|
||||
|
||||
if (getters.currentFolder.location === 'public') {
|
||||
dispatch('browseShared', [{ folder: last(getters.browseHistory), back: true, init: false }])
|
||||
|
||||
11
resources/js/store/modules/sharing.js
vendored
11
resources/js/store/modules/sharing.js
vendored
@@ -2,6 +2,7 @@ import i18n from '@/i18n/index'
|
||||
import router from '@/router'
|
||||
import {events} from '@/bus'
|
||||
import axios from 'axios'
|
||||
import Vue from "vue";
|
||||
|
||||
const defaultState = {
|
||||
permissionOptions: [
|
||||
@@ -38,8 +39,8 @@ const actions = {
|
||||
payload.folder.location = 'public'
|
||||
|
||||
let route = getters.sharedDetail.protected
|
||||
? '/api/folders/' + payload.folder.unique_id + '/private'
|
||||
: '/api/folders/' + payload.folder.unique_id + '/public/' + router.currentRoute.params.token
|
||||
? '/api/browse/folders/' + payload.folder.id + '/private'
|
||||
: '/api/browse/folders/' + payload.folder.id + '/public/' + router.currentRoute.params.token
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
@@ -90,11 +91,11 @@ const actions = {
|
||||
|
||||
// Remove item from file browser
|
||||
if ( getters.currentFolder , getters.currentFolder.location === 'shared' ) {
|
||||
commit('REMOVE_ITEM', item.unique_id)
|
||||
commit('REMOVE_ITEM', item.id)
|
||||
}
|
||||
|
||||
// Flush shared data
|
||||
commit('FLUSH_SHARED', item.unique_id)
|
||||
commit('FLUSH_SHARED', item.id)
|
||||
|
||||
commit('CLEAR_FILEINFO_DETAIL')
|
||||
})
|
||||
@@ -102,7 +103,7 @@ const actions = {
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
isSomethingWrong()
|
||||
Vue.prototype.$isSomethingWrong()
|
||||
|
||||
reject(error)
|
||||
})
|
||||
|
||||
24
resources/js/store/modules/userAuth.js
vendored
24
resources/js/store/modules/userAuth.js
vendored
@@ -67,10 +67,10 @@ const actions = {
|
||||
items.forEach((data) => {
|
||||
if(data.type === 'folder' ) {
|
||||
|
||||
if(context.getters.user.relationships.favourites.data.attributes.folders.find(folder => folder.unique_id === data.unique_id)) return
|
||||
if(context.getters.user.data.relationships.favourites.data.attributes.folders.find(folder => folder.id === data.id)) return
|
||||
|
||||
addFavourites.push({
|
||||
'unique_id': data.unique_id
|
||||
id: data.id
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -84,7 +84,7 @@ const actions = {
|
||||
|
||||
// Check is favorites already don't include some of pushed folders
|
||||
items.map(data => {
|
||||
if(!context.getters.user.relationships.favourites.data.attributes.folders.find(folder => folder.unique_id === data.unique_id)){
|
||||
if(!context.getters.user.data.relationships.favourites.data.attributes.folders.find(folder => folder.id === data.id)){
|
||||
pushToFavorites.push(data)
|
||||
}
|
||||
})
|
||||
@@ -106,7 +106,7 @@ const actions = {
|
||||
commit('REMOVE_ITEM_FROM_FAVOURITES', folder)
|
||||
|
||||
axios
|
||||
.post(getters.api + '/folders/favourites/' + folder.unique_id, {
|
||||
.post(getters.api + '/folders/favourites/' + folder.id, {
|
||||
_method: 'delete'
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -128,25 +128,27 @@ const mutations = {
|
||||
},
|
||||
ADD_TO_FAVOURITES(state, folder) {
|
||||
folder.forEach(item => {
|
||||
state.user.relationships.favourites.data.attributes.folders.push({
|
||||
unique_id: item.unique_id,
|
||||
state.user.data.relationships.favourites.data.attributes.folders.push({
|
||||
id: item.id,
|
||||
name: item.name,
|
||||
type: item.type,
|
||||
})
|
||||
})
|
||||
},
|
||||
UPDATE_NAME(state, name) {
|
||||
state.user.data.attributes.name = name
|
||||
state.user.data.relationships.settings.data.attributes.name = name
|
||||
},
|
||||
UPDATE_AVATAR(state, avatar) {
|
||||
state.user.data.attributes.avatar = avatar
|
||||
state.user.data.relationships.settings.data.attributes.avatar = avatar
|
||||
},
|
||||
REMOVE_ITEM_FROM_FAVOURITES(state, item) {
|
||||
state.user.relationships.favourites.data.attributes.folders = state.user.relationships.favourites.data.attributes.folders.filter(folder => folder.unique_id !== item.unique_id)
|
||||
state.user.data.relationships.favourites.data.attributes.folders = state.user.data.relationships.favourites.data.attributes.folders.filter(folder => folder.id !== item.id)
|
||||
},
|
||||
UPDATE_NAME_IN_FAVOURITES(state, data) {
|
||||
state.user.relationships.favourites.data.attributes.folders.find(folder => {
|
||||
if (folder.unique_id == data.unique_id) folder.name = data.name
|
||||
state.user.data.relationships.favourites.data.attributes.folders.find(folder => {
|
||||
if (folder.id === data.id) {
|
||||
folder.name = data.name
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('admin_settings.appearance.title') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Title" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'app_title', app.title)" v-model="app.title" :placeholder="$t('admin_settings.appearance.title_plac')" type="text"
|
||||
<input @input="$updateText('/admin/settings', 'app_title', app.title)" v-model="app.title" :placeholder="$t('admin_settings.appearance.title_plac')" type="text"
|
||||
:class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('admin_settings.appearance.description') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Description" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'app_description', app.description)" v-model="app.description"
|
||||
<input @input="$updateText('/admin/settings', 'app_description', app.description)" v-model="app.description"
|
||||
:placeholder="$t('admin_settings.appearance.description_plac')" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
@@ -29,14 +29,14 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('admin_settings.appearance.logo') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Logo" v-slot="{ errors }">
|
||||
<ImageInput @input="$updateImage('/settings', 'app_logo', app.logo)" :image="$getImage(app.logo)" v-model="app.logo" :error="errors[0]"/>
|
||||
<ImageInput @input="$updateImage('/admin/settings', 'app_logo', app.logo)" :image="$getImage(app.logo)" v-model="app.logo" :error="errors[0]"/>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('admin_settings.appearance.logo_horizontal') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Logo Horizontal" v-slot="{ errors }">
|
||||
<ImageInput @input="$updateImage('/settings', 'app_logo_horizontal', app.logo_horizontal)" :image="$getImage(app.logo_horizontal)"
|
||||
<ImageInput @input="$updateImage('/admin/settings', 'app_logo_horizontal', app.logo_horizontal)" :image="$getImage(app.logo_horizontal)"
|
||||
v-model="app.logo_horizontal" :error="errors[0]"/>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('admin_settings.appearance.favicon') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Favicon" v-slot="{ errors }">
|
||||
<ImageInput @input="$updateImage('/settings', 'app_favicon', app.favicon)" :image="$getImage(app.favicon)" v-model="app.favicon" :error="errors[0]"/>
|
||||
<ImageInput @input="$updateImage('/admin/settings', 'app_favicon', app.favicon)" :image="$getImage(app.favicon)" v-model="app.favicon" :error="errors[0]"/>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
</div>
|
||||
@@ -89,7 +89,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
axios.get('/api/settings', {
|
||||
axios.get('/api/admin/settings', {
|
||||
params: {
|
||||
column: 'app_title|app_description|app_logo|app_favicon|app_logo_horizontal'
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<label>{{ $t('admin_settings.billings.company_name') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Billing Name"
|
||||
rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'billing_name', billingInformation.billing_name)" v-model="billingInformation.billing_name" :placeholder="$t('admin_settings.billings.company_name_plac')"
|
||||
<input @input="$updateText('/admin/settings', 'billing_name', billingInformation.billing_name)" v-model="billingInformation.billing_name" :placeholder="$t('admin_settings.billings.company_name_plac')"
|
||||
type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
@@ -20,7 +20,7 @@
|
||||
<label>{{ $t('admin_settings.billings.vat') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Billing Vat Number"
|
||||
rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'billing_vat_number', billingInformation.billing_vat_number)" v-model="billingInformation.billing_vat_number" :placeholder="$t('admin_settings.billings.vat_plac')"
|
||||
<input @input="$updateText('/admin/settings', 'billing_vat_number', billingInformation.billing_vat_number)" v-model="billingInformation.billing_vat_number" :placeholder="$t('admin_settings.billings.vat_plac')"
|
||||
type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
@@ -32,7 +32,7 @@
|
||||
<label>{{ $t('admin_settings.billings.country') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Billing Country"
|
||||
rules="required" v-slot="{ errors }">
|
||||
<SelectInput @input="$updateText('/settings', 'billing_country', billingInformation.billing_country)" v-model="billingInformation.billing_country" :default="billingInformation.billing_country" :options="countries" :placeholder="$t('admin_settings.billings.country_plac')" :isError="errors[0]"/>
|
||||
<SelectInput @input="$updateText('/admin/settings', 'billing_country', billingInformation.billing_country)" v-model="billingInformation.billing_country" :default="billingInformation.billing_country" :options="countries" :placeholder="$t('admin_settings.billings.country_plac')" :isError="errors[0]"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -41,7 +41,7 @@
|
||||
<label>{{ $t('admin_settings.billings.address') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Billing Address"
|
||||
rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'billing_address', billingInformation.billing_address)" v-model="billingInformation.billing_address" :placeholder="$t('admin_settings.billings.address_plac')"
|
||||
<input @input="$updateText('/admin/settings', 'billing_address', billingInformation.billing_address)" v-model="billingInformation.billing_address" :placeholder="$t('admin_settings.billings.address_plac')"
|
||||
type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
@@ -52,7 +52,7 @@
|
||||
<label>{{ $t('admin_settings.billings.city') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Billing City"
|
||||
rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'billing_city', billingInformation.billing_city)" v-model="billingInformation.billing_city" :placeholder="$t('admin_settings.billings.city_plac')"
|
||||
<input @input="$updateText('/admin/settings', 'billing_city', billingInformation.billing_city)" v-model="billingInformation.billing_city" :placeholder="$t('admin_settings.billings.city_plac')"
|
||||
type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
@@ -61,7 +61,7 @@
|
||||
<label>{{ $t('admin_settings.billings.postal_code') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Billing Postal Code"
|
||||
rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'billing_postal_code', billingInformation.billing_postal_code)" v-model="billingInformation.billing_postal_code"
|
||||
<input @input="$updateText('/admin/settings', 'billing_postal_code', billingInformation.billing_postal_code)" v-model="billingInformation.billing_postal_code"
|
||||
:placeholder="$t('admin_settings.billings.postal_code_plac')" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
@@ -72,7 +72,7 @@
|
||||
<label>{{ $t('admin_settings.billings.state') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Billing State"
|
||||
rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'billing_state', billingInformation.billing_state)" v-model="billingInformation.billing_state" :placeholder="$t('admin_settings.billings.state_plac')"
|
||||
<input @input="$updateText('/admin/settings', 'billing_state', billingInformation.billing_state)" v-model="billingInformation.billing_state" :placeholder="$t('admin_settings.billings.state_plac')"
|
||||
type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
@@ -82,7 +82,7 @@
|
||||
<label>{{ $t('admin_settings.billings.phone_number') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Billing Phone Number"
|
||||
v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'billing_phone_number', billingInformation.billing_phone_number)" v-model="billingInformation.billing_phone_number" :placeholder="$t('admin_settings.billings.phone_number_plac')"
|
||||
<input @input="$updateText('/admin/settings', 'billing_phone_number', billingInformation.billing_phone_number)" v-model="billingInformation.billing_phone_number" :placeholder="$t('admin_settings.billings.phone_number_plac')"
|
||||
type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
@@ -133,7 +133,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
axios.get('/api/settings', {
|
||||
axios.get('/api/admin/settings', {
|
||||
params: {
|
||||
column: 'billing_phone_number|billing_postal_code|billing_vat_number|billing_address|billing_country|billing_state|billing_city|billing_name'
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
// Send request to get verify account
|
||||
axios
|
||||
.post('/api/settings/email', this.mail)
|
||||
.post('/api/admin/settings/email', this.mail)
|
||||
.then(() => {
|
||||
|
||||
events.$emit('toaster', {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
When this is turned on, your visitors can visit your default homepage.
|
||||
</small>
|
||||
</div>
|
||||
<SwitchInput @input="$updateText('/settings', 'allow_homepage', app.allow_homepage)" v-model="app.allow_homepage" class="switch" :state="app.allow_homepage"/>
|
||||
<SwitchInput @input="$updateText('/admin/settings', 'allow_homepage', app.allow_homepage)" v-model="app.allow_homepage" class="switch" :state="app.allow_homepage"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>Title:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Title" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'header_title', app.header_title)" v-model="app.header_title" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<input @input="$updateText('/admin/settings', 'header_title', app.header_title)" v-model="app.header_title" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -41,7 +41,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>Description:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Description" rules="required" v-slot="{ errors }">
|
||||
<textarea @input="$updateText('/settings', 'header_description', app.header_description)" rows="2" v-model="app.header_description" :class="{'is-error': errors[0]}"></textarea>
|
||||
<textarea @input="$updateText('/admin/settings', 'header_description', app.header_description)" rows="2" v-model="app.header_description" :class="{'is-error': errors[0]}"></textarea>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -59,7 +59,7 @@
|
||||
Show section:
|
||||
</label>
|
||||
</div>
|
||||
<SwitchInput @input="$updateText('/settings', 'section_features', app.section_features)" v-model="app.section_features" class="switch" :state="app.section_features"/>
|
||||
<SwitchInput @input="$updateText('/admin/settings', 'section_features', app.section_features)" v-model="app.section_features" class="switch" :state="app.section_features"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -73,7 +73,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>Title:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Title" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'features_title', app.features_title)" v-model="app.features_title" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<input @input="$updateText('/admin/settings', 'features_title', app.features_title)" v-model="app.features_title" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -81,7 +81,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>Description:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Description" rules="required" v-slot="{ errors }">
|
||||
<textarea @input="$updateText('/settings', 'features_description', app.features_description)" rows="2" v-model="app.features_description" :class="{'is-error': errors[0]}"></textarea>
|
||||
<textarea @input="$updateText('/admin/settings', 'features_description', app.features_description)" rows="2" v-model="app.features_description" :class="{'is-error': errors[0]}"></textarea>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -100,7 +100,7 @@
|
||||
Show section:
|
||||
</label>
|
||||
</div>
|
||||
<SwitchInput @input="$updateText('/settings', 'section_feature_boxes', app.section_feature_boxes)" v-model="app.section_feature_boxes" class="switch" :state="app.section_feature_boxes"/>
|
||||
<SwitchInput @input="$updateText('/admin/settings', 'section_feature_boxes', app.section_feature_boxes)" v-model="app.section_feature_boxes" class="switch" :state="app.section_feature_boxes"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -112,42 +112,42 @@
|
||||
<div class="block-wrapper">
|
||||
<label>First Box Title:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Feature Title 1" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'feature_title_1', app.feature_title_1)" v-model="app.feature_title_1" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<input @input="$updateText('/admin/settings', 'feature_title_1', app.feature_title_1)" v-model="app.feature_title_1" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
<div class="block-wrapper">
|
||||
<label>First Box Description:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Feature Description 1" rules="required" v-slot="{ errors }">
|
||||
<textarea @input="$updateText('/settings', 'feature_description_1', app.feature_description_1)" rows="2" v-model="app.feature_description_1" :class="{'is-error': errors[0]}"></textarea>
|
||||
<textarea @input="$updateText('/admin/settings', 'feature_description_1', app.feature_description_1)" rows="2" v-model="app.feature_description_1" :class="{'is-error': errors[0]}"></textarea>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
<div class="block-wrapper">
|
||||
<label>Second Box Title:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Feature Title 2" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'feature_title_2', app.feature_title_2)" v-model="app.feature_title_2" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<input @input="$updateText('/admin/settings', 'feature_title_2', app.feature_title_2)" v-model="app.feature_title_2" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
<div class="block-wrapper">
|
||||
<label>Second Box Description:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Feature Description 2" rules="required" v-slot="{ errors }">
|
||||
<textarea @input="$updateText('/settings', 'feature_description_2', app.feature_description_2)" rows="2" v-model="app.feature_description_2" :class="{'is-error': errors[0]}"></textarea>
|
||||
<textarea @input="$updateText('/admin/settings', 'feature_description_2', app.feature_description_2)" rows="2" v-model="app.feature_description_2" :class="{'is-error': errors[0]}"></textarea>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
<div class="block-wrapper">
|
||||
<label>Third Box Title:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Feature Title 3" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'feature_title_3', app.feature_title_3)" v-model="app.feature_title_3" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<input @input="$updateText('/admin/settings', 'feature_title_3', app.feature_title_3)" v-model="app.feature_title_3" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
<div class="block-wrapper">
|
||||
<label>Third Box Description:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Feature Description 3" rules="required" v-slot="{ errors }">
|
||||
<textarea @input="$updateText('/settings', 'feature_description_3', app.feature_description_3)" rows="2" v-model="app.feature_description_3" :class="{'is-error': errors[0]}"></textarea>
|
||||
<textarea @input="$updateText('/admin/settings', 'feature_description_3', app.feature_description_3)" rows="2" v-model="app.feature_description_3" :class="{'is-error': errors[0]}"></textarea>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -166,7 +166,7 @@
|
||||
Show section:
|
||||
</label>
|
||||
</div>
|
||||
<SwitchInput @input="$updateText('/settings', 'section_pricing_content', app.section_pricing_content)" v-model="app.section_pricing_content" class="switch" :state="app.section_pricing_content"/>
|
||||
<SwitchInput @input="$updateText('/admin/settings', 'section_pricing_content', app.section_pricing_content)" v-model="app.section_pricing_content" class="switch" :state="app.section_pricing_content"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -178,7 +178,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>Title:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Title" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'pricing_title', app.pricing_title)" v-model="app.pricing_title" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<input @input="$updateText('/admin/settings', 'pricing_title', app.pricing_title)" v-model="app.pricing_title" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -186,7 +186,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>Description:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Description" rules="required" v-slot="{ errors }">
|
||||
<textarea @input="$updateText('/settings', 'pricing_description', app.pricing_description)" rows="2" v-model="app.pricing_description" :class="{'is-error': errors[0]}"></textarea>
|
||||
<textarea @input="$updateText('/admin/settings', 'pricing_description', app.pricing_description)" rows="2" v-model="app.pricing_description" :class="{'is-error': errors[0]}"></textarea>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -205,7 +205,7 @@
|
||||
Show section:
|
||||
</label>
|
||||
</div>
|
||||
<SwitchInput @input="$updateText('/settings', 'section_get_started', app.section_get_started)" v-model="app.section_get_started" class="switch" :state="app.section_get_started"/>
|
||||
<SwitchInput @input="$updateText('/admin/settings', 'section_get_started', app.section_get_started)" v-model="app.section_get_started" class="switch" :state="app.section_get_started"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -218,7 +218,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>Title:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Title" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'get_started_title', app.get_started_title)" v-model="app.get_started_title" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<input @input="$updateText('/admin/settings', 'get_started_title', app.get_started_title)" v-model="app.get_started_title" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -226,7 +226,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>Description:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Description" rules="required" v-slot="{ errors }">
|
||||
<textarea @input="$updateText('/settings', 'get_started_description', app.get_started_description)" rows="2" v-model="app.get_started_description" :class="{'is-error': errors[0]}"></textarea>
|
||||
<textarea @input="$updateText('/admin/settings', 'get_started_description', app.get_started_description)" rows="2" v-model="app.get_started_description" :class="{'is-error': errors[0]}"></textarea>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -240,7 +240,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>Footer content:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Title" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'footer_content', app.footer_content)" v-model="app.footer_content" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<input @input="$updateText('/admin/settings', 'footer_content', app.footer_content)" v-model="app.footer_content" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -293,7 +293,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
axios.get('/api/settings', {
|
||||
axios.get('/api/admin/settings', {
|
||||
params: {
|
||||
column: 'allow_homepage|footer_content|get_started_description|get_started_title|pricing_description|pricing_title|feature_description_3|feature_title_3|feature_description_2|feature_title_2|feature_description_1|feature_title_1|features_description|features_title|header_description|header_title|section_get_started|section_pricing_content|section_feature_boxes|section_features'
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<small class="input-help" v-html="$t('admin_settings.others.storage_limit_help')"></small>
|
||||
</div>
|
||||
<SwitchInput
|
||||
@input="$updateText('/settings', 'storage_limitation', app.storageLimitation)"
|
||||
@input="$updateText('/admin/settings', 'storage_limitation', app.storageLimitation)"
|
||||
v-model="app.storageLimitation"
|
||||
class="switch"
|
||||
:state="app.storageLimitation"
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="block-wrapper" v-if="app.storageLimitation">
|
||||
<label>{{ $t('admin_settings.others.default_storage') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Default Storage Space" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'storage_default', app.defaultStorage)"
|
||||
<input @input="$updateText('/admin/settings', 'storage_default', app.defaultStorage)"
|
||||
v-model="app.defaultStorage"
|
||||
min="1"
|
||||
max="999999999"
|
||||
@@ -48,7 +48,7 @@
|
||||
</label>
|
||||
<small class="input-help" v-html="$t('admin_settings.others.allow_registration_help')"></small>
|
||||
</div>
|
||||
<SwitchInput @input="$updateText('/settings', 'registration', app.userRegistration)"
|
||||
<SwitchInput @input="$updateText('/admin/settings', 'registration', app.userRegistration)"
|
||||
v-model="app.userRegistration"
|
||||
class="switch"
|
||||
:state="app.userRegistration"
|
||||
@@ -64,7 +64,7 @@
|
||||
<label>{{ $t('admin_settings.others.contact_email') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Contact Email"
|
||||
rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'contact_email', app.contactMail)" v-model="app.contactMail"
|
||||
<input @input="$updateText('/admin/settings', 'contact_email', app.contactMail)" v-model="app.contactMail"
|
||||
:placeholder="$t('admin_settings.others.contact_email_plac')" type="email" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
@@ -73,7 +73,7 @@
|
||||
<label>{{ $t('admin_settings.others.google_analytics') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Google Analytics Code"
|
||||
v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'google_analytics', app.googleAnalytics)" v-model="app.googleAnalytics"
|
||||
<input @input="$updateText('/admin/settings', 'google_analytics', app.googleAnalytics)" v-model="app.googleAnalytics"
|
||||
:placeholder="$t('admin_settings.others.google_analytics_plac')"
|
||||
type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
@@ -83,7 +83,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('admin_settings.others.mimetypes_blacklist') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Mimetypes Blacklist" v-slot="{ errors }">
|
||||
<textarea rows="2" @input="$updateText('/settings', 'mimetypes_blacklist', app.mimetypesBlacklist)" v-model="app.mimetypesBlacklist" :placeholder="$t('admin_settings.others.mimetypes_blacklist_plac')" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<textarea rows="2" @input="$updateText('/admin/settings', 'mimetypes_blacklist', app.mimetypesBlacklist)" v-model="app.mimetypesBlacklist" :placeholder="$t('admin_settings.others.mimetypes_blacklist_plac')" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
<small class="input-help" v-html="$t('admin_settings.others.mimetypes_blacklist_help')"></small>
|
||||
@@ -92,7 +92,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('admin_settings.others.upload_limit') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Upload Limit" v-slot="{ errors }">
|
||||
<input @input="$updateText('/settings', 'upload_limit', app.uploadLimit)" v-model="app.uploadLimit" :placeholder="$t('admin_settings.others.upload_limit_plac')" type="number" min="0" step="1" :class="{'is-error': errors[0]}"/>
|
||||
<input @input="$updateText('/admin/settings', 'upload_limit', app.uploadLimit)" v-model="app.uploadLimit" :placeholder="$t('admin_settings.others.upload_limit_plac')" type="number" min="0" step="1" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
<small class="input-help" v-html="$t('admin_settings.others.upload_limit_help')"></small>
|
||||
@@ -157,7 +157,7 @@
|
||||
|
||||
this.isFlushingCache = true
|
||||
|
||||
axios.get('/api/settings/flush-cache')
|
||||
axios.get('/api/admin/settings/flush-cache')
|
||||
.then(() => {
|
||||
events.$emit('toaster', {
|
||||
type: 'success',
|
||||
@@ -170,7 +170,7 @@
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
axios.get('/api/settings', {
|
||||
axios.get('/api/admin/settings', {
|
||||
params: {
|
||||
column: 'contact_email|google_analytics|storage_default|registration|storage_limitation|mimetypes_blacklist|upload_limit'
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="switch-label">
|
||||
<label class="input-label">{{ $t('admin_settings.payments.allow_payments') }}:</label>
|
||||
</div>
|
||||
<SwitchInput @input="$updateText('/settings', 'payments_active', payments.status)" v-model="payments.status" class="switch" :state="payments.status"/>
|
||||
<SwitchInput @input="$updateText('/admin/settings', 'payments_active', payments.status)" v-model="payments.status" class="switch" :state="payments.status"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
// Send request to get verify account
|
||||
axios
|
||||
.post('/api/settings/stripe', this.stripeCredentials)
|
||||
.post('/api/admin/settings/stripe', this.stripeCredentials)
|
||||
.then(() => {
|
||||
|
||||
// Store Stripe Public
|
||||
@@ -192,7 +192,7 @@
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
axios.get('/api/settings', {
|
||||
axios.get('/api/admin/settings', {
|
||||
params: {
|
||||
column: 'payments_active|payments_configured'
|
||||
}
|
||||
|
||||
@@ -128,11 +128,11 @@
|
||||
},
|
||||
methods: {
|
||||
changeStatus(val, id) {
|
||||
this.$updateText('/plans/' + id + '/update', 'is_active', val)
|
||||
this.$updateText('/admin/plans/' + id + '/update', 'is_active', val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
axios.get('/api/dashboard')
|
||||
axios.get('/api/admin/dashboard')
|
||||
.then(response => {
|
||||
this.data = response.data
|
||||
})
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<PageHeader :title="$router.currentRoute.meta.title"/>
|
||||
|
||||
<div class="content-page" v-if="config.stripe_public_key">
|
||||
<DatatableWrapper @data="invoices = $event" @init="isLoading = false" api="/api/invoices" :paginator="false" :columns="columns" class="table">
|
||||
<DatatableWrapper @data="invoices = $event" @init="isLoading = false" api="/api/admin/invoices" :paginator="false" :columns="columns" class="table">
|
||||
<template slot-scope="{ row }">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<PageHeader :title="$router.currentRoute.meta.title"/>
|
||||
|
||||
<div class="content-page">
|
||||
<DatatableWrapper @init="isLoading = false" api="/api/pages" :paginator="false" :columns="columns" class="table table-users">
|
||||
<DatatableWrapper @init="isLoading = false" api="/api/admin/pages" :paginator="false" :columns="columns" class="table table-users">
|
||||
<template slot-scope="{ row }">
|
||||
<tr>
|
||||
<td class="name" style="min-width: 200px">
|
||||
@@ -26,7 +26,7 @@
|
||||
<td>
|
||||
<div class="action-icons">
|
||||
<router-link :to="{name: 'PageEdit', params: {slug: row.data.attributes.slug}}">
|
||||
<edit-2-icon size="15" class="icon icon-edit"></edit-2-icon>
|
||||
<Edit2Icon size="15" class="icon icon-edit" />
|
||||
</router-link>
|
||||
</div>
|
||||
</td>
|
||||
@@ -100,7 +100,7 @@
|
||||
},
|
||||
methods: {
|
||||
changeStatus(val, slug) {
|
||||
this.$updateText('/pages/' + slug, 'visibility', val)
|
||||
this.$updateText('/admin/pages/' + slug, 'visibility', val)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('admin_pages.form.title') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Name" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/pages/' + $route.params.slug, 'title', page.data.attributes.title)" v-model="page.data.attributes.title"
|
||||
<input @input="$updateText('/admin/pages/' + $route.params.slug, 'title', page.data.attributes.title)" v-model="page.data.attributes.title"
|
||||
:placeholder="$t('admin_pages.form.title_plac')" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
@@ -43,7 +43,7 @@
|
||||
<label>{{ $t('admin_pages.form.content') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Name" rules="required" v-slot="{ errors }">
|
||||
<textarea
|
||||
@input="$updateText('/pages/' + $route.params.slug, 'content', page.data.attributes.content)"
|
||||
@input="$updateText('/admin/pages/' + $route.params.slug, 'content', page.data.attributes.content)"
|
||||
v-model="page.data.attributes.content"
|
||||
:placeholder="$t('admin_pages.form.content_plac')"
|
||||
:class="{'is-error': errors[0]}"
|
||||
@@ -96,11 +96,11 @@
|
||||
},
|
||||
methods: {
|
||||
changeStatus(val) {
|
||||
this.$updateText('/pages/' + this.$route.params.slug , 'visibility', val)
|
||||
this.$updateText('/admin/pages/' + this.$route.params.slug , 'visibility', val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
axios.get('/api/pages/' + this.$route.params.slug)
|
||||
axios.get('/api/admin/pages/' + this.$route.params.slug)
|
||||
.then(response => {
|
||||
this.page = response.data
|
||||
this.isLoading = false
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<DatatableWrapper @data="plans = $event" @init="isLoading = false" api="/api/plans" :paginator="false" :columns="columns" class="table table-users">
|
||||
<DatatableWrapper @data="plans = $event" @init="isLoading = false" api="/api/admin/plans" :paginator="false" :columns="columns" class="table table-users">
|
||||
<template slot-scope="{ row }">
|
||||
<tr>
|
||||
<td style="max-width: 80px">
|
||||
@@ -177,7 +177,7 @@
|
||||
},
|
||||
methods: {
|
||||
changeStatus(val, id) {
|
||||
this.$updateText('/plans/' + id, 'is_active', val)
|
||||
this.$updateText('/admin/plans/' + id, 'is_active', val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
axios.get('/api/plans/' + this.$route.params.id)
|
||||
axios.get('/api/admin/plans/' + this.$route.params.id)
|
||||
.then(response => {
|
||||
this.plan = response.data.data
|
||||
this.isLoading = false
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
// Send request to get user token
|
||||
axios
|
||||
.post('/api/plans', {
|
||||
.post('/api/admin/plans', {
|
||||
attributes: this.plan
|
||||
})
|
||||
.then(response => {
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
this.isSendingRequest = true
|
||||
|
||||
axios
|
||||
.post(this.$store.getters.api + '/plans/' + this.$route.params.id,
|
||||
.post(this.$store.getters.api + '/admin/plans/' + this.$route.params.id,
|
||||
{
|
||||
data: {
|
||||
name: this.planName
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('admin_page_plans.form.name') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Name" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/plans/' + $route.params.id, 'name', plan.attributes.name)" v-model="plan.attributes.name" :placeholder="$t('admin_page_plans.form.name_plac')" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<input @input="$updateText('/admin/plans/' + $route.params.id, 'name', plan.attributes.name)" v-model="plan.attributes.name" :placeholder="$t('admin_page_plans.form.name_plac')" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('admin_page_plans.form.description') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Description" v-slot="{ errors }">
|
||||
<textarea @input="$updateText('/plans/' + $route.params.id, 'description', plan.attributes.description)" v-model="plan.attributes.description" :placeholder="$t('admin_page_plans.form.description_plac')" :class="{'is-error': errors[0]}"></textarea>
|
||||
<textarea @input="$updateText('/admin/plans/' + $route.params.id, 'description', plan.attributes.description)" v-model="plan.attributes.description" :placeholder="$t('admin_page_plans.form.description_plac')" :class="{'is-error': errors[0]}"></textarea>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
@@ -41,7 +41,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('admin_page_plans.form.storage') }}:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Storage capacity" rules="required" v-slot="{ errors }">
|
||||
<input @input="$updateText('/plans/' + $route.params.id, 'capacity', plan.attributes.capacity)" v-model="plan.attributes.capacity" :placeholder="$t('admin_page_plans.form.storage_plac')" type="number" min="1" max="999999999" :class="{'is-error': errors[0]}"/>
|
||||
<input @input="$updateText('/admin/plans/' + $route.params.id, 'capacity', plan.attributes.capacity)" v-model="plan.attributes.capacity" :placeholder="$t('admin_page_plans.form.storage_plac')" type="number" min="1" max="999999999" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
<small class="input-help">
|
||||
@@ -97,7 +97,7 @@
|
||||
},
|
||||
methods: {
|
||||
changeStatus(val) {
|
||||
this.$updateText('/plans/' + this.$route.params.id, 'is_active', val)
|
||||
this.$updateText('/admin/plans/' + this.$route.params.id, 'is_active', val)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<PageTab :is-loading="isLoading">
|
||||
<PageTabGroup>
|
||||
<DatatableWrapper @init="isLoading = false" :api="'/api/plans/' + this.$route.params.id + '/subscribers'" :paginator="false" :columns="columns" :data="subscribers" class="table">
|
||||
<DatatableWrapper @init="isLoading = false" :api="'/api/admin/plans/' + this.$route.params.id + '/subscribers'" :paginator="false" :columns="columns" :data="subscribers" class="table">
|
||||
|
||||
<!--Table data content-->
|
||||
<template slot-scope="{ row }">
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
</div>
|
||||
|
||||
<!--Datatable-->
|
||||
<DatatableWrapper @init="isLoading = false" api="/api/users" :paginator="true" :columns="columns" class="table table-users">
|
||||
<DatatableWrapper @init="isLoading = false" api="/api/admin/users" :paginator="true" :columns="columns" class="table table-users">
|
||||
<template slot-scope="{ row }">
|
||||
<tr>
|
||||
<td style="min-width: 320px">
|
||||
<router-link :to="{name: 'UserDetail', params: {id: row.data.id}}">
|
||||
<DatatableCellImage
|
||||
:image="row.data.attributes.avatar"
|
||||
:title="row.data.attributes.name"
|
||||
:image="row.data.relationships.settings.data.attributes.avatar"
|
||||
:title="row.data.relationships.settings.data.attributes.name"
|
||||
:description="row.data.attributes.email"
|
||||
/>
|
||||
</router-link>
|
||||
@@ -45,12 +45,12 @@
|
||||
</td>
|
||||
<td>
|
||||
<span class="cell-item">
|
||||
{{ row.relationships.storage.data.attributes.used_formatted }}
|
||||
{{ row.data.attributes.storage.used_formatted }}
|
||||
</span>
|
||||
</td>
|
||||
<td v-if="config.storageLimit">
|
||||
<span class="cell-item">
|
||||
{{ row.relationships.storage.data.attributes.capacity_formatted }}
|
||||
{{ row.data.attributes.storage.capacity_formatted }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
@@ -61,10 +61,10 @@
|
||||
<td>
|
||||
<div class="action-icons">
|
||||
<router-link :to="{name: 'UserDetail', params: {id: row.data.id}}">
|
||||
<edit-2-icon size="15" class="icon icon-edit"></edit-2-icon>
|
||||
<Edit2Icon size="15" class="icon icon-edit" />
|
||||
</router-link>
|
||||
<router-link :to="{name: 'UserDelete', params: {id: row.data.id}}">
|
||||
<trash2-icon size="15" class="icon icon-trash"></trash2-icon>
|
||||
<Trash2Icon size="15" class="icon icon-trash" />
|
||||
</router-link>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
<!--User thumbnail-->
|
||||
<div class="user-thumbnail">
|
||||
<div class="avatar">
|
||||
<img :src="user.data.attributes.avatar" :alt="user.data.attributes.name">
|
||||
<img :src="user.data.relationships.settings.data.attributes.avatar" :alt="user.data.relationships.settings.data.attributes.name">
|
||||
<!--<img :src="user.data.attributes.avatar" :alt="user.data.attributes.name" class="blurred">-->
|
||||
</div>
|
||||
<div class="info">
|
||||
<b class="name">
|
||||
{{ user.data.attributes.name }}
|
||||
{{ user.data.relationships.settings.data.attributes.name }}
|
||||
<ColorLabel color="purple">
|
||||
{{ user.data.attributes.role }}
|
||||
</ColorLabel>
|
||||
@@ -69,7 +69,7 @@
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
<router-link replace :to="{name: 'UserDelete'}" v-if="user.data.attributes.name !== admin.name"
|
||||
<router-link replace :to="{name: 'UserDelete'}" v-if="user.data.relationships.settings.data.attributes.name !== admin.name"
|
||||
class="menu-list-item link">
|
||||
<div class="icon">
|
||||
<trash2-icon size="17"></trash2-icon>
|
||||
@@ -104,9 +104,9 @@
|
||||
export default {
|
||||
name: 'Profile',
|
||||
components: {
|
||||
StorageItemDetail,
|
||||
CreditCardIcon,
|
||||
HardDriveIcon,
|
||||
StorageItemDetail,
|
||||
SectionTitle,
|
||||
FileTextIcon,
|
||||
MobileHeader,
|
||||
@@ -118,10 +118,10 @@
|
||||
Spinner,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['config']),
|
||||
admin() {
|
||||
return this.$store.getters.user ? this.$store.getters.user.data.attributes : undefined
|
||||
},
|
||||
...mapGetters(['config']),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -131,7 +131,7 @@
|
||||
},
|
||||
methods: {
|
||||
fetchUser() {
|
||||
axios.get('/api/users/' + this.$route.params.id + '/detail')
|
||||
axios.get('/api/admin/users/' + this.$route.params.id + '/detail')
|
||||
.then(response => {
|
||||
this.user = response.data
|
||||
this.isLoading = false
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
// Send request to get user token
|
||||
axios
|
||||
.post('/api/users/create', formData, {
|
||||
.post('/api/admin/users/create', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<p>{{ $t('user_box_delete.description') }}</p>
|
||||
</InfoBox>
|
||||
<ValidationObserver ref="deleteUser" @submit.prevent="deleteUser" v-slot="{ invalid }" tag="form" class="form block-form">
|
||||
<ValidationProvider tag="div" class="block-wrapper" v-slot="{ errors }" mode="passive" name="User name" :rules="'required|is:' + user.data.attributes.name">
|
||||
<label>{{ $t('admin_page_user.label_delete_user', {user: user.data.attributes.name}) }}:</label>
|
||||
<ValidationProvider tag="div" class="block-wrapper" v-slot="{ errors }" mode="passive" name="User name" :rules="'required|is:' + user.data.relationships.settings.data.attributes.name">
|
||||
<label>{{ $t('admin_page_user.label_delete_user', {user: user.data.relationships.settings.data.attributes.name}) }}:</label>
|
||||
<div class="single-line-form">
|
||||
<input v-model="userName"
|
||||
:placeholder="$t('admin_page_user.placeholder_delete_user')"
|
||||
@@ -73,11 +73,9 @@
|
||||
this.isSendingRequest = true
|
||||
|
||||
axios
|
||||
.post(this.$store.getters.api + '/users/' + this.$route.params.id + '/delete',
|
||||
.post(this.$store.getters.api + '/admin/users/' + this.$route.params.id + '/delete',
|
||||
{
|
||||
data: {
|
||||
name: this.userName
|
||||
},
|
||||
name: this.userName,
|
||||
_method: 'delete'
|
||||
}
|
||||
)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('page_registration.label_name') }}</label>
|
||||
<div class="input-wrapper">
|
||||
<input :value="user.data.attributes.name"
|
||||
<input :value="user.data.relationships.settings.data.attributes.name"
|
||||
:placeholder="$t('page_registration.placeholder_name')"
|
||||
type="text"
|
||||
disabled
|
||||
@@ -66,7 +66,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.name') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input :value="user.relationships.settings.data.attributes.billing_name"
|
||||
<input :value="user.data.relationships.settings.data.attributes.name"
|
||||
type="text"
|
||||
disabled
|
||||
/>
|
||||
@@ -75,7 +75,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.address') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input :value="user.relationships.settings.data.attributes.billing_address"
|
||||
<input :value="user.data.relationships.settings.data.attributes.address"
|
||||
type="text"
|
||||
disabled
|
||||
/>
|
||||
@@ -84,7 +84,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.country') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input :value="user.relationships.settings.data.attributes.billing_country"
|
||||
<input :value="user.data.relationships.settings.data.attributes.country"
|
||||
type="text"
|
||||
disabled
|
||||
/>
|
||||
@@ -94,7 +94,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.city') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input :value="user.relationships.settings.data.attributes.billing_city"
|
||||
<input :value="user.data.relationships.settings.data.attributes.city"
|
||||
type="text"
|
||||
disabled
|
||||
/>
|
||||
@@ -103,7 +103,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.postal_code') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input :value="user.relationships.settings.data.attributes.billing_postal_code"
|
||||
<input :value="user.data.relationships.settings.data.attributes.postal_code"
|
||||
type="text"
|
||||
disabled
|
||||
/>
|
||||
@@ -113,7 +113,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.state') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input :value="user.relationships.settings.data.attributes.billing_state"
|
||||
<input :value="user.data.relationships.settings.data.attributes.state"
|
||||
type="text"
|
||||
disabled
|
||||
/>
|
||||
@@ -122,7 +122,7 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.phone_number') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input :value="user.relationships.settings.data.attributes.billing_phone_number"
|
||||
<input :value="user.data.relationships.settings.data.attributes.phone_number"
|
||||
type="text"
|
||||
disabled
|
||||
/>
|
||||
@@ -188,7 +188,7 @@
|
||||
|
||||
// Send request to get user reset link
|
||||
axios
|
||||
.post(this.$store.getters.api + '/users/' + this.$route.params.id + '/role', {
|
||||
.post(this.$store.getters.api + '/admin/users/' + this.$route.params.id + '/role', {
|
||||
attributes: {
|
||||
role: this.userRole,
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PageTabGroup>
|
||||
<DatatableWrapper
|
||||
@init="isLoading = false"
|
||||
:api="'/api/users/' + this.$route.params.id + '/invoices'"
|
||||
:api="'/api/admin/users/' + this.$route.params.id + '/invoices'"
|
||||
:paginator="false"
|
||||
:columns="columns"
|
||||
class="table"
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
this.isSendingRequest = true
|
||||
|
||||
axios
|
||||
.post(this.$store.getters.api + '/users/' + this.$route.params.id + '/reset-password',
|
||||
.post(this.$store.getters.api + '/admin/users/' + this.$route.params.id + '/reset-password',
|
||||
{}
|
||||
)
|
||||
.then(() => {
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
// Send request to get user reset link
|
||||
axios
|
||||
.post(this.$store.getters.api + '/users/' + this.$route.params.id + '/capacity', {
|
||||
.post(this.$store.getters.api + '/admin/users/' + this.$route.params.id + '/capacity', {
|
||||
attributes: {
|
||||
storage_capacity: this.capacity
|
||||
},
|
||||
@@ -139,7 +139,7 @@
|
||||
})
|
||||
},
|
||||
getStorageDetails() {
|
||||
axios.get('/api/users/' + this.$route.params.id + '/storage')
|
||||
axios.get('/api/admin/users/' + this.$route.params.id + '/storage')
|
||||
.then(response => {
|
||||
this.storage = response.data.data
|
||||
this.isLoading = false
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
axios.get('/api/users/' + this.$route.params.id + '/subscription')
|
||||
axios.get('/api/admin/users/' + this.$route.params.id + '/subscription')
|
||||
.then(response => {
|
||||
this.subscription = response.data.data
|
||||
this.isLoading = false
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
</ContentGroup>
|
||||
</ContentSidebar>
|
||||
|
||||
|
||||
<ContentFileView/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -78,12 +78,12 @@
|
||||
<div class="avatar">
|
||||
<UserImageInput
|
||||
v-model="avatar"
|
||||
:avatar="user.data.attributes.avatar"
|
||||
:avatar="user.data.relationships.settings.data.attributes.avatar"
|
||||
/>
|
||||
</div>
|
||||
<div class="info">
|
||||
<b class="name">
|
||||
{{ user.data.attributes.name }}
|
||||
{{ user.data.relationships.settings.data.attributes.name }}
|
||||
<ColorLabel v-if="config.isSaaS" :color="subscriptionColor">
|
||||
{{ subscriptionStatus }}
|
||||
</ColorLabel>
|
||||
@@ -175,7 +175,7 @@
|
||||
return this.config.isSaaS && this.config.app_payments_active
|
||||
},
|
||||
canShowUpgradeWarning() {
|
||||
return this.config.storageLimit && this.user.relationships.storage.data.attributes.used > 95
|
||||
return this.config.storageLimit && this.user.data.attributes.used > 95
|
||||
},
|
||||
canShowIncompletePayment() {
|
||||
return this.user.data.attributes.incomplete_payment
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
...mapGetters(['config']),
|
||||
},
|
||||
mounted() {
|
||||
if (this.config.installation === 'setup-done' || this.config.installation === 'quiet-update')
|
||||
if (this.config.installation === 'setup-done')
|
||||
this.$router.push({name: 'SignIn'})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<span class="empty-note navigator" v-if="navigationTree.length == 0">
|
||||
{{ $t('sidebar.folders_empty') }}
|
||||
</span>
|
||||
<TreeMenuNavigator class="folder-tree" :depth="0" :nodes="items" v-for="items in navigationTree" :key="items.unique_id"/>
|
||||
<TreeMenuNavigator class="folder-tree" :depth="0" :nodes="items" v-for="items in navigationTree" :key="items.id"/>
|
||||
</ContentGroup>
|
||||
</ContentSidebar>
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
if (this.sharedDetail.type === 'folder') {
|
||||
|
||||
this.homeDirectory = {
|
||||
unique_id: this.sharedDetail.item_id,
|
||||
id: this.sharedDetail.item_id,
|
||||
name: this.$t('locations.home'),
|
||||
location: 'public',
|
||||
}
|
||||
|
||||
@@ -1,283 +0,0 @@
|
||||
<template>
|
||||
<AuthContentWrapper ref="auth">
|
||||
|
||||
<!--Database Credentials-->
|
||||
<AuthContent name="database-credentials" :visible="true">
|
||||
<div class="content-headline">
|
||||
<settings-icon size="40" class="title-icon"></settings-icon>
|
||||
<h1>Upgrade VueFileManager</h1>
|
||||
<h2>Please fill form bellow to upgrade VueFileManager.</h2>
|
||||
</div>
|
||||
|
||||
<ValidationObserver @submit.prevent="appSetupSubmit" ref="appSetup" v-slot="{ invalid }" tag="form"
|
||||
class="form block-form">
|
||||
<FormLabel>Set your License</FormLabel>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>Purchase Code:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Purchase code" rules="required" v-slot="{ errors }">
|
||||
<input v-model="app.purchase_code" placeholder="Paste your purchase code" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<a class="input-help" href="https://help.market.envato.com/hc/en-us/articles/202822600-Where-Is-My-Purchase-Code-" target="_blank">
|
||||
Where I can find purchase code?
|
||||
</a>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<FormLabel class="mt-70">General Settings</FormLabel>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>App Title:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Title" rules="required" v-slot="{ errors }">
|
||||
<input v-model="app.title" placeholder="Type your app title" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>App Description:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Description" rules="required" v-slot="{ errors }">
|
||||
<input v-model="app.description" placeholder="Type your app description" type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>App Logo (optional):</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Logo" v-slot="{ errors }">
|
||||
<ImageInput v-model="app.logo" :error="errors[0]"/>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>App Logo Horizontal (optional):</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Logo" v-slot="{ errors }">
|
||||
<ImageInput v-model="app.logo_horizontal" :error="errors[0]"/>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>App Favicon (optional):</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="App Favicon" v-slot="{ errors }">
|
||||
<ImageInput v-model="app.favicon" :error="errors[0]"/>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<FormLabel class="mt-70">Others Information</FormLabel>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>Contact Email:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Contact Email"
|
||||
rules="required" v-slot="{ errors }">
|
||||
<input v-model="app.contactMail" placeholder="Type your contact email" type="email" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<label>Google Analytics Code (optional):</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Google Analytics Code"
|
||||
v-slot="{ errors }">
|
||||
<input v-model="app.googleAnalytics" placeholder="Paste your Google Analytics Code"
|
||||
type="text" :class="{'is-error': errors[0]}"/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<div class="input-wrapper">
|
||||
<div class="inline-wrapper">
|
||||
<div class="switch-label">
|
||||
<label class="input-label">Storage Limitation:</label>
|
||||
<small class="input-help">If this value is off, all users will have infinity storage capacity and you won't be <br/>able to charge your users for storage plan.</small>
|
||||
</div>
|
||||
<SwitchInput v-model="app.storageLimitation" class="switch" :state="app.storageLimitation"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper" v-if="app.storageLimitation">
|
||||
<label>Default Storage Space for Accounts:</label>
|
||||
<ValidationProvider tag="div" mode="passive" class="input-wrapper" name="Default Storage Space" rules="required" v-slot="{ errors }">
|
||||
<input v-model="app.defaultStorage"
|
||||
min="1"
|
||||
max="999999999"
|
||||
placeholder="Set default storage space in GB"
|
||||
type="number"
|
||||
:class="{'is-error': errors[0]}"
|
||||
/>
|
||||
<span class="error-message" v-if="errors[0]">{{ errors[0] }}</span>
|
||||
</ValidationProvider>
|
||||
</div>
|
||||
|
||||
<div class="block-wrapper">
|
||||
<div class="input-wrapper">
|
||||
<div class="inline-wrapper">
|
||||
<div class="switch-label">
|
||||
<label class="input-label">Allow User Registration:</label>
|
||||
<small class="input-help">You can disable public registration for new users. You will still able to <br/>create new users in administration panel.</small>
|
||||
</div>
|
||||
<SwitchInput v-model="app.userRegistration" class="switch" :state="app.userRegistration"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="submit-wrapper">
|
||||
<AuthButton icon="chevron-right" text="Save and Upgrade" :loading="isLoading" :disabled="isLoading"/>
|
||||
</div>
|
||||
|
||||
</ValidationObserver>
|
||||
</AuthContent>
|
||||
</AuthContentWrapper>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {ValidationProvider, ValidationObserver} from 'vee-validate/dist/vee-validate.full'
|
||||
import AuthContentWrapper from '@/components/Auth/AuthContentWrapper'
|
||||
import SelectInput from '@/components/Others/Forms/SelectInput'
|
||||
import SwitchInput from '@/components/Others/Forms/SwitchInput'
|
||||
import ImageInput from '@/components/Others/Forms/ImageInput'
|
||||
import FormLabel from '@/components/Others/Forms/FormLabel'
|
||||
import InfoBox from '@/components/Others/Forms/InfoBox'
|
||||
import AuthContent from '@/components/Auth/AuthContent'
|
||||
import AuthButton from '@/components/Auth/AuthButton'
|
||||
import {SettingsIcon} from 'vue-feather-icons'
|
||||
import {required} from 'vee-validate/dist/rules'
|
||||
import {mapGetters} from 'vuex'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
name: 'EnvironmentSetup',
|
||||
components: {
|
||||
AuthContentWrapper,
|
||||
ValidationProvider,
|
||||
ValidationObserver,
|
||||
SettingsIcon,
|
||||
SelectInput,
|
||||
SwitchInput,
|
||||
AuthContent,
|
||||
ImageInput,
|
||||
AuthButton,
|
||||
FormLabel,
|
||||
required,
|
||||
InfoBox,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'config'
|
||||
]),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoading: false,
|
||||
app: {
|
||||
license: undefined,
|
||||
purchase_code: '',
|
||||
title: '',
|
||||
description: '',
|
||||
logo: undefined,
|
||||
logo_horizontal: undefined,
|
||||
favicon: undefined,
|
||||
contactMail: '',
|
||||
googleAnalytics: '',
|
||||
defaultStorage: '5',
|
||||
userRegistration: 1,
|
||||
storageLimitation: 1,
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
storeAppSetup() {
|
||||
// Create form
|
||||
let formData = new FormData()
|
||||
|
||||
// Add image to form
|
||||
formData.append('purchase_code', this.app.purchase_code)
|
||||
formData.append('license', this.app.license)
|
||||
formData.append('title', this.app.title)
|
||||
formData.append('description', this.app.description)
|
||||
formData.append('contactMail', this.app.contactMail)
|
||||
formData.append('userRegistration', Boolean(this.app.userRegistration) ? 1 : 0)
|
||||
formData.append('storageLimitation', Boolean(this.app.storageLimitation) ? 1 : 0)
|
||||
|
||||
if (this.app.googleAnalytics)
|
||||
formData.append('googleAnalytics', this.app.googleAnalytics)
|
||||
|
||||
if (this.app.defaultStorage)
|
||||
formData.append('defaultStorage', this.app.defaultStorage)
|
||||
|
||||
if (this.app.logo)
|
||||
formData.append('logo', this.app.logo)
|
||||
|
||||
if (this.app.logo_horizontal)
|
||||
formData.append('logo_horizontal', this.app.logo_horizontal)
|
||||
|
||||
if (this.app.favicon)
|
||||
formData.append('favicon', this.app.favicon)
|
||||
|
||||
// Send request to get verify account
|
||||
axios
|
||||
.post('/api/upgrade/app', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
|
||||
// End loading
|
||||
this.isLoading = false
|
||||
|
||||
// Redirect to next step
|
||||
this.$router.push({name: 'SignIn'})
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
// End loading
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
async appSetupSubmit() {
|
||||
|
||||
// Validate fields
|
||||
const isValid = await this.$refs.appSetup.validate();
|
||||
|
||||
if (!isValid) return;
|
||||
|
||||
// Start loading
|
||||
this.isLoading = true
|
||||
|
||||
// Send request to get verify account
|
||||
axios
|
||||
.post('/api/setup/purchase-code', {
|
||||
purchaseCode: this.app.purchase_code
|
||||
})
|
||||
.then(response => {
|
||||
|
||||
if (response.data === 'b6896a44017217c36f4a6fdc56699728') {
|
||||
this.app.license = 'Extended'
|
||||
this.$store.commit('SET_SAAS', true)
|
||||
} else {
|
||||
this.app.license = 'Regular'
|
||||
}
|
||||
|
||||
this.storeAppSetup()
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
if (error.response.status == 400) {
|
||||
// TODO: error message
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.isLoading = false
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '@assets/vue-file-manager/_forms';
|
||||
@import '@assets/vue-file-manager/_auth';
|
||||
@import '@assets/vue-file-manager/_setup_wizard';
|
||||
</style>
|
||||
@@ -32,9 +32,9 @@
|
||||
<div class="block-wrapper">
|
||||
<label>GMT:</label>
|
||||
<div class="input-wrapper">
|
||||
<SelectInput @input="$updateText('/user/relationships/settings', 'timezone', userTimezone)"
|
||||
v-model="userTimezone"
|
||||
:default="userTimezone"
|
||||
<SelectInput @input="$updateText('/user/relationships/settings', 'timezone', userInfo.timezone)"
|
||||
v-model="userInfo.timezone"
|
||||
:default="userInfo.timezone"
|
||||
:options="timezones"
|
||||
:placeholder="$t('user_settings.timezone_plac')"/>
|
||||
</div>
|
||||
@@ -48,8 +48,8 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.name') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input @keyup="$updateText('/user/relationships/settings', 'billing_name', billingInfo.billing_name)"
|
||||
v-model="billingInfo.billing_name"
|
||||
<input @keyup="$updateText('/user/relationships/settings', 'name', billingInfo.name)"
|
||||
v-model="billingInfo.name"
|
||||
:placeholder="$t('user_settings.name_plac')"
|
||||
type="text"
|
||||
/>
|
||||
@@ -58,8 +58,8 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.address') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input @keyup="$updateText('/user/relationships/settings', 'billing_address', billingInfo.billing_address)"
|
||||
v-model="billingInfo.billing_address"
|
||||
<input @keyup="$updateText('/user/relationships/settings', 'address', billingInfo.address)"
|
||||
v-model="billingInfo.address"
|
||||
:placeholder="$t('user_settings.address_plac')"
|
||||
type="text"
|
||||
/>
|
||||
@@ -69,8 +69,8 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.city') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input @keyup="$updateText('/user/relationships/settings', 'billing_city', billingInfo.billing_city)"
|
||||
v-model="billingInfo.billing_city"
|
||||
<input @keyup="$updateText('/user/relationships/settings', 'city', billingInfo.city)"
|
||||
v-model="billingInfo.city"
|
||||
:placeholder="$t('user_settings.city_plac')"
|
||||
type="text"
|
||||
/>
|
||||
@@ -79,8 +79,8 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.postal_code') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input @keyup="$updateText('/user/relationships/settings', 'billing_postal_code', billingInfo.billing_postal_code)"
|
||||
v-model="billingInfo.billing_postal_code"
|
||||
<input @keyup="$updateText('/user/relationships/settings', 'postal_code', billingInfo.postal_code)"
|
||||
v-model="billingInfo.postal_code"
|
||||
:placeholder="$t('user_settings.postal_code_plac')"
|
||||
type="text"
|
||||
/>
|
||||
@@ -90,9 +90,9 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.country') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<SelectInput @input="$updateText('/user/relationships/settings', 'billing_country', billingInfo.billing_country)"
|
||||
v-model="billingInfo.billing_country"
|
||||
:default="billingInfo.billing_country"
|
||||
<SelectInput @input="$updateText('/user/relationships/settings', 'country', billingInfo.country)"
|
||||
v-model="billingInfo.country"
|
||||
:default="billingInfo.country"
|
||||
:options="countries"
|
||||
:placeholder="$t('user_settings.country_plac')"/>
|
||||
</div>
|
||||
@@ -100,8 +100,8 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.state') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input @keyup="$updateText('/user/relationships/settings', 'billing_state', billingInfo.billing_state)"
|
||||
v-model="billingInfo.billing_state"
|
||||
<input @keyup="$updateText('/user/relationships/settings', 'state', billingInfo.state)"
|
||||
v-model="billingInfo.state"
|
||||
:placeholder="$t('user_settings.state_plac')"
|
||||
type="text"
|
||||
/>
|
||||
@@ -113,8 +113,8 @@
|
||||
<div class="block-wrapper">
|
||||
<label>{{ $t('user_settings.phone_number') }}:</label>
|
||||
<div class="input-wrapper">
|
||||
<input @keyup="$updateText('/user/relationships/settings', 'billing_phone_number', billingInfo.billing_phone_number)"
|
||||
v-model="billingInfo.billing_phone_number"
|
||||
<input @keyup="$updateText('/user/relationships/settings', 'phone_number', billingInfo.phone_number)"
|
||||
v-model="billingInfo.phone_number"
|
||||
:placeholder="$t('user_settings.phone_number_plac')"
|
||||
type="text"
|
||||
/>
|
||||
@@ -164,7 +164,6 @@
|
||||
return {
|
||||
userInfo: undefined,
|
||||
billingInfo: undefined,
|
||||
userTimezone: undefined,
|
||||
isLoading: false,
|
||||
}
|
||||
},
|
||||
@@ -176,21 +175,20 @@
|
||||
},
|
||||
created() {
|
||||
|
||||
this.userTimezone = this.user.relationships.timezone.data.attributes.timezone
|
||||
|
||||
this.userInfo = {
|
||||
name: this.user.data.attributes.name,
|
||||
timezone: this.user.data.relationships.settings.data.attributes.timezone,
|
||||
name: this.user.data.relationships.settings.data.attributes.name,
|
||||
email: this.user.data.attributes.email
|
||||
}
|
||||
|
||||
this.billingInfo = {
|
||||
billing_name: this.user.relationships.settings.data.attributes.billing_name,
|
||||
billing_address: this.user.relationships.settings.data.attributes.billing_address,
|
||||
billing_state: this.user.relationships.settings.data.attributes.billing_state,
|
||||
billing_city: this.user.relationships.settings.data.attributes.billing_city,
|
||||
billing_postal_code: this.user.relationships.settings.data.attributes.billing_postal_code,
|
||||
billing_country: this.user.relationships.settings.data.attributes.billing_country,
|
||||
billing_phone_number: this.user.relationships.settings.data.attributes.billing_phone_number,
|
||||
name: this.user.data.relationships.settings.data.attributes.name,
|
||||
address: this.user.data.relationships.settings.data.attributes.address,
|
||||
state: this.user.data.relationships.settings.data.attributes.state,
|
||||
city: this.user.data.relationships.settings.data.attributes.city,
|
||||
postal_code: this.user.data.relationships.settings.data.attributes.postal_code,
|
||||
country: this.user.data.relationships.settings.data.attributes.country,
|
||||
phone_number: this.user.data.relationships.settings.data.attributes.phone_number,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
name: 'Profile',
|
||||
name: 'Storage',
|
||||
components: {
|
||||
PageTabGroup,
|
||||
FormLabel,
|
||||
|
||||
@@ -67,6 +67,6 @@ Route::group(['middleware' => ['auth:sanctum']], function () {
|
||||
|
||||
Route::group(['prefix' => 'zip'], function () {
|
||||
Route::post('/files', [EditItemsController::class, 'zip_multiple_files']);
|
||||
Route::get('/folder/{unique_id}', [EditItemsController::class, 'zip_folder']);
|
||||
Route::get('/folder/{id}', [EditItemsController::class, 'zip_folder']);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -35,7 +35,7 @@ Route::group(['prefix' => 'browse'], function () {
|
||||
// Private sharing secured by password
|
||||
// TODO: tests
|
||||
Route::group(['middleware' => ['auth:api', 'auth.shared', 'scope:visitor,editor']], function () {
|
||||
Route::get('/folders/{unique_id}/private', [ServeSharedController::class, 'get_private_folders']);
|
||||
Route::get('/folders/{id}/private', [ServeSharedController::class, 'get_private_folders']);
|
||||
Route::get('/navigation/private', [ServeSharedController::class, 'get_private_navigation_tree']);
|
||||
Route::get('/search/private', [ServeSharedController::class, 'search_private']);
|
||||
Route::get('/files/private', [ServeSharedController::class, 'file_private']);
|
||||
|
||||
Reference in New Issue
Block a user