@nextcloud/files
    Preparing search index...

    Interface NewMenuEntry

    interface NewMenuEntry {
        category?: NewMenuEntryCategory;
        displayName: string;
        enabled?: (context: Folder) => boolean;
        handler: (context: Folder, content: Node[]) => void;
        iconClass?: string;
        iconSvgInline?: string;
        id: string;
        order?: number;
    }
    Index

    Properties

    Category to put this entry in (supported since Nextcloud 30)

    3.3.0

    NewMenuEntryCategory.CreateNew
    
    displayName: string

    Translatable string displayed in the menu

    enabled?: (context: Folder) => boolean

    Condition wether this entry is shown or not

    Type declaration

      • (context: Folder): boolean
      • Parameters

        • context: Folder

          the creation context. Usually the current folder

        Returns boolean

    handler: (context: Folder, content: Node[]) => void

    Function to be run after creation

    Type declaration

      • (context: Folder, content: Node[]): void
      • Parameters

        • context: Folder

          The creation context. Usually the current folder

        • content: Node[]

          List of file/folders present in the context folder

        Returns void

    iconClass?: string

    Existing icon css class

    use iconSvgInline instead

    iconSvgInline?: string

    Either iconSvgInline or iconClass must be defined Svg as inline string.

    id: string

    Unique ID

    order?: number

    Order of the entry in the menu