mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
hide the 'embed' tab of the share menu if 'disableEmbedding' is true
This commit is contained in:
parent
96f4162a58
commit
52529f1a65
@ -1,5 +1,6 @@
|
||||
define([
|
||||
'jquery',
|
||||
'/api/config',
|
||||
'/common/common-util.js',
|
||||
'/common/common-hash.js',
|
||||
'/common/common-interface.js',
|
||||
@ -11,7 +12,7 @@ define([
|
||||
'/customize/messages.js',
|
||||
'/bower_components/nthen/index.js',
|
||||
'/customize/pages.js',
|
||||
], function ($, Util, Hash, UI, UIElements, Feedback, Modal, h, Clipboard,
|
||||
], function ($, ApiConfig, Util, Hash, UI, UIElements, Feedback, Modal, h, Clipboard,
|
||||
Messages, nThen, Pages) {
|
||||
var Share = {};
|
||||
|
||||
@ -771,9 +772,9 @@ define([
|
||||
icon: "fa fa-link",
|
||||
active: !contactsActive,
|
||||
}];
|
||||
if (!opts.static) {
|
||||
if (!opts.static && !ApiConfig.disableEmbedding) {
|
||||
tabs.push({
|
||||
getTab: getEmbedTab,
|
||||
getTab: getEmbedTab, // XXX
|
||||
title: Messages.share_embedCategory,
|
||||
icon: "fa fa-code",
|
||||
onShow: onShowEmbed,
|
||||
@ -965,11 +966,16 @@ define([
|
||||
title: Messages.share_linkCategory,
|
||||
icon: "fa fa-link",
|
||||
active: !hasFriends,
|
||||
}, {
|
||||
getTab: getFileEmbedTab,
|
||||
title: Messages.share_embedCategory,
|
||||
icon: "fa fa-code",
|
||||
}];
|
||||
|
||||
if (!ApiConfig.disableEmbedding) {
|
||||
tabs.push({
|
||||
getTab: getFileEmbedTab,
|
||||
title: Messages.share_embedCategory,
|
||||
icon: "fa fa-code",
|
||||
});
|
||||
}
|
||||
|
||||
Modal.getModal(common, opts, tabs, cb);
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user