Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: remove unused code from action-bar

Abdullah Atta2c59df9fb701
diff --git a/apps/web/src/components/editor/action-bar.tsx b/apps/web/src/components/editor/action-bar.tsx
index 72911bcc2..73d108d38 100644
--- a/apps/web/src/components/editor/action-bar.tsx
+++ b/apps/web/src/components/editor/action-bar.tsx
@@ -89,7 +89,6 @@ import { isMac } from "../../utils/platform";
export function EditorActionBar() {
const { isMaximized, isFullscreen, hasNativeWindowControls } =
useWindowControls();
- const editorMargins = useEditorStore((store) => store.editorMargins);
const isFocusMode = useAppStore((store) => store.isFocusMode);
const activeTab = useEditorStore((store) => store.getActiveTab());
const activeSession = useEditorStore((store) =>
@@ -140,45 +139,6 @@ export function EditorActionBar() {
activeSession.type === "readonly") &&
showPublishView(activeSession.note, "top")
},
- // {
- // title: editorMargins
- // ? strings.disableEditorMargins()
- // : strings.enableEditorMargins(),
- // icon: editorMargins ? EditorNormalWidth : EditorFullWidth,
- // enabled: true,
- // hideOnMobile: true,
- // onClick: () => useEditorStore.getState().toggleEditorMargins()
- // },
- // {
- // title: isFullscreen
- // ? strings.exitFullScreen()
- // : strings.enterFullScreen(),
- // icon: isFullscreen ? ExitFullscreen : Fullscreen,
- // enabled: true,
- // hidden: !isFocusMode,
- // hideOnMobile: true,
- // onClick: () => {
- // if (isFullscreen) {
- // exitFullscreen();
- // } else {
- // enterFullscreen(document.documentElement);
- // }
- // }
- // },
- // {
- // title: isFocusMode ? strings.normalMode() : strings.focusMode(),
- // icon: isFocusMode ? FocusMode : NormalMode,
- // enabled: true,
- // hideOnMobile: true,
- // onClick: () => {
- // useAppStore.getState().toggleFocusMode();
- // if (document.fullscreenElement) exitFullscreen();
- // const editor =
- // activeSession &&
- // useEditorManager.getState().getEditor(activeSession.id);
- // if (editor) editor.editor?.focus();
- // }
- // },
{
title: strings.toc(),
icon: TableOfContents,
@@ -749,12 +709,3 @@ function ReorderableList<T extends { id: string }>(
</DndContext>
);
}
-
-function enterFullscreen(elem: HTMLElement) {
- elem.requestFullscreen();
-}
-
-function exitFullscreen() {
- if (!document.fullscreenElement) return;
- document.exitFullscreen();
-}