From 1e5b294eb3997542a80f0a9bdfc70e843f735bed Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 15 Feb 2026 13:19:12 +0200 Subject: [PATCH] feat(badges/content): adjustable base for app theme --- .../widgets/layout/ActiveContentBadges.tsx | 30 +++++++++++++++++-- .../src/widgets/react/NotePropertyMenu.tsx | 2 ++ packages/commons/src/lib/attribute_names.ts | 3 ++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/apps/client/src/widgets/layout/ActiveContentBadges.tsx b/apps/client/src/widgets/layout/ActiveContentBadges.tsx index 26360afaea..689854237d 100644 --- a/apps/client/src/widgets/layout/ActiveContentBadges.tsx +++ b/apps/client/src/widgets/layout/ActiveContentBadges.tsx @@ -10,6 +10,7 @@ import { BadgeWithDropdown } from "../react/Badge"; import { FormDropdownDivider, FormDropdownSubmenu, FormListItem } from "../react/FormList"; import FormToggle from "../react/FormToggle"; import { useNoteContext, useNoteLabel, useNoteLabelBoolean, useTriliumEvent } from "../react/hooks"; +import { BookProperty, ViewProperty } from "../react/NotePropertyMenu"; const NON_DANGEROUS_ACTIVE_CONTENT = [ "appCss", "appTheme" ]; const DANGEROUS_ATTRIBUTES = BUILTIN_ATTRIBUTES.filter(a => a.isDangerous || NON_DANGEROUS_ACTIVE_CONTENT.includes(a.name)); @@ -26,6 +27,7 @@ const typeMappings: Record = { iconPack: { icon: "bx bx-package", @@ -61,7 +63,22 @@ const typeMappings: Record )} + {additionalOptions?.length && ( + <> + {additionalOptions?.map((property, i) => ( + + ))} + + + )} + openInAppHelpFromUrl(helpPage)} diff --git a/apps/client/src/widgets/react/NotePropertyMenu.tsx b/apps/client/src/widgets/react/NotePropertyMenu.tsx index 3c01f7e192..15f3723943 100644 --- a/apps/client/src/widgets/react/NotePropertyMenu.tsx +++ b/apps/client/src/widgets/react/NotePropertyMenu.tsx @@ -65,6 +65,7 @@ export interface ComboBoxProperty { */ defaultValue?: string; options: (ComboBoxItem | ComboBoxGroup)[]; + dropStart?: boolean; } export type BookProperty = CheckBoxProperty | ButtonProperty | NumberProperty | ComboBoxProperty | SplitButtonProperty; @@ -163,6 +164,7 @@ function ComboBoxPropertyView({ note, property }: { note: FNote, property: Combo {(property.options).map((option, index) => { if ("items" in option) { diff --git a/packages/commons/src/lib/attribute_names.ts b/packages/commons/src/lib/attribute_names.ts index 31997489ce..da3b890c9c 100644 --- a/packages/commons/src/lib/attribute_names.ts +++ b/packages/commons/src/lib/attribute_names.ts @@ -64,6 +64,9 @@ type Labels = { readOnly: boolean; mapType: string; mapRootNoteId: string; + + appTheme: string; + appThemeBase: string; } /**