зеркало из https://github.com/nextcloud/text.git
Merge pull request #6132 from nextcloud/enh/noid/task-result-buttons
This commit is contained in:
Коммит
0cc1a00e30
|
@ -287,7 +287,19 @@ export default {
|
|||
emit('text:translate-modal:show', { content: this.selection || '' })
|
||||
},
|
||||
async openResult(task) {
|
||||
window.OCA.Assistant.openAssistantTask(task)
|
||||
window.OCA.Assistant.openAssistantTask(task, {
|
||||
isInsideViewer: true,
|
||||
actionButtons: [
|
||||
{
|
||||
type: 'primary',
|
||||
title: t('text', 'Insert result'),
|
||||
label: t('text', 'Insert result'),
|
||||
onClick: (lastTask) => {
|
||||
this.insertResult(lastTask)
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
},
|
||||
async insertResult(task) {
|
||||
this.$editor.commands.insertContent(task.output.output)
|
||||
|
|
Загрузка…
Ссылка в новой задаче