mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 00:02:15 +00:00
action:confirmed fix in leaving shared folder
This commit is contained in:
@@ -105,7 +105,7 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 20;
|
||||
z-index: 45;
|
||||
overflow: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
events.$emit('popup:open', {name: 'create-folder'})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
mounted() {
|
||||
this.$store.commit('SET_CURRENT_TEAM_FOLDER', undefined)
|
||||
this.$store.dispatch('getSharedWithMeFolder', this.$route.params.id)
|
||||
|
||||
@@ -214,7 +214,12 @@
|
||||
if (data.operation === 'leave-team-folder')
|
||||
axios.delete(`/api/teams/folders/${data.id}/leave`)
|
||||
.then(() => {
|
||||
this.$router.push({name: 'SharedWithMe'})
|
||||
|
||||
if (this.$route.params.id) {
|
||||
this.$router.push({name: 'SharedWithMe'})
|
||||
} else {
|
||||
this.$store.dispatch('getSharedWithMeFolder', undefined)
|
||||
}
|
||||
|
||||
events.$emit('toaster', {
|
||||
type: 'success',
|
||||
@@ -223,6 +228,9 @@
|
||||
})
|
||||
.catch(() => this.$isSomethingWrong())
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
events.$off('action:confirmed')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
events.$emit('popup:open', {name: 'create-folder'})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
mounted() {
|
||||
this.$store.dispatch('getTeamFolder', this.$route.params.id)
|
||||
|
||||
events.$on('context-menu:show', (event, item) => this.item = item)
|
||||
@@ -255,6 +255,9 @@
|
||||
})
|
||||
.catch(() => this.$isSomethingWrong())
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
events.$off('action:confirmed')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user