From bb2913f517d10979eea4c05e3b661353a1301a2c Mon Sep 17 00:00:00 2001 From: Ivanruii Date: Thu, 14 May 2026 11:09:50 +0200 Subject: [PATCH 1/2] feat(vscode-extension): hide open and save buttons on vscode --- apps/web/src/pods/toolbar/toolbar.pod.tsx | 44 +++++++++++++---------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/apps/web/src/pods/toolbar/toolbar.pod.tsx b/apps/web/src/pods/toolbar/toolbar.pod.tsx index ff9e7b75..8c655dbd 100644 --- a/apps/web/src/pods/toolbar/toolbar.pod.tsx +++ b/apps/web/src/pods/toolbar/toolbar.pod.tsx @@ -1,23 +1,25 @@ -import { DeleteButton } from './components/delete-button'; +import { isVSCodeEnv } from '#common/utils/env.utils.ts'; +import { useInteractionModeContext } from '#core/providers'; import { CopyButton } from './components/copy-paste-button'; +import { DeleteButton } from './components/delete-button'; import { - ZoomInButton, - ZoomOutButton, + AboutButton, ExportButton, NewButton, OpenButton, + RedoButton, SaveButton, UndoButton, - RedoButton, - AboutButton, + ZoomInButton, + ZoomOutButton, } from './components/index'; -import classes from './toolbar.pod.module.css'; import { SettingsButton } from './components/settings-button'; -import { useInteractionModeContext } from '#core/providers'; +import classes from './toolbar.pod.module.css'; export const ToolbarPod: React.FC = () => { const { interactionMode } = useInteractionModeContext(); const isEditMode = interactionMode === 'edit'; + const isVSCode = isVSCodeEnv(); return (
{isEditMode && ( From ceb9d97fc16479e2bf9cdf15d9c6f451755a19ca Mon Sep 17 00:00:00 2001 From: Ivanruii Date: Thu, 14 May 2026 14:17:51 +0200 Subject: [PATCH 2/2] refactor(toolbar): streamline button rendering logic for VSCode environment --- apps/web/src/pods/toolbar/toolbar.pod.tsx | 46 ++++++++++++----------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/apps/web/src/pods/toolbar/toolbar.pod.tsx b/apps/web/src/pods/toolbar/toolbar.pod.tsx index 8c655dbd..d42df49c 100644 --- a/apps/web/src/pods/toolbar/toolbar.pod.tsx +++ b/apps/web/src/pods/toolbar/toolbar.pod.tsx @@ -22,31 +22,33 @@ export const ToolbarPod: React.FC = () => { const isVSCode = isVSCodeEnv(); return (
-
    - {isEditMode && ( -
  • - -
  • - )} + {(isEditMode || !isVSCode) && ( +
      + {isEditMode && ( +
    • + +
    • + )} - {!isVSCode && ( -
    • - -
    • - )} + {!isVSCode && ( +
    • + +
    • + )} - {isEditMode && !isVSCode && ( -
    • - -
    • - )} + {isEditMode && !isVSCode && ( +
    • + +
    • + )} - {isEditMode && ( -
    • - -
    • - )} -
    + {isEditMode && ( +
  • + +
  • + )} +
+ )} {isEditMode && (