@nextcloud/sharing
    Preparing search index...

    Interface ISidebarAction

    interface ISidebarAction {
        element: string;
        id: string;
        order: number;
        enabled(share: IShare, node: INode): boolean;
    }
    Index

    Properties

    Methods

    Properties

    element: string

    The registered identifier of the custom web component to be used.

    The custom elements identifier must be prefixed with your apps namespace like oca_myapp-sharing_action. Also the component must implement following properties:

    • node: The shared node as INode from @nextcloud/files.
    • share: The share model if the share already exists as object of type IShare (potentially undefined).
    • onSave: A registration method to register a on-save callback which will be called when the share is saved (callback: () => Promise<void>) => void
    id: string

    Unique identifier for the action

    order: number

    Order of the sidebar actions. A higher value means the action will be displayed first.

    Methods

    • Check if the action is enabled for a specific share type

      Parameters

      • share: IShare

        The share

      • node: INode

        The node that share is about

      Returns boolean