mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
chore(react/ribbon): save search to note
This commit is contained in:
@@ -14,12 +14,12 @@ import TaskContext from "../../services/task_context.js";
|
||||
import dayjs from "dayjs";
|
||||
import utc from "dayjs/plugin/utc.js";
|
||||
import eventService from "../../services/events.js";
|
||||
import type { AttachmentRow, AttributeType, NoteRow, NoteType, RevisionRow } from "@triliumnext/commons";
|
||||
import type { AttachmentRow, AttributeType, CloneResponse, NoteRow, NoteType, RevisionRow } from "@triliumnext/commons";
|
||||
import type BBranch from "./bbranch.js";
|
||||
import BAttribute from "./battribute.js";
|
||||
import type { NotePojo } from "../becca-interface.js";
|
||||
import searchService from "../../services/search/services/search.js";
|
||||
import cloningService, { type CloneResponse } from "../../services/cloning.js";
|
||||
import cloningService from "../../services/cloning.js";
|
||||
import noteService from "../../services/notes.js";
|
||||
import handlers from "../../services/handlers.js";
|
||||
dayjs.extend(utc);
|
||||
|
||||
@@ -6,13 +6,7 @@ import treeService from "./tree.js";
|
||||
import BBranch from "../becca/entities/bbranch.js";
|
||||
import becca from "../becca/becca.js";
|
||||
import log from "./log.js";
|
||||
|
||||
export interface CloneResponse {
|
||||
success: boolean;
|
||||
message?: string;
|
||||
branchId?: string;
|
||||
notePath?: string;
|
||||
}
|
||||
import { CloneResponse } from "@triliumnext/commons";
|
||||
|
||||
function cloneNoteToParentNote(noteId: string, parentNoteId: string, prefix: string | null = null): CloneResponse {
|
||||
if (!(noteId in becca.notes) || !(parentNoteId in becca.notes)) {
|
||||
|
||||
@@ -10,6 +10,7 @@ import SearchContext from "./search/search_context.js";
|
||||
import { LBTPL_NOTE_LAUNCHER, LBTPL_CUSTOM_WIDGET, LBTPL_SPACER, LBTPL_SCRIPT } from "./hidden_subtree.js";
|
||||
import { t } from "i18next";
|
||||
import { BNote } from "./backend_script_entrypoint.js";
|
||||
import { SaveSearchNoteResponse } from "@triliumnext/commons";
|
||||
|
||||
function getInboxNote(date: string) {
|
||||
const workspaceNote = hoistedNoteService.getWorkspaceNote();
|
||||
@@ -119,7 +120,7 @@ function saveSearchNote(searchNoteId: string) {
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
return result satisfies SaveSearchNoteResponse;
|
||||
}
|
||||
|
||||
function getMonthlyParentNoteId(rootNoteId: string, prefix: string) {
|
||||
|
||||
Reference in New Issue
Block a user