mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[files max50mb, autocomplete fix]
This commit is contained in:
1 parent
356dd12566
commit
ebc27a9ae2
3 files changed
+12
-3
No files matched your search
@@ -54,7 +54,7 @@ const options: Options = {
|
||||
|
||||
'GET v1/overview/teams': true,
|
||||
'GET v1/overview/tasks': true,
|
||||
'GET v1/search': true,
|
||||
// 'GET v1/search': true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ export default {
|
||||
const filteredOptions = this.options.filter(option => {
|
||||
const normalizedValue = this._normalize(option.value)
|
||||
|
||||
return normalizedSearch == normalizedValue.slice(0, normalizedSearch.length)
|
||||
return normalizedValue.includes(normalizedSearch)
|
||||
})
|
||||
|
||||
if (!filteredOptions[0])
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<v-chip class="mt-2">
|
||||
{{ file.name }}
|
||||
<v-icon class="mx-1" icon="mdi-paperclip"></v-icon>
|
||||
<p>{{ (file.size / (1024 * 1024)).toFixed(2) }} MB</p>
|
||||
<v-icon size="small" icon="mdi-close" @click.stop="remove(uploadedFiles.indexOf(file))"></v-icon>
|
||||
</v-chip>
|
||||
</div>
|
||||
@@ -47,7 +48,15 @@ export default {
|
||||
|
||||
methods: {
|
||||
onChange() {
|
||||
this.uploadedFiles = [...this.uploadedFiles, ...this.$refs.fileUpload.files]
|
||||
const files = [...this.$refs.fileUpload.files]
|
||||
const maxSize = 50 * 1024 * 1024
|
||||
const oversizedFiles = files.filter(file => file.size > maxSize)
|
||||
if (oversizedFiles.length > 0) {
|
||||
this.$toast.error('File is too large. Maximum file size is 50 MB.')
|
||||
return
|
||||
}
|
||||
|
||||
this.uploadedFiles = [...this.uploadedFiles, ...files]
|
||||
this.$emit('files-uploaded', this.uploadedFiles)
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user