From a64066bd805e086a86b5a1a25810d6ef36ea64c1 Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Thu, 3 Aug 2023 19:25:10 +0200 Subject: [PATCH] polish form Signed-off-by: Julien Veyssier --- src/assistant.js | 2 +- src/components/AssistantForm.vue | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/assistant.js b/src/assistant.js index 7a78e25d..9e8efc71 100644 --- a/src/assistant.js +++ b/src/assistant.js @@ -170,7 +170,7 @@ async function addAssistantMenuEntry() { view.$on('click', () => { openAssistantForm('textprocessing_assistant') .then(r => { - console.debug('scheduled task', r.data.ocs.data.task) + console.debug('scheduled task', r) }) }) } diff --git a/src/components/AssistantForm.vue b/src/components/AssistantForm.vue index cca5c85d..37e5cc30 100644 --- a/src/components/AssistantForm.vue +++ b/src/components/AssistantForm.vue @@ -24,14 +24,17 @@ :placeholder="t('textprocessing_assistant', 'Type some text')" :link-autocomplete="false" /> - @@ -95,6 +98,12 @@ export default { } return this.taskTypes.find(tt => tt.id === this.mySelectedTaskTypeId) }, + showSubmit() { + return this.selectedTaskType && this.myOutput.trim() === '' + }, + canSubmit() { + return this.selectedTaskType && !!this.myInput.trim() + }, }, mounted() { this.getTaskTypes() @@ -138,7 +147,8 @@ export default { .editable-input, .editable-output { width: 100%; - min-height: 150px; + min-height: unset !important; + max-height: 200px !important; } .assistant-bubble {