Skip to content

Commit

Permalink
web: remove unused code from action-bar
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Feb 1, 2025
1 parent 4fc30cc commit 2c59df9
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions apps/web/src/components/editor/action-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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();
}

0 comments on commit 2c59df9

Please sign in to comment.