refactor: remove mixing from FileMimeType as it is bad practice

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2025-03-31 20:00:04 +02:00
parent 23d3b76afe
commit 91f244d615
No known key found for this signature in database
GPG key ID: 7424F1874854DF23

View file

@ -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