diff --git a/app/src/components/ConfigPanel.vue b/app/src/components/ConfigPanel.vue index d4dad0da..78d6d1a5 100644 --- a/app/src/components/ConfigPanel.vue +++ b/app/src/components/ConfigPanel.vue @@ -24,7 +24,7 @@ @@ -61,24 +61,20 @@ export default { methods: { onApply () { const panelId = this.panel.id - const nonActionKeys = this.panel.sections.filter(section => { - return !section.isActionSection - }).reduce((keys, { fields }) => { - return keys.concat(Object.keys(fields)) - }, []) - - this.$emit('submit', { - id: this.panel.id, - form: filterObject(this.forms[panelId], ([key]) => nonActionKeys.includes(key)) - }) - }, - - onAction (sectionId, actionId, actionArgs) { - const panelId = this.panel.id this.$emit('submit', { id: panelId, - form: filterObject(this.forms[panelId], ([key]) => actionArgs.includes(key)), + form: this.forms[panelId] + }) + }, + + onAction (sectionId, actionId, actionFields) { + const panelId = this.panel.id + const actionFieldsKeys = Object.keys(actionFields) + + this.$emit('submit', { + id: panelId, + form: filterObject(this.forms[panelId], ([key]) => actionFieldsKeys.includes(key)), action: [panelId, sectionId, actionId].join('.'), name: actionId }) diff --git a/app/src/helpers/yunohostArguments.js b/app/src/helpers/yunohostArguments.js index 6f5893c5..a5d56a6c 100644 --- a/app/src/helpers/yunohostArguments.js +++ b/app/src/helpers/yunohostArguments.js @@ -233,7 +233,7 @@ export function formatYunoHostArgument (arg) { { types: ['button'], name: 'ButtonItem', - props: ['type:style', 'label:ask', 'icon', 'enabled', 'args'], + props: ['type:style', 'label:ask', 'icon', 'enabled'], renderSelf: true } ]