feat: handle size quota
This commit is contained in:
parent
1534a69f80
commit
2a4036614d
6 changed files with 68 additions and 24 deletions
|
|
@ -118,7 +118,7 @@
|
|||
</v-chip>
|
||||
</template>
|
||||
<template v-slot:item.actions="{ item }">
|
||||
<v-tooltip top v-if="item.validationState === 'published' || item.validationState === 'rejected'">
|
||||
<v-tooltip top v-if="item.publishedAt != null">
|
||||
<template v-slot:activator="{ on, attrs }">
|
||||
<v-btn icon small color="success">
|
||||
<v-icon
|
||||
|
|
|
|||
|
|
@ -241,12 +241,20 @@ export default {
|
|||
color: 'success',
|
||||
text: 'Couverture mise à jour !'
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$store.commit('ADD_ALERT', {
|
||||
color: 'error',
|
||||
text: 'Impossible de mettre à jour la couverture'
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
this.coverLoading = false
|
||||
if (err.response != null && err.response.status === 413) {
|
||||
this.$store.commit('ADD_ALERT', {
|
||||
color: 'error',
|
||||
text: 'Vous avez atteint votre quota concernant la taille des fichiers téléversés'
|
||||
})
|
||||
} else {
|
||||
this.$store.commit('ADD_ALERT', {
|
||||
color: 'error',
|
||||
text: 'Impossible de mettre à jour la couverture'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
loadFile (file) {
|
||||
|
|
@ -288,14 +296,25 @@ export default {
|
|||
this.uploadLoading = false
|
||||
this.addMediaModal = false
|
||||
this.files = []
|
||||
}).catch(() => {
|
||||
this.coverLoading = false
|
||||
this.$store.commit('ADD_ALERT', {
|
||||
color: 'error',
|
||||
text: 'Impossible de téleverser ces fichiers'
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
|
||||
this.uploadLoading = false
|
||||
if (err.response != null && err.response.status === 413) {
|
||||
this.$store.commit('ADD_ALERT', {
|
||||
color: 'error',
|
||||
text: 'Vous avez atteint votre quota concernant la taille des fichiers téléversés'
|
||||
})
|
||||
} else {
|
||||
this.$store.commit('ADD_ALERT', {
|
||||
color: 'error',
|
||||
text: 'Impossible de téleverser ces fichiers'
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
this.coverLoading = false
|
||||
this.$store.commit('ADD_ALERT', {
|
||||
color: 'error',
|
||||
text: 'Erreur de chargement des fichiers'
|
||||
|
|
|
|||
|
|
@ -149,12 +149,20 @@ export default {
|
|||
color: 'success',
|
||||
text: 'Logo mis à jour !'
|
||||
})
|
||||
}).catch(() => {
|
||||
}).catch(err => {
|
||||
console.log(err)
|
||||
this.logoLoading = false
|
||||
this.$store.commit('ADD_ALERT', {
|
||||
color: 'error',
|
||||
text: 'Impossible de mettre à jour le logo'
|
||||
})
|
||||
if (err.response != null && err.response.status === 413) {
|
||||
this.$store.commit('ADD_ALERT', {
|
||||
color: 'error',
|
||||
text: 'Vous avez atteint votre quota concernant la taille des fichiers téléversés'
|
||||
})
|
||||
} else {
|
||||
this.$store.commit('ADD_ALERT', {
|
||||
color: 'error',
|
||||
text: 'Impossible de mettre à jour le logo'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue