mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-19 08:32:14 +00:00
TypedAvatar.vue colored background
This commit is contained in:
11
resources/js/store/modules/fileFunctions.js
vendored
11
resources/js/store/modules/fileFunctions.js
vendored
@@ -252,16 +252,12 @@ const actions = {
|
||||
|
||||
let itemToRestore = []
|
||||
let items = [item]
|
||||
let restoreToHome = false
|
||||
let restoreToHome = Vue.prototype.$isThisRoute(router.currentRoute, ['Trash'])
|
||||
|
||||
// If coming no selected item dont get items to restore from clipboard
|
||||
if (!item)
|
||||
items = getters.clipboard
|
||||
|
||||
// Check if file can be restored to home directory
|
||||
if (getters.currentFolder.location === 'trash')
|
||||
restoreToHome = true
|
||||
|
||||
items.forEach(data => itemToRestore.push({
|
||||
type: data.data.type,
|
||||
id: data.data.id
|
||||
@@ -276,8 +272,7 @@ const actions = {
|
||||
items: itemToRestore
|
||||
})
|
||||
.then(
|
||||
// Remove file
|
||||
items.forEach(data => commit('REMOVE_ITEM', data.id))
|
||||
items.forEach(item => commit('REMOVE_ITEM', item.data.id))
|
||||
)
|
||||
.catch(() => Vue.prototype.$isSomethingWrong())
|
||||
},
|
||||
@@ -340,7 +335,7 @@ const actions = {
|
||||
|
||||
if (data.id === getters.currentFolder.data.id) {
|
||||
|
||||
if (getters.currentFolder.location === 'public') {
|
||||
if (Vue.prototype.$isThisRoute(router.currentRoute, ['Public'])) {
|
||||
dispatch('browseShared')
|
||||
} else {
|
||||
dispatch('getFolder')
|
||||
|
||||
Reference in New Issue
Block a user