Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client/list view: add a menu button for list items
Adorian Doran0a9c6a3119a3
diff --git a/apps/client/src/widgets/collections/legacy/ListOrGridView.css b/apps/client/src/widgets/collections/legacy/ListOrGridView.cssindex 6685025383..018db0a6c7 100644--- a/apps/client/src/widgets/collections/legacy/ListOrGridView.css+++ b/apps/client/src/widgets/collections/legacy/ListOrGridView.css@@ -153,6 +153,10 @@font-size: .75em;opacity: .75;}++ .nested-note-list-item-menu {+ margin-inline-start: 8px;+ }}.note-book-content {diff --git a/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx b/apps/client/src/widgets/collections/legacy/ListOrGridView.tsxindex 1eba122f9b..be244cbbe7 100644--- a/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx+++ b/apps/client/src/widgets/collections/legacy/ListOrGridView.tsx@@ -17,6 +17,8 @@ import { Pager, usePagination } from "../Pagination";import { filterChildNotes, useFilteredNoteIds } from "./utils";import { JSX } from "preact/jsx-runtime";import { clsx } from "clsx";+import ActionButton from "../../react/ActionButton";+import linkContextMenuService from "../../../menus/link_context_menu";export function ListView({ note, noteIds: unfilteredNoteIds, highlightedTokens }: ViewModeProps<{}>) {const expandDepth = useExpansionDepth(note);@@ -133,6 +135,10 @@ function ListNoteCard({ note, parentNote, highlightedTokens, currentLevel, expanshowNotePath={parentNote.type === "search"}highlightedTokens={highlightedTokens} /><NoteAttributes note={note} />+ <ActionButton className="nested-note-list-item-menu"+ icon="bx bx-dots-vertical-rounded" text=""+ onClick={(e) => {linkContextMenuService.openContextMenu(notePath, e); e.stopPropagation()}}+ /></h5></CardSection>);