hide embed tab of share modal for docs that don't support embedding

pull/1/head
ansuz 3 years ago
parent 1e2ef32c39
commit 67303d6a92

@ -16,6 +16,15 @@ define([
Messages, nThen, Pages) {
var Share = {};
var embeddableApps = [
'code',
'form',
'kanban',
'pad',
'slide',
'whiteboard',
].map(app => `/${app}/`);
var createShareWithFriends = function (config, onShare, linkGetter) {
var common = config.common;
var sframeChan = common.getSframeChannel();
@ -772,7 +781,7 @@ define([
icon: "fa fa-link",
active: !contactsActive,
}];
if (!opts.static && !ApiConfig.disableEmbedding) {
if (!opts.static && !ApiConfig.disableEmbedding && embeddableApps.includes(pathname)) {
tabs.push({
getTab: getEmbedTab,
title: Messages.share_embedCategory,

@ -9,22 +9,14 @@ define([
var common = {};
var embeddableApps = [
//'calendar',
'code',
//'doc', // XXX
// 'drive', // XXX
//'file', // doesn't suggest iframes
'form',
'kanban',
'pad',
// 'poll', // XXX
//'presentation', // XXX
// 'sheet', // XXX
'slide',
//'teams', // XXX
'whiteboard',
].map(function (x) {
return `/${x}/`; // XXX intentionally break IE or anything that doesn't support template literals
return `/${x}/`;
});
common.initIframe = function (waitFor, isRt, pathname) {

Loading…
Cancel
Save