Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(note_bars/collection): disable ribbon tab
Elian Doran8ab9e304044b
diff --git a/apps/client/src/widgets/note_bars/CollectionProperties.tsx b/apps/client/src/widgets/note_bars/CollectionProperties.tsxindex 142ed6ca61..ab74b43243 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 FormTextBox from "../react/FormTextBox";import { useNoteLabel, useNoteLabelBoolean, useNoteLabelWithDefault } from "../react/hooks";-import { useContext } from "preact/hooks";+import Icon from "../react/Icon";import { ParentComponent } from "../react/react_utils";-import FormTextBox from "../react/FormTextBox";-import { Fragment } from "preact/jsx-runtime";+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<ViewTypeOptions, string> = {grid: "bx bxs-grid",diff --git a/apps/client/src/widgets/ribbon/RibbonDefinition.ts b/apps/client/src/widgets/ribbon/RibbonDefinition.tsindex 766f07df79..d29cd181fd 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"},{