Merge remote-tracking branch 'origin/master' into oasis

# Conflicts:
#	public/chunks/admin-account.js
#	public/chunks/admin.js
#	public/chunks/app-appearance.js
#	public/chunks/app-billings.js
#	public/chunks/app-email.js
#	public/chunks/app-index.js
#	public/chunks/app-language.js
#	public/chunks/app-others.js
#	public/chunks/app-payments.js
#	public/chunks/app-setup.js
#	public/chunks/billings-detail.js
#	public/chunks/contact-us.js
#	public/chunks/dashboard.js
#	public/chunks/database.js
#	public/chunks/environment-setup.js
#	public/chunks/files.js
#	public/chunks/installation-disclaimer.js
#	public/chunks/invoices.js
#	public/chunks/page-edit.js
#	public/chunks/pages.js
#	public/chunks/plan-create.js
#	public/chunks/plan-delete.js
#	public/chunks/plan-settings.js
#	public/chunks/plan-subscribers.js
#	public/chunks/plans.js
#	public/chunks/platform.js
#	public/chunks/profile.js
#	public/chunks/settings-create-payment-methods.js
#	public/chunks/settings-invoices.js
#	public/chunks/settings-password.js
#	public/chunks/settings-payment-methods.js
#	public/chunks/settings.js
#	public/chunks/shared.js
#	public/chunks/shared/authenticate.js
#	public/chunks/shared/file-browser.js
#	public/chunks/shared/single-file.js
#	public/chunks/sign-in.js
#	public/chunks/sign-up.js
#	public/chunks/stripe-credentials.js
#	public/chunks/subscription-plans.js
#	public/chunks/subscription-service.js
#	public/chunks/upgrade-billing.js
#	public/chunks/upgrade-plan.js
#	public/chunks/user-create.js
#	public/chunks/user-delete.js
#	public/chunks/user-detail.js
#	public/chunks/user-invoices.js
#	public/chunks/user-password.js
#	public/chunks/user-storage.js
#	public/chunks/user-subscription.js
#	public/chunks/user.js
#	public/chunks/users.js
#	public/js/main.js
#	public/mix-manifest.json
#	resources/js/helpers.js
This commit is contained in:
Peter Papp
2021-05-10 17:15:37 +02:00
85 changed files with 338 additions and 1116 deletions
+41 -4
View File
@@ -1,6 +1,6 @@
import i18n from '@/i18n/index'
import store from './store/index'
import {debounce, includes, isArray} from "lodash";
import {debounce, isArray} from "lodash";
import {events} from './bus'
import axios from 'axios'
@@ -30,6 +30,43 @@ const Helpers = {
}
}, 300)
Vue.prototype.$renameFileOrFolder = function (entry) {
events.$emit('popup:open', {name: 'rename-item', item: entry})
}
Vue.prototype.$moveFileOrFolder = function (entry) {
events.$emit('popup:open', {name: 'move', item: [entry]})
}
Vue.prototype.$deleteFileOrFolder = function (entry) {
if (!this.$store.getters.clipboard.includes(entry)) {
this.$store.dispatch('deleteItem', entry)
}
if (this.$store.getters.clipboard.includes(entry)) {
this.$store.dispatch('deleteItem')
}
}
Vue.prototype.$restoreFileOrFolder = function (entry) {
if (!this.$store.getters.clipboard.includes(entry))
this.$store.dispatch('restoreItem', entry)
if (this.$store.getters.clipboard.includes(entry))
this.$store.dispatch('restoreItem', null)
}
Vue.prototype.$shareFileOrFolder = function (entry) {
let event = entry.shared
? 'share-edit'
: 'share-create'
events.$emit('popup:open', {
name: event,
item: entry
})
}
Vue.prototype.$searchFiles = debounce(function (value) {
if (value !== '' && typeof value !== 'undefined') {
@@ -250,7 +287,7 @@ const Helpers = {
Vue.prototype.$isThisRoute = function (route, locations) {
return includes(locations, route.name)
return locations.includes(route.name)
}
Vue.prototype.$isThisLocation = function (location) {
@@ -260,7 +297,7 @@ const Helpers = {
// Check if type is object
if (typeof location === 'Object' || location instanceof Object) {
return includes(location, currentLocation)
return location.includes(currentLocation)
} else {
return currentLocation === location
@@ -273,7 +310,7 @@ const Helpers = {
// Check if type is object
if (typeof type === 'Object' || type instanceof Object) {
return includes(type, currentPermission)
return type.includes(currentPermission)
} else {
return currentPermission === type