mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
- fileinfodetail renamed to clipboard
This commit is contained in:
22
resources/js/store/modules/fileFunctions.js
vendored
22
resources/js/store/modules/fileFunctions.js
vendored
@@ -41,7 +41,7 @@ const actions = {
|
||||
let files = []
|
||||
|
||||
// get ids of selected files
|
||||
getters.fileInfoDetail.forEach(file => files.push(file.id))
|
||||
getters.clipboard.forEach(file => files.push(file.id))
|
||||
|
||||
// Get route
|
||||
let route = getters.sharedDetail
|
||||
@@ -71,9 +71,9 @@ const actions = {
|
||||
let itemsToMove = []
|
||||
let items = [noSelectedItem]
|
||||
|
||||
// If coming no selected item dont get items to move from fileInfoDetail
|
||||
// If coming no selected item dont get items to move from clipboard
|
||||
if (!noSelectedItem)
|
||||
items = getters.fileInfoDetail
|
||||
items = getters.clipboard
|
||||
|
||||
items.forEach(data => itemsToMove.push({
|
||||
'id': data.id,
|
||||
@@ -82,7 +82,7 @@ const actions = {
|
||||
|
||||
// Remove file preview
|
||||
if (!noSelectedItem)
|
||||
commit('CLEAR_FILEINFO_DETAIL')
|
||||
commit('CLIPBOARD_CLEAR')
|
||||
|
||||
// Get route
|
||||
let route = getters.sharedDetail
|
||||
@@ -267,9 +267,9 @@ const actions = {
|
||||
let items = [item]
|
||||
let restoreToHome = false
|
||||
|
||||
// If coming no selected item dont get items to restore from fileInfoDetail
|
||||
// If coming no selected item dont get items to restore from clipboard
|
||||
if (!item)
|
||||
items = getters.fileInfoDetail
|
||||
items = getters.clipboard
|
||||
|
||||
// Check if file can be restored to home directory
|
||||
if (getters.currentFolder.location === 'trash')
|
||||
@@ -281,7 +281,7 @@ const actions = {
|
||||
}))
|
||||
|
||||
// Remove file preview
|
||||
commit('CLEAR_FILEINFO_DETAIL')
|
||||
commit('CLIPBOARD_CLEAR')
|
||||
|
||||
axios
|
||||
.post(getters.api + '/trash/restore', {
|
||||
@@ -299,9 +299,9 @@ const actions = {
|
||||
let itemsToDelete = []
|
||||
let items = [noSelectedItem]
|
||||
|
||||
// If coming no selected item dont get items to move from fileInfoDetail
|
||||
// If coming no selected item dont get items to move from clipboard
|
||||
if (!noSelectedItem)
|
||||
items = getters.fileInfoDetail
|
||||
items = getters.clipboard
|
||||
|
||||
items.forEach(data => {
|
||||
itemsToDelete.push({
|
||||
@@ -333,7 +333,7 @@ const actions = {
|
||||
|
||||
// Remove file preview
|
||||
if (!noSelectedItem) {
|
||||
commit('CLEAR_FILEINFO_DETAIL')
|
||||
commit('CLIPBOARD_CLEAR')
|
||||
}
|
||||
|
||||
// Get route
|
||||
@@ -385,7 +385,7 @@ const actions = {
|
||||
commit('LOADING_STATE', {loading: false, data: []})
|
||||
events.$emit('scrollTop')
|
||||
|
||||
commit('CLEAR_FILEINFO_DETAIL')
|
||||
commit('CLIPBOARD_CLEAR')
|
||||
})
|
||||
.catch(() => Vue.prototype.$isSomethingWrong())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user