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
+3 -8
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')
+5 -2
View File
@@ -27,7 +27,10 @@ const actions = {
axios
.get(`/api/browse/folders/${id}/${router.currentRoute.params.token}${getters.sorting.URI}`)
.then(response => {
commit('LOADING_STATE', {loading: false, data: response.data.content})
let folders = response.data.folders.data
let files = response.data.files.data
commit('LOADING_STATE', {loading: false, data: folders.concat(files)})
commit('SET_CURRENT_FOLDER', response.data.root)
events.$emit('scrollTop')
@@ -55,7 +58,7 @@ const actions = {
resolve(response)
// Commit shared item options
commit('SET_SHARED_DETAIL', response.data.data.attributes)
commit('SET_SHARED_DETAIL', response.data)
commit('SET_PERMISSION', response.data.data.attributes.permission)
})
.catch(error => {