From 68d07a7862448bb22eb3cc6000adeb9b17d66d10 Mon Sep 17 00:00:00 2001 From: 01zulfi <85733202+01zulfi@users.noreply.github.com> Date: Tue, 2 Jun 2026 13:06:50 +0500 Subject: [PATCH] web: fix properties panel in focus mode (#9917) * allow properties panel to open/close when app is in focus mode Signed-off-by: 01zulfi <85733202+01zulfi@users.noreply.github.com> --- apps/web/src/components/editor/action-bar.tsx | 5 +---- apps/web/src/components/properties/index.tsx | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/apps/web/src/components/editor/action-bar.tsx b/apps/web/src/components/editor/action-bar.tsx index 1ee1e6efa..6eeb712d5 100644 --- a/apps/web/src/components/editor/action-bar.tsx +++ b/apps/web/src/components/editor/action-bar.tsx @@ -27,7 +27,6 @@ import { Lock, NewTab, Note, - NoteAdd, NoteRemove, Pin, Plus, @@ -98,7 +97,6 @@ type ToolButton = { export function EditorActionBar() { const { isMaximized, isFullscreen, hasNativeWindowControls } = useWindowControls(); - const isFocusMode = useAppStore((store) => store.isFocusMode); const activeTab = useEditorStore((store) => store.getActiveTab()); const activeSession = useEditorStore((store) => activeTab ? store.getSession(activeTab.sessionId) : undefined @@ -187,8 +185,7 @@ export function EditorActionBar() { activeSession && activeSession.type !== "new" && activeSession.type !== "locked" && - activeSession.type !== "conflicted" && - !isFocusMode, + activeSession.type !== "conflicted", onClick: () => useEditorStore.getState().toggleProperties(), toggled: arePropertiesVisible }, diff --git a/apps/web/src/components/properties/index.tsx b/apps/web/src/components/properties/index.tsx index d3e1f9121..23380cc5b 100644 --- a/apps/web/src/components/properties/index.tsx +++ b/apps/web/src/components/properties/index.tsx @@ -41,7 +41,6 @@ import { DefaultEditorSession } from "../../stores/editor-store"; import { db } from "../../common/db"; -import { useStore as useAppStore } from "../../stores/app-store"; import { useStore as useAttachmentStore } from "../../stores/attachment-store"; import { store as noteStore } from "../../stores/note-store"; import Toggle from "./toggle"; @@ -109,7 +108,6 @@ type EditorPropertiesProps = { }; function EditorProperties(props: EditorPropertiesProps) { const toggleProperties = useEditorStore((store) => store.toggleProperties); - const isFocusMode = useAppStore((store) => store.isFocusMode); const dateFormat = useSettingStore((store) => store.dateFormat); const timeFormat = useSettingStore((store) => store.timeFormat); const metadataItems = [ @@ -140,7 +138,8 @@ function EditorProperties(props: EditorPropertiesProps) { "diff" ]) ); - if (isFocusMode || !session) return null; + if (!session) return null; + return (