mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-24 18:00:40 +00:00
broadcast new files to the frontend after file was remotely uploaded
This commit is contained in:
@@ -93,15 +93,21 @@ export default {
|
||||
parent_id: parentId,
|
||||
})
|
||||
.then(() => {
|
||||
events.$emit('toaster', {
|
||||
type: 'success',
|
||||
message: this.$t('remote_download_processed'),
|
||||
})
|
||||
// If broadcasting
|
||||
if (this.$store.getters.isBroadcasting) {
|
||||
events.$emit('toaster', {
|
||||
type: 'success',
|
||||
message: this.$t('remote_download_processed'),
|
||||
})
|
||||
}
|
||||
|
||||
// If broadcasting is not set
|
||||
if (!this.$store.getters.isBroadcasting) {
|
||||
// Reload data
|
||||
this.$getDataByLocation()
|
||||
}
|
||||
|
||||
events.$emit('popup:close')
|
||||
|
||||
// Reload data
|
||||
this.$getDataByLocation()
|
||||
})
|
||||
.catch((error) => {
|
||||
if (error.response.status === 422) {
|
||||
@@ -129,6 +135,8 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => this.$refs.textarea.focus(), 100)
|
||||
})
|
||||
|
||||
console.log(this.$store.getters.isBroadcasting);
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--Overlay component-->
|
||||
<div
|
||||
@click.capture="hidePopover"
|
||||
class="absolute top-12 z-20 w-60 overflow-hidden rounded-xl bg-white shadow-xl dark:bg-dark-foreground"
|
||||
class="absolute top-12 z-20 w-60 overflow-hidden rounded-xl bg-white shadow-xl dark:bg-dark-foreground select-none"
|
||||
:class="{ 'right-0': side === 'left', 'left-0': side === 'right' }"
|
||||
>
|
||||
<slot />
|
||||
|
||||
Reference in New Issue
Block a user