client/list view: add a menu button for list items

This commit is contained in:
Adorian Doran 2026-02-15 02:26:23 +02:00
parent a6cbde88bb
commit 0a9c6a3119
2 changed files with 10 additions and 0 deletions

View File

@ -153,6 +153,10 @@
font-size: .75em;
opacity: .75;
}
.nested-note-list-item-menu {
margin-inline-start: 8px;
}
}
.note-book-content {

View File

@ -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, expan
showNotePath={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>
);