chore(note_bars/collection): put archived notes at the end

This commit is contained in:
Elian Doran 2025-12-11 19:39:07 +02:00
parent 1a9fb34a6e
commit 9f4757af5b
No known key found for this signature in database

View File

@ -6,7 +6,7 @@ import { FormDropdownDivider, FormDropdownSubmenu, FormListItem, FormListTogglea
import Icon from "../react/Icon"; import Icon from "../react/Icon";
import { useViewType, VIEW_TYPE_MAPPINGS } from "../ribbon/CollectionPropertiesTab"; import { useViewType, VIEW_TYPE_MAPPINGS } from "../ribbon/CollectionPropertiesTab";
import { bookPropertiesConfig, BookProperty, ButtonProperty, CheckBoxProperty, SplitButtonProperty } from "../ribbon/collection-properties-config"; import { bookPropertiesConfig, BookProperty, ButtonProperty, CheckBoxProperty, SplitButtonProperty } from "../ribbon/collection-properties-config";
import { useNoteLabel, useNoteLabelBoolean } from "../react/hooks"; import { useNoteLabelBoolean } from "../react/hooks";
import { useContext } from "preact/hooks"; import { useContext } from "preact/hooks";
import { ParentComponent } from "../react/react_utils"; import { ParentComponent } from "../react/react_utils";
@ -60,16 +60,16 @@ function ViewOptions({ note, viewType }: { note: FNote, viewType: ViewTypeOption
buttonClassName="bx bx-cog icon-action" buttonClassName="bx bx-cog icon-action"
hideToggleArrow hideToggleArrow
> >
{properties.map(property => (
<ViewProperty key={property} note={note} property={property} />
))}
{properties.length > 0 && <FormDropdownDivider />}
<ViewProperty note={note} property={{ <ViewProperty note={note} property={{
type: "checkbox", type: "checkbox",
label: t("book_properties.include_archived_notes"), label: t("book_properties.include_archived_notes"),
bindToLabel: "includeArchived" bindToLabel: "includeArchived"
} as CheckBoxProperty} /> } as CheckBoxProperty} />
{properties.length > 0 && <FormDropdownDivider />}
{properties.map(property => (
<ViewProperty key={property} note={note} property={property} />
))}
</Dropdown> </Dropdown>
); );
} }