Enable 'Make a copy' for OnlyOffice apps

pull/1/head
yflory 3 years ago
parent 8a4ead4711
commit d42011bea6

@ -1331,7 +1331,7 @@ define([
if (metadata.channel && metadata.channel.length < 48) {
hide.push('preview');
}
if (!metadata.channel || metadata.channel.length > 32 || metadata.rtChannel) {
if (!metadata.channel || metadata.channel.length > 32) {
hide.push('makeacopy'); // Not for blobs
}
} else if ($element.is('.cp-app-drive-element-sharedf')) {

@ -2049,6 +2049,14 @@ define([
}, cryptputCfg);
return;
}
if (Cryptpad.fromFileData && isOO && Cryptpad.fromFileData.href) {
var d = Cryptpad.fromFileData;
var _p = Utils.Hash.parsePadUrl(d.href);
if (_p.type === currentPad.app) {
data.template = d.href;
templatePw = d.password;
}
}
if (data.template) {
// Start OO with a template...
// Cryptget and give href, password and content to inner

Loading…
Cancel
Save