broadcast new files to the frontend after file was remotely uploaded

This commit is contained in:
Čarodej
2022-04-23 09:44:43 +02:00
parent 4b366747b6
commit 0a9740a363
14 changed files with 159 additions and 62 deletions

View File

@@ -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);
})
},
}