diff --git a/apps/client/src/widgets/note_bars/CollectionProperties.tsx b/apps/client/src/widgets/note_bars/CollectionProperties.tsx index ac16eb1e5..8cbbc540b 100644 --- a/apps/client/src/widgets/note_bars/CollectionProperties.tsx +++ b/apps/client/src/widgets/note_bars/CollectionProperties.tsx @@ -1,9 +1,12 @@ +import { t } from "i18next"; import FNote from "../../entities/fnote"; import { ViewTypeOptions } from "../collections/interface"; import Dropdown from "../react/Dropdown"; -import { FormListItem } from "../react/FormList"; +import { FormListItem, FormListToggleableItem } from "../react/FormList"; import Icon from "../react/Icon"; import { useViewType, VIEW_TYPE_MAPPINGS } from "../ribbon/CollectionPropertiesTab"; +import { BookProperty, CheckBoxProperty } from "../ribbon/collection-properties-config"; +import { useNoteLabel, useNoteLabelBoolean } from "../react/hooks"; const ICON_MAPPINGS: Record = { grid: "bx bxs-grid", @@ -17,7 +20,10 @@ const ICON_MAPPINGS: Record = { export default function CollectionProperties({ note }: { note: FNote }) { return ( - + <> + + + ); } @@ -43,3 +49,36 @@ function ViewTypeSwitcher({ note }: { note: FNote }) { ); } + +function ViewOptions({ note }: { note: FNote }) { + return ( + + + + ); +} + +function ViewProperty({ note, property }: { note: FNote, property: BookProperty }) { + switch (property.type) { + case "checkbox": + return ; + } +} + +function CheckBoxPropertyView({ note, property }: { note: FNote, property: CheckBoxProperty }) { + const [ value, setValue ] = useNoteLabelBoolean(note, property.bindToLabel); + return ( + + ); +}