diff --git a/apps/systemtags/src/components/SystemTagPicker.vue b/apps/systemtags/src/components/SystemTagPicker.vue index 732d509ac24e7..db93e6be6cfe0 100644 --- a/apps/systemtags/src/components/SystemTagPicker.vue +++ b/apps/systemtags/src/components/SystemTagPicker.vue @@ -409,7 +409,7 @@ export default defineComponent({ this.status = Status.DONE setTimeout(() => { this.opened = false - this.$emit('close', null) + this.$emit('close', true) }, 2000) }, diff --git a/apps/systemtags/src/files_actions/bulkSystemTagsAction.ts b/apps/systemtags/src/files_actions/bulkSystemTagsAction.ts index 7e7c29f64f01e..f91691c561a64 100644 --- a/apps/systemtags/src/files_actions/bulkSystemTagsAction.ts +++ b/apps/systemtags/src/files_actions/bulkSystemTagsAction.ts @@ -11,6 +11,17 @@ import { t } from '@nextcloud/l10n' import TagMultipleSvg from '@mdi/svg/svg/tag-multiple.svg?raw' +async function execBatch(nodes: Node[]): Promise<(null|boolean)[]> { + const response = await new Promise((resolve) => { + spawnDialog(defineAsyncComponent(() => import('../components/SystemTagPicker.vue')), { + nodes, + }, (status) => { + resolve(status as null|boolean) + }) + }) + return Array(nodes.length).fill(response) +} + export const action = new FileAction({ id: 'systemtags:bulk', displayName: () => t('systemtags', 'Manage tags'), @@ -25,18 +36,9 @@ export const action = new FileAction({ return true }, - async exec() { - return null + async exec(node: Node) { + return execBatch([node])[0] }, - async execBatch(nodes: Node[]) { - const response = await new Promise((resolve) => { - spawnDialog(defineAsyncComponent(() => import('../components/SystemTagPicker.vue')), { - nodes, - }, (status) => { - resolve(status as null|boolean) - }) - }) - return Array(nodes.length).fill(response) - }, + execBatch, })