mirror of
https://github.com/nextcloud/server.git
synced 2026-02-22 17:31:10 -05:00
do not show editlocally on mobile
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
9068bf5788
commit
873ba714ae
1 changed files with 25 additions and 23 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue