navigation through public folders

This commit is contained in:
Peter Papp
2021-08-23 09:16:01 +02:00
parent 26e3194f21
commit a926545146
8 changed files with 285 additions and 201 deletions
@@ -125,6 +125,10 @@
'clipboard',
]),
isLoadedFolder() {
if (this.sharedDetail && this.sharedDetail.item_id === this.$route.params.id) {
return false
}
return this.$route.params.id
},
hasCapacity() {
@@ -220,12 +220,16 @@ export default {
if (!this.mobileMultiSelect && this.$isMobile()) {
if (this.isFolder) {
let route = this.$router.currentRoute.name
if (this.$isThisLocation('public')) {
this.$store.dispatch('browseShared', [{folder: this.item, back: false, init: false}])
} else {
if (route === 'Public') {
this.$router.push({name: 'Public', params: {token: this.$route.params.token, id: this.item.id}})
} else if (route === 'Trash') {
this.$router.push({name: 'Trash', params: {id: this.item.id}})
} else if (route === 'Files') {
this.$router.push({name: 'Files', params: {id: this.item.id}})
}
}
} else {
if (this.isImage || this.isVideo || this.isAudio || this.isPdf) {
@@ -262,13 +266,9 @@ export default {
if (route === 'Public') {
this.$router.push({name: 'Public', params: {token: this.$route.params.token, id: this.item.id}})
}
if (route === 'Trash') {
} else if (route === 'Trash') {
this.$router.push({name: 'Trash', params: {id: this.item.id}})
}
if (route === 'Files') {
} else if (route === 'Files') {
this.$router.push({name: 'Files', params: {id: this.item.id}})
}
}