@nextcloud/files

    Interface FileListActionData

    interface FileListActionData {
        displayName: (view: View) => string;
        enabled?: (view: View, nodes: Node[], folder: Folder) => boolean;
        exec: (
            view: View,
            nodes: Node[],
            folder: Folder,
        ) => Promise<null | boolean>;
        iconSvgInline?: (view: View) => string;
        id: string;
        order: number;
    }
    Index

    Properties

    displayName: (view: View) => string

    Translated name of the action

    enabled?: (view: View, nodes: Node[], folder: Folder) => boolean

    Condition whether this action is shown or not

    Type declaration

      • (view: View, nodes: Node[], folder: Folder): boolean
      • Parameters

        • view: View

          The current view

        • nodes: Node[]

          The nodes in the current directory

        • folder: Folder

          The current folder

        Returns boolean

    exec: (view: View, nodes: Node[], folder: Folder) => Promise<null | boolean>

    Function executed on single file action

    Type declaration

      • (view: View, nodes: Node[], folder: Folder): Promise<null | boolean>
      • Parameters

        Returns Promise<null | boolean>

        true if the action was executed successfully, false otherwise and null if the action is silent/undefined.

    Error if the action failed

    iconSvgInline?: (view: View) => string

    Raw svg string

    id: string

    Unique ID

    order: number

    Sort order

    MMNEPVFCICPMFPCPTTAAATR