TypedAvatar.vue colored background

This commit is contained in:
Peter Papp
2021-08-31 09:52:22 +02:00
parent ac62a432fe
commit f44e262d6e
26 changed files with 115 additions and 524 deletions

View File

@@ -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')