Skip to content

Commit

Permalink
feat: add labels to textarea elements in translate modal
Browse files Browse the repository at this point in the history
Signed-off-by: Luka Trovic <[email protected]>
  • Loading branch information
luka-nextcloud committed Jan 11, 2024
1 parent bff5a79 commit 5c1b783
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/Modal/Translate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
:disabled="disableFromLanguageSelect"
:append-to-body="false" />
</div>
<textarea ref="input"
<NcTextArea ref="input"
v-model="input"
:label="t('text', 'Text to translate from')"
autofocus
@input="autosize"
@focus="onInputFocus" />
Expand All @@ -51,8 +52,9 @@
:disabled="!fromLanguage"
:append-to-body="false" />
</div>
<textarea ref="result"
<NcTextArea ref="result"
v-model="result"
:label="t('text', 'Translated text result')"
readonly
:class="{'icon-loading': loading }" />
</div>
Expand Down Expand Up @@ -80,7 +82,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 = {
Expand All @@ -95,6 +97,7 @@ export default {
NcButton,
NcSelect,
NcLoadingIcon,
NcTextArea,
},
mixins: [
useIsMobileMixin,
Expand Down

0 comments on commit 5c1b783

Please sign in to comment.