refactor(views/table): simplify context menu handling

This commit is contained in:
Elian Doran
2025-07-14 15:46:22 +03:00
parent 84479a2c2a
commit e703ce92a8
3 changed files with 30 additions and 32 deletions

View File

@@ -28,6 +28,7 @@ import TouchBarComponent from "./touch_bar.js";
import type { CKTextEditor } from "@triliumnext/ckeditor5";
import type CodeMirror from "@triliumnext/codemirror";
import { StartupChecks } from "./startup_checks.js";
import type { CreateNoteOpts } from "../services/note_create.js";
interface Layout {
getRootWidget: (appContext: AppContext) => RootWidget;
@@ -276,6 +277,12 @@ export type CommandMappings = {
geoMapCreateChildNote: CommandData;
// Table view
addNewRow: CommandData & {
customOpts: CreateNoteOpts;
parentNotePath?: string;
};
buildTouchBar: CommandData & {
TouchBar: typeof TouchBar;
buildIcon(name: string): NativeImage;