diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-07-02 17:42:55 +0200 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-07-27 12:19:24 +0200 |
commit | 46b8cf4f64a8a2d9320ded762eeb0a4b9347181d (patch) | |
tree | 2425ff8806f82cff5e46142af504430f612566f0 /apps/files/js | |
parent | 7130a98e4730c9ba4e40593a958beb3683d02ef1 (diff) | |
download | nextcloud-server-46b8cf4f64a8a2d9320ded762eeb0a4b9347181d.tar.gz nextcloud-server-46b8cf4f64a8a2d9320ded762eeb0a4b9347181d.zip |
Remove "Reject share" for pending remote shares
In the list of pending shares, the option for rejecting the share has
been removed.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/fileactions.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index c7883e4d2a6..5d9e8578e19 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -155,6 +155,9 @@ if (_.isFunction(action.render)) { actionSpec.render = action.render; } + if (_.isFunction(action.shouldRender)) { + actionSpec.shouldRender = action.shouldRender; + } if (!this.actions[mime]) { this.actions[mime] = {}; } @@ -397,6 +400,11 @@ * @param {OCA.Files.FileActionContext} context rendering context */ _renderInlineAction: function(actionSpec, isDefault, context) { + if (actionSpec.shouldRender) { + if (!actionSpec.shouldRender(context)) { + return; + } + } var renderFunc = actionSpec.render || _.bind(this._defaultRenderAction, this); var $actionEl = renderFunc(actionSpec, isDefault, context); if (!$actionEl || !$actionEl.length) { |