diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-10-11 09:28:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 09:28:40 +0200 |
commit | e0ec31e9099767e59f3d4a502883ec980b2229e6 (patch) | |
tree | bcbfa41f374fdef26effd57a9cc26f5ea0b9a34a | |
parent | 647f9ca2d72a276e793bdc1ac0d7286ce3364abc (diff) | |
parent | d552bae403c02fa7d10a409605807aba04164b21 (diff) | |
download | nextcloud-server-e0ec31e9099767e59f3d4a502883ec980b2229e6.tar.gz nextcloud-server-e0ec31e9099767e59f3d4a502883ec980b2229e6.zip |
Merge pull request #34513 from nextcloud/enh/34493/hide-edit-locally
do not show editlocally on mobile
-rw-r--r-- | apps/files/js/fileactions.js | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 283118cd327..67fdf9620c6 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -710,29 +710,31 @@ } }); - this.registerAction({ - name: 'EditLocally', - displayName: function(context) { - var locked = context.$file.data('locked'); - if (!locked) { - return t('files', 'Edit locally'); - } - }, - mime: 'all', - order: -23, - icon: function(filename, context) { - var locked = context.$file.data('locked'); - if (!locked) { - return OC.imagePath('files', 'computer.svg') - } - }, - permissions: OC.PERMISSION_UPDATE, - actionHandler: function (filename, context) { - var dir = context.dir || context.fileList.getCurrentDirectory(); - var path = dir === '/' ? dir + filename : dir + '/' + filename; - context.fileList.openLocalClient(path); - }, - }); + if (!/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)) { + this.registerAction({ + name: 'EditLocally', + displayName: function(context) { + var locked = context.$file.data('locked'); + if (!locked) { + return t('files', 'Edit locally'); + } + }, + mime: 'all', + order: -23, + icon: function(filename, context) { + var locked = context.$file.data('locked'); + if (!locked) { + return OC.imagePath('files', 'computer.svg') + } + }, + permissions: OC.PERMISSION_UPDATE, + actionHandler: function (filename, context) { + var dir = context.dir || context.fileList.getCurrentDirectory(); + var path = dir === '/' ? dir + filename : dir + '/' + filename; + context.fileList.openLocalClient(path); + }, + }); + } this.registerAction({ name: 'Open', |