diff options
author | szaimen <szaimen@e.mail.de> | 2022-10-11 00:12:58 +0200 |
---|---|---|
committer | szaimen <szaimen@e.mail.de> | 2022-10-11 00:12:58 +0200 |
commit | d552bae403c02fa7d10a409605807aba04164b21 (patch) | |
tree | fdf695e2d9f9cacf04d2ae1f3a077a79c7336234 /apps/files/js | |
parent | f456989261c7f0f42be832513cbc6a4f53d87cff (diff) | |
download | nextcloud-server-d552bae403c02fa7d10a409605807aba04164b21.tar.gz nextcloud-server-d552bae403c02fa7d10a409605807aba04164b21.zip |
do not show editlocally on mobile
Signed-off-by: szaimen <szaimen@e.mail.de>
Diffstat (limited to 'apps/files/js')
-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', |