diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-04-18 09:43:29 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2023-04-20 09:06:57 +0200 |
commit | bb4d7969b93c806e4f578ecc5a6d04bb6bebee73 (patch) | |
tree | e6247c554d7e136042e0913f370f37ff1467ac37 /apps/files/src/services | |
parent | c85c04e4a8495eb04419a27a8e162c03acad6282 (diff) | |
download | nextcloud-server-bb4d7969b93c806e4f578ecc5a6d04bb6bebee73.tar.gz nextcloud-server-bb4d7969b93c806e4f578ecc5a6d04bb6bebee73.zip |
feat(files): add default action support
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/src/services')
-rw-r--r-- | apps/files/src/services/FileAction.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files/src/services/FileAction.ts b/apps/files/src/services/FileAction.ts index 8c1d325e645..453dbe535ee 100644 --- a/apps/files/src/services/FileAction.ts +++ b/apps/files/src/services/FileAction.ts @@ -48,13 +48,14 @@ interface FileActionData { * @returns true if the action was executed, false otherwise * @throws Error if the action failed */ - exec: (file: Node, view) => Promise<boolean>, + exec: (file: Node, view) => Promise<boolean|null>, /** * Function executed on multiple files action - * @returns true if the action was executed, false otherwise + * @returns true if the action was executed successfully, + * false otherwise and null if the action is silent/undefined. * @throws Error if the action failed */ - execBatch?: (files: Node[], view) => Promise<boolean[]> + execBatch?: (files: Node[], view) => Promise<(boolean|null)[]> /** This action order in the list */ order?: number, /** Make this action the default */ |