mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 21:36:05 +01:00
feat(client/print): get collections to render
This commit is contained in:
@@ -13,7 +13,6 @@ import { subscribeToMessages, unsubscribeToMessage as unsubscribeFromMessage } f
|
||||
import { WebSocketMessage } from "@triliumnext/commons";
|
||||
import froca from "../../services/froca";
|
||||
import PresentationView from "./presentation";
|
||||
import PresentationPrintView from "./presentation/print";
|
||||
|
||||
interface NoteListProps {
|
||||
note: FNote | null | undefined;
|
||||
@@ -35,7 +34,7 @@ export function SearchNoteList<T extends object>(props: Omit<NoteListProps, "isE
|
||||
return <CustomNoteList {...props} isEnabled={true} />
|
||||
}
|
||||
|
||||
function CustomNoteList<T extends object>({ note, isEnabled: shouldEnable, notePath, highlightedTokens, displayOnlyCollections, ntxId }: NoteListProps) {
|
||||
export function CustomNoteList<T extends object>({ note, isEnabled: shouldEnable, notePath, highlightedTokens, displayOnlyCollections, ntxId }: NoteListProps) {
|
||||
const widgetRef = useRef<HTMLDivElement>(null);
|
||||
const viewType = useNoteViewType(note);
|
||||
const noteIds = useNoteIds(note, viewType, ntxId);
|
||||
@@ -111,20 +110,6 @@ function getComponentByViewType(viewType: ViewTypeOptions, props: ViewModeProps<
|
||||
}
|
||||
}
|
||||
|
||||
export function getComponentByViewTypeForPrint(viewType: ViewTypeOptions, props: ViewModeProps<any>) {
|
||||
switch (viewType) {
|
||||
case "list":
|
||||
case "grid":
|
||||
case "geoMap":
|
||||
case "calendar":
|
||||
case "table":
|
||||
case "board":
|
||||
return null;
|
||||
case "presentation":
|
||||
return <PresentationPrintView {...props} />
|
||||
}
|
||||
}
|
||||
|
||||
function useNoteViewType(note?: FNote | null): ViewTypeOptions | undefined {
|
||||
const [ viewType ] = useNoteLabel(note, "viewType");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user