From 1e1a57d2469c4a8566b0375d156da8fb40c3d86f Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 16 Apr 2022 21:22:45 -0700 Subject: [PATCH] chore: Move document embed switching to toggle --- app/menus/DocumentMenu.tsx | 58 ++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/app/menus/DocumentMenu.tsx b/app/menus/DocumentMenu.tsx index 20b5964dc..1619d9aed 100644 --- a/app/menus/DocumentMenu.tsx +++ b/app/menus/DocumentMenu.tsx @@ -14,7 +14,6 @@ import { ImportIcon, NewDocumentIcon, DownloadIcon, - BuildingBlocksIcon, RestoreIcon, CrossIcon, } from "outline-icons"; @@ -410,20 +409,6 @@ function DocumentMenu({ visible: can.permanentDelete, icon: , }, - { - type: "button", - title: t("Enable embeds"), - onClick: document.enableEmbeds, - visible: !!showToggleEmbeds && document.embedsDisabled, - icon: , - }, - { - type: "button", - title: t("Disable embeds"), - onClick: document.disableEmbeds, - visible: !!showToggleEmbeds && !document.embedsDisabled, - icon: , - }, { type: "separator", }, @@ -452,21 +437,38 @@ function DocumentMenu({ }, ]} /> - {showDisplayOptions && !isMobile && ( + {(showDisplayOptions || showToggleEmbeds) && ( <> - + {showToggleEmbeds && ( + + )} + {showDisplayOptions && !isMobile && ( + + )} )}