diff --git a/src/components/Modal/Translate.vue b/src/components/Modal/Translate.vue
index ef0fe422f0f..7bab65f7790 100644
--- a/src/components/Modal/Translate.vue
+++ b/src/components/Modal/Translate.vue
@@ -35,10 +35,12 @@
:disabled="disableFromLanguageSelect"
:append-to-body="false" />
-
@@ -51,9 +53,12 @@
:disabled="!fromLanguage"
:append-to-body="false" />
-
@@ -80,7 +85,7 @@
import axios from '@nextcloud/axios'
import { loadState } from '@nextcloud/initial-state'
import { generateOcsUrl } from '@nextcloud/router'
-import { NcModal, NcButton, NcSelect, NcLoadingIcon } from '@nextcloud/vue'
+import { NcModal, NcButton, NcSelect, NcLoadingIcon, NcTextArea } from '@nextcloud/vue'
import { useIsMobileMixin } from '../Editor.provider.js'
const detectLanguageEntry = {
@@ -95,6 +100,7 @@ export default {
NcButton,
NcSelect,
NcLoadingIcon,
+ NcTextArea,
},
mixins: [
useIsMobileMixin,
@@ -119,6 +125,15 @@ export default {
}
},
computed: {
+ inputValue: {
+ get() {
+ return this.input
+ },
+ set(event) {
+ this.input = event.target.value
+ this.autosize()
+ },
+ },
fromLanguages() {
const result = this.canDetect ? [detectLanguageEntry] : []
const set = new Set()
@@ -195,12 +210,12 @@ export default {
this.$emit('replace-content', this.result)
},
autosize() {
- this.$refs.input.style.overflowY = 'hidden'
- this.$refs.input.style.height = 'auto'
- const height = this.$refs.input.scrollHeight + 10
- this.$refs.input.style.height = height + 'px'
- this.$refs.result.style.height = height + 'px'
- this.$refs.input.style.overflowY = 'auto'
+ this.$refs.input.$refs.input.style.overflowY = 'hidden'
+ this.$refs.input.$refs.input.style.height = 'auto'
+ const height = this.$refs.input.$refs.input.scrollHeight + 10
+ this.$refs.input.$refs.input.style.height = height + 'px'
+ this.$refs.result.$refs.input.style.height = height + 'px'
+ this.$refs.input.$refs.input.style.overflowY = 'auto'
},
onInputFocus() {
this.disableFromLanguageSelect = false
@@ -210,7 +225,7 @@ export default {
}
-