Fix new eslint rules

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-12-28 12:52:21 +01:00
parent 44a88069db
commit e22fbb7277
15 changed files with 21 additions and 20 deletions

View File

@@ -35,7 +35,7 @@ export default {
async onLocalAttachmentSelected(file) {
if (this.maxUploadSize > 0 && file.size > this.maxUploadSize) {
showError(
t('deck', `Failed to upload {name}`, { name: file.name }) + ' - '
t('deck', 'Failed to upload {name}', { name: file.name }) + ' - '
+ t('deck', 'Maximum file size of {size} exceeded', { size: formatFileSize(this.maxUploadSize) })
)
event.target.value = ''
@@ -49,7 +49,8 @@ export default {
bodyFormData.append('file', file)
await queue.add(async() => {
try {
await this.$store.dispatch('createAttachment', { cardId: this.cardId,
await this.$store.dispatch('createAttachment', {
cardId: this.cardId,
formData: bodyFormData,
onUploadProgress: (e) => {
const percentCompleted = Math.round((e.loaded * 100) / e.total)