aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorskjnldsv <skjnldsv@protonmail.com>2024-10-24 15:46:22 +0200
committerskjnldsv <skjnldsv@protonmail.com>2024-10-29 09:08:31 +0100
commita4d7518e36cdf3ea76361f4701e80a930b3d790d (patch)
tree4a6c00352f552e0d4734aa266f4faed3bc4f4723 /apps
parentd51cf4536c665ea208ca9bb452ec8841c15a5f35 (diff)
downloadnextcloud-server-a4d7518e36cdf3ea76361f4701e80a930b3d790d.tar.gz
nextcloud-server-a4d7518e36cdf3ea76361f4701e80a930b3d790d.zip
fix(systemtags): single-node bulk tagging action
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/systemtags/src/components/SystemTagPicker.vue2
-rw-r--r--apps/systemtags/src/files_actions/bulkSystemTagsAction.ts26
2 files changed, 15 insertions, 13 deletions
diff --git a/apps/systemtags/src/components/SystemTagPicker.vue b/apps/systemtags/src/components/SystemTagPicker.vue
index 732d509ac24..db93e6be6cf 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 ad2ebab70c4..990e2122de5 100644
--- a/apps/systemtags/src/files_actions/bulkSystemTagsAction.ts
+++ b/apps/systemtags/src/files_actions/bulkSystemTagsAction.ts
@@ -12,6 +12,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<null|boolean>((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'),
@@ -27,18 +38,9 @@ export const action = new FileAction({
return getCurrentUser() !== null
},
- async exec() {
- return null
+ async exec(node: Node) {
+ return execBatch([node])[0]
},
- async execBatch(nodes: Node[]) {
- const response = await new Promise<null|boolean>((resolve) => {
- spawnDialog(defineAsyncComponent(() => import('../components/SystemTagPicker.vue')), {
- nodes,
- }, (status) => {
- resolve(status as null|boolean)
- })
- })
- return Array(nodes.length).fill(response)
- },
+ execBatch,
})