mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
refactor: remove mixing from FileMimeType as it is bad practice
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
23d3b76afe
commit
91f244d615
1 changed files with 9 additions and 4 deletions
|
|
@ -41,7 +41,6 @@
|
|||
<script>
|
||||
import NcEllipsisedOption from '@nextcloud/vue/dist/Components/NcEllipsisedOption.js'
|
||||
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
|
||||
import valueMixin from './../../mixins/valueMixin.js'
|
||||
import { imagePath } from '@nextcloud/router'
|
||||
|
||||
export default {
|
||||
|
|
@ -50,9 +49,6 @@ export default {
|
|||
NcEllipsisedOption,
|
||||
NcSelect,
|
||||
},
|
||||
mixins: [
|
||||
valueMixin
|
||||
],
|
||||
|
||||
emits: ['update:model-value'],
|
||||
|
||||
|
|
@ -80,6 +76,7 @@ export default {
|
|||
id: 'application/pdf',
|
||||
},
|
||||
],
|
||||
newValue: [],
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
|
@ -88,6 +85,11 @@ export default {
|
|||
default: '',
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
modelValue() {
|
||||
this.updateInternalValue()
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
options() {
|
||||
return [...this.predefinedTypes, this.customValue]
|
||||
|
|
@ -125,6 +127,9 @@ export default {
|
|||
const result = regexRegex.exec(string)
|
||||
return result !== null
|
||||
},
|
||||
updateInternalValue() {
|
||||
this.newValue = this.modelValue
|
||||
},
|
||||
setValue(value) {
|
||||
if (value !== null) {
|
||||
this.newValue = value.id
|
||||
|
|
|
|||
Loading…
Reference in a new issue