summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorszaimen <szaimen@e.mail.de>2022-10-11 00:12:58 +0200
committerszaimen <szaimen@e.mail.de>2022-10-11 00:12:58 +0200
commitd552bae403c02fa7d10a409605807aba04164b21 (patch)
treefdf695e2d9f9cacf04d2ae1f3a077a79c7336234 /apps/files/js
parentf456989261c7f0f42be832513cbc6a4f53d87cff (diff)
downloadnextcloud-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.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',