summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-10-11 09:28:40 +0200
committerGitHub <noreply@github.com>2022-10-11 09:28:40 +0200
commite0ec31e9099767e59f3d4a502883ec980b2229e6 (patch)
treebcbfa41f374fdef26effd57a9cc26f5ea0b9a34a
parent647f9ca2d72a276e793bdc1ac0d7286ce3364abc (diff)
parentd552bae403c02fa7d10a409605807aba04164b21 (diff)
downloadnextcloud-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.js48
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',