Skip to content

resgisterAction doesn't work #19080

@bbbastien

Description

@bbbastien

Steps to reproduce

  1. Create an app
  2. Develop an app to add new menu context in Files
  3. Cannot add a new link action

Expected behaviour

My customized application should add a new menu link action on Files.

Actual behaviour

Nothing happens, no error message

Server configuration

Operating system:
Windows 10
Web server:
Nginx
Database:
MySQL
PHP version:
7.2
Nextcloud version: (see Nextcloud admin page)
18
Updated from an older Nextcloud/ownCloud or fresh install:

Client configuration

Browser:
Brave Browser
Operating system:
Windows 10

This is my Code :

(function (OCA) {
	"use strict";

	OCA.Files = OCA.Files || {};

	OCA.Files.QrCodePlugin = {
		name: 'qrCode',
		_extendFileActions: function (fileActions) {
			fileActions.registerAction({
				name: 'qrCode',
				displayName: t('mynote', 'qrCode'),
				mime: 'all',
				iconClass: 'icon-public',
				actionHandler: function () {}
			});
		},
		attach: function (fileList) {
			this._extendFileActions(fileList.fileActions);
		}
	}


}) (OCA);

OC.Plugins.register('OCA.Files.FileList', OCA.Files.QrCodePlugin);

Can you tell me where I can debug my registerAction or tell me what is missing ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapbug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions