v1.5-alpha.9

This commit is contained in:
carodej
2020-05-18 09:32:34 +02:00
parent 8daa05f710
commit dfe4991177
12 changed files with 102 additions and 19 deletions
+3 -3
View File
@@ -250,9 +250,9 @@ const mutations = {
state.fileInfoDetail = item
},
GET_FILEINFO_DETAIL(state, item) {
state.fileInfoDetail = state.data.find(
el => el.unique_id == item.unique_id
)
let checkData = state.data.find(el => el.unique_id == item.unique_id)
state.fileInfoDetail = checkData ? checkData : state.currentFolder
},
CHANGE_SEARCHING_STATE(state, searchState) {
state.isSearching = searchState
+11 -6
View File
@@ -160,14 +160,19 @@ const actions = {
.then(() => {
// If is folder, update app data
if (data.type === 'folder' && data.unique_id === getters.currentFolder.unique_id) {
if (data.type === 'folder') {
if ( getters.currentFolder.location === 'public' ) {
dispatch('browseShared', [{folder: last(getters.browseHistory), back: true, init: false}])
} else {
dispatch('getFolder', [{folder: last(getters.browseHistory), back: true, init: false}])
dispatch('getAppData')
if (data.unique_id === getters.currentFolder.unique_id) {
if ( getters.currentFolder.location === 'public' ) {
dispatch('browseShared', [{folder: last(getters.browseHistory), back: true, init: false}])
} else {
dispatch('getFolder', [{folder: last(getters.browseHistory), back: true, init: false}])
}
}
if ( getters.currentFolder.location !== 'public' )
dispatch('getAppData')
}
})
.catch(() => isSomethingWrong())