From 8ab9e304044beddf7aba0243bd45e99f2dde2d51 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 11 Dec 2025 20:13:04 +0200 Subject: [PATCH] chore(note_bars/collection): disable ribbon tab --- .../widgets/note_bars/CollectionProperties.tsx | 15 ++++++++------- .../client/src/widgets/ribbon/RibbonDefinition.ts | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/client/src/widgets/note_bars/CollectionProperties.tsx b/apps/client/src/widgets/note_bars/CollectionProperties.tsx index 142ed6ca6..ab74b4324 100644 --- a/apps/client/src/widgets/note_bars/CollectionProperties.tsx +++ b/apps/client/src/widgets/note_bars/CollectionProperties.tsx @@ -1,16 +1,17 @@ import { t } from "i18next"; +import { useContext } from "preact/hooks"; +import { Fragment } from "preact/jsx-runtime"; + import FNote from "../../entities/fnote"; import { ViewTypeOptions } from "../collections/interface"; import Dropdown from "../react/Dropdown"; import { FormDropdownDivider, FormDropdownSubmenu, FormListItem, FormListToggleableItem } from "../react/FormList"; -import Icon from "../react/Icon"; -import { useViewType, VIEW_TYPE_MAPPINGS } from "../ribbon/CollectionPropertiesTab"; -import { bookPropertiesConfig, BookProperty, ButtonProperty, CheckBoxProperty, ComboBoxItem, ComboBoxProperty, NumberProperty, SplitButtonProperty } from "../ribbon/collection-properties-config"; -import { useNoteLabel, useNoteLabelBoolean, useNoteLabelWithDefault } from "../react/hooks"; -import { useContext } from "preact/hooks"; -import { ParentComponent } from "../react/react_utils"; import FormTextBox from "../react/FormTextBox"; -import { Fragment } from "preact/jsx-runtime"; +import { useNoteLabel, useNoteLabelBoolean, useNoteLabelWithDefault } from "../react/hooks"; +import Icon from "../react/Icon"; +import { ParentComponent } from "../react/react_utils"; +import { bookPropertiesConfig, BookProperty, ButtonProperty, CheckBoxProperty, ComboBoxItem, ComboBoxProperty, NumberProperty, SplitButtonProperty } from "../ribbon/collection-properties-config"; +import { useViewType, VIEW_TYPE_MAPPINGS } from "../ribbon/CollectionPropertiesTab"; const ICON_MAPPINGS: Record = { grid: "bx bxs-grid", diff --git a/apps/client/src/widgets/ribbon/RibbonDefinition.ts b/apps/client/src/widgets/ribbon/RibbonDefinition.ts index 766f07df7..d29cd181f 100644 --- a/apps/client/src/widgets/ribbon/RibbonDefinition.ts +++ b/apps/client/src/widgets/ribbon/RibbonDefinition.ts @@ -60,7 +60,7 @@ export const RIBBON_TAB_DEFINITIONS: TabConfiguration[] = [ title: t("book_properties.book_properties"), icon: "bx bx-book", content: CollectionPropertiesTab, - show: ({ note }) => note?.type === "book" || note?.type === "search", + show: ({ note }) => !isNewLayout && note?.type === "book" || note?.type === "search", toggleCommand: "toggleRibbonTabBookProperties" }, {