mirror of
https://github.com/zadam/trilium.git
synced 2026-02-26 16:43:36 +01:00
ui/list & grid view: refactor
This commit is contained in:
parent
535054b2d2
commit
57e888911d
@ -28,7 +28,7 @@ export function ListView({ note, noteIds: unfilteredNoteIds, highlightedTokens }
|
||||
const [ includeArchived ] = useNoteLabelBoolean(note, "includeArchived");
|
||||
const noteType = useNoteProperty(note, "type");
|
||||
|
||||
return <NoteList note={note} viewMode="list" noteIds={noteIds} pagination={pagination}>
|
||||
return <NoteList note={note} viewMode="list-view" noteIds={noteIds} pagination={pagination}>
|
||||
<Card className={clsx("nested-note-list", {"search-results": (noteType === "search")})}>
|
||||
{pageNotes?.map(childNote => (
|
||||
<ListNoteCard
|
||||
@ -62,7 +62,7 @@ export function GridView({ note, noteIds: unfilteredNoteIds, highlightedTokens }
|
||||
|
||||
interface NoteListProps {
|
||||
note: FNote,
|
||||
viewMode: "list" | "grid-view",
|
||||
viewMode: "list-view" | "grid-view",
|
||||
noteIds: string[],
|
||||
pagination: PaginationContext,
|
||||
children: ComponentChildren
|
||||
@ -72,7 +72,7 @@ function NoteList(props: NoteListProps) {
|
||||
const noteType = useNoteProperty(props.note, "type");
|
||||
const hasCollectionProperties = ["book", "search"].includes(noteType ?? "");
|
||||
|
||||
return <div className={"note-list " + props.viewMode}>
|
||||
return <div className={clsx("note-list", props.viewMode)}>
|
||||
<CollectionProperties
|
||||
note={props.note}
|
||||
centerChildren={<Pager className="note-list-top-pager" {...props.pagination} />}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user